E-MapReduce (EMR) clusters are independent of each other. The client of a cluster can access only the namespaces that are configured in the cluster. If you have multiple clusters, you can configure JindoFS parameters to implement cross-cluster access to JindoFS. This topic describes how to implement cross-cluster access to JindoFS. Cluster A and Cluster B are used as an example.

Prerequisites

  • EMR clusters A and B of the 3.30.0 version or later are deployed in the same VPC. For information about how to create a cluster, see Create a cluster.
  • The /etc/hosts file is configured to synchronize the data of the hosts of all nodes in Cluster B to Cluster A.

Modify configurations

  1. Go to the SmartData service.
    1. Log on to the Alibaba Cloud EMR 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. Go to the client tab.
    1. Click the Configure tab.
    2. In the Service Configuration section, click the client tab.
  3. Modify configurations to enable cross-cluster access.
    Configure Cluster A based on the settings of the namespace.backend.type parameter specified in Cluster B.
    • If namespace.backend.type is set to rocksdb, perform the following operations:
      1. Click Custom Configuration in the upper-right corner.
      2. In the Add Configuration Item dialog box, set Key to client.external.namespace.rpc.addresses and Value to emr-header-1.<cluster-B>:8101, and click OK.
        Note <cluster-B> is the ID of Cluster B.
    • If namespace.backend.type is set to raft, perform the following operations:
      1. Click Custom Configuration in the upper-right corner.
      2. In the Add Configuration Item dialog box, set Key to client.external.namespace.rpc.addresses and Value to emr-header-1.<cluster-B>:8101,emr-header-2.<cluster-B>:8101,emr-header-3.<cluster-B>:8101, and 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.

Associate multiple clusters

To associate multiple clusters, use client.external.namespace.rpc.addresses to configure remote addresses for these clusters. Separate the addresses with semicolons (;).

For example, the address of Cluster B is emr-header-1.<cluster-B>:8101, and namespace.backend.type is set to rocksdb for Cluster B. The address of Cluster C is emr-header-1.<cluster-C>:8101,emr-header-2.<cluster-C>:8101,emr-header-3.<cluster-C>:8101, and namespace.backend.type is set to raft for Cluster C. To associate Cluster B and Cluster C with Cluster A, set Key to client.external.namespace.rpc.addresses and Value to emr-header-1.<cluster-B>:8101;emr-header-1.<cluster-C>:8101,emr-header-2.<cluster-C>:8101,emr-header-3.<cluster-C>:8101 in the Add Configuration Item dialog box for Cluster A.