Configure HBase network connectivity

更新时间:
复制 MD 格式

When you call APIs, you must ensure your resource group has network connectivity to access the data source. This topic describes how to configure network connectivity between an EMR HBase data source and an exclusive resource group for Data Service in different network environments.

Notes

This topic describes how to configure network connectivity for an EMR HBase data source, which can be used only with an exclusive resource group for Data Service.

HBase and resource group in the same VPC

If HBase and the exclusive resource group for Data Service are in the same VPC, configure the HBase security group to allow the resource group to access the HBase ports.

Step 1: Obtain the vSwitch CIDR block

Log on to the VPC console that is associated with your exclusive resource group for Data Service. Go to the vSwitches page, find the vSwitch used by the resource group, and copy its IPv4 CIDR block. You can find this information in the Basic information section on the vSwitch details page.

Step 2: Obtain the HBase port information

Log on to the EMR console. Go to the Configuration page of the HBase cluster service. Search for "port" and copy the port numbers for the following parameters.

  • hbase.master.info.port

  • hbase.master.port

  • hbase.regionserver.port

  • hbase.regionserver.info.port

  • hbase.zookeeper.property.clientPort

Step 3: Configure the HBase security group

Log on to the EMR console. On the Basic information page of the cluster, find the Cluster security group entry. Add an inbound access rule with the following key settings.

  • Protocol type: Custom TCP.

  • Port range: Enter the HBase ports you obtained. Notes:

    • The port range format is start_port/end_port. For example, if the port for hbase.master.info.port is 16010, enter 16010/16010.

    • You must configure port ranges for all five parameters. You can separate multiple port ranges with commas.

  • Authorized object: Enter the IPv4 CIDR block of the vSwitch from Step 1.

HBase and resource group in different VPCs

Step 1: Configure inter-VPC connectivity

If HBase and the exclusive resource group for Data Service are in different VPCs, you must establish connectivity between the two VPCs by using a method such as a VPN gateway. For information about solutions for different cross-VPC scenarios, see the relevant sections in Obtain the IP address whitelist: exclusive resource group for Data Service.

Step 2: Configure resolution for hbase.zookeeper.quorum

Because the resource group is in a different VPC, it cannot resolve the EMR hostnames. You must configure DNS resolution with Alibaba Cloud DNS to ensure messages are correctly routed.

  1. In EMR, obtain the hbase.zookeeper.quorum value and node information.

    1. Log on to the EMR console. Go to the Configuration page of the HBase cluster service. Search for the hbase.zookeeper.quorum parameter. The parameter value contains a node name (for example, master-1-1), a domain suffix, and a port number (for example, 2181). Copy and record the domain suffix, which is the content between the node name and the port number.

    2. Log on to the EMR console. Go to the Node Management page of the EMR cluster to view the node names and internal IP addresses.

  2. In Alibaba Cloud DNS, add A records.

    1. Log on to the PrivateZone console and click Add Zone. Set the Zone name to the domain suffix from the hbase.zookeeper.quorum value.

    2. In the new zone, click Add record to add an A record for each node in the EMR cluster. Set the Record type to A and keep the default TTL (1 minute). Then, configure the following parameters:

      • hostname: Enter the node name.

      • Record value: Enter the internal IP address of the corresponding node.

      For example, if an EMR cluster has one master node and two core nodes, you must add three A records.

  3. Associate the VPC of the exclusive resource group for Data Service.

    After adding the A records, return to the PrivateZone page. For the zone you created, click Associate VPC in the Operation column. Follow the on-screen instructions to select the region where the exclusive resource group is located and associate its VPC.

Step 3: Configure the security group

Finally, configure the HBase security group to allow the exclusive resource group for Data Service to access the HBase ports. The configuration steps are the same as for the same-VPC scenario. For more information, see HBase and the exclusive resource group for Data Service are in the same VPC.