Namespace Service of JindoFS supports different metadata storage methods. This topic describes how to configure a Tablestore instance as the metadata storage backend.

Prerequisites

  • An EMR cluster is created.

    For more information, see Create a cluster.

  • A Tablestore instance is created. We recommend that you use a high-performance instance.

    For more information, see Create instances.

    Note You must enable the transaction feature.

Background information

In SmartData 2.6.x and later, Namespace Service allows you to use Tablestore instances to store metadata. You can bind a Tablestore instance to each EMR JindoFS cluster. Namespace Service creates a Tablestore table for each namespace to manage and store metadata.

The following figure shows the structure of Namespace Service in HA mode with a Tablestore instance as the metadata storage backend.HA

Configure a Tablestore instance

To use a Tablestore instance as the metadata storage backend, you must first bind the Tablestore instance to Namespace Service. Perform the following steps:

  1. Go to the SmartData service.
    1. Log on to the Alibaba Cloud E-MapReduce console.
    2. In the top navigation bar, select the region where your cluster resides. Select the resource group as required. By default, all resources of the account appear.
    3. Click the Cluster Management tab.
    4. On the Cluster Management page that appears, find the target cluster and click Details in the Actions column.
    5. In the left-side navigation pane, click Cluster Service and then SmartData.
  2. Configure bigboot parameters.
    1. Click the Configure tab.
    2. Click the bigboot tab in the Service Configuration section.
      bigboot
  3. Configure the parameters described in the following table.
    For example, you have created a Tablestore instance named emr-jfs in the China (Hangzhou) region. Your EMR cluster is deployed in a VPC network. You have obtained the AccessKey ID and AccessKey secret that are used to access the Tablestore instance.
    Parameter Description Example
    namespace.backend.type The backend storage type of Namespace Service.
    • rocksdb
    • ots
    • raft

    Default value: rocksdb. Set this parameter to ots.

    ots
    namespace.ots.instance The name of the Tablestore instance. emr-jfs
    namespace.ots.accessKey The AccessKey ID that is used to access the Tablestore instance. kkkkkk
    namespace.ots.accessSecret The AccessKey secret that is used to access the Tablestore instance. XXXXXX
    namespace.ots.endpoint The endpoint of the Tablestore instance. We recommend that you use a VPC endpoint. http://emr-jfs.cn-hangzhou.vpc.tablestore.aliyuncs.com
  4. Save the configurations.
    1. In the upper-right corner of the Service Configuration section, click Save.
    2. In the Confirm Changes dialog box, specify Description and turn on Auto-update Configuration.
    3. Click OK.
  5. Select Restart Jindo Namespace Service from the Actions drop-down list in the upper-right corner.

Configure a Tablestore instance (password-free access)

  1. Configure the parameters described in the following table.
    If the target Tablestore instance allows password-free access from your EMR cluster, you do not need to specify the namespaces.ots.accessKey and namespace.ots.accessSecret parameters.
    Parameter Description Example
    namespace.ots.instance The name of the Tablestore instance. emr-jfs
    namespace.ots.endpoint The endpoint of the Tablestore instance. We recommend that you use a VPC endpoint. http://emr-jfs.cn-hangzhou.vpc.tablestore.aliyuncs.com
    namespace.backend.type The backend storage type of Namespace Service. Valid values: rocksdb, ots, and raft. Default value: rocksdb. Set this parameter to ots. ots
  2. Save the configurations.
    1. In the upper-right corner of the Service Configuration section, click Save.
    2. In the Confirm Changes dialog box, specify Description and turn on Auto-update Configuration.
    3. Click OK.
  3. Select Restart Jindo Namespace Service from the Actions drop-down list in the upper-right corner.

Configure a Tablestore instance (HA mode)

If your EMR cluster is deployed in high availability (HA) mode, we recommend that you deploy Namespace Service in HA mode.High availability
In HA mode, Namespace Service supports automatic failover. If the active namespace fails, the client automatically switches services to the standby namespace.OTS
  1. Go to the bigboot tab for the SmartData service and perform the following operations:
    1. Change the value of jfs.namespace.server.rpc-address to emr-header-1:8101,emr-header-2:8101.
    2. In the upper-right corner of the Service Configuration section, click Custom Configuration. In the Add Configuration Item dialog box, add namespace.backend.ots.ha as a key and set this parameter to true.
    3. Click OK.
    4. Save the configurations.
      1. In the upper-right corner of the Service Configuration section, click Save.
      2. In the Confirm Changes dialog box, specify Description and turn on Auto-update Configuration.
      3. Click OK.
  2. Select Restart Jindo Namespace Service from the Actions drop-down list in the upper-right corner.
  3. Select Restart Jindo Storage Service from the Actions drop-down list in the upper-right corner.