Updated on 2024-12-13 GMT+08:00

Enabling the HBase Multicast Function

The HBase Multicast function involves two roles: Publisher (HMaster) and Listener (client). You can set hbase.status.published to true to enable this function. In MRS 3.5.0 and later versions, this function is enabled on the Publisher by default.

When the Multicast function is enabled, the Publisher observes the survival status of the current RegionServer. If there is a Dead RegionServer, the Publisher broadcasts the Dead RegionServer information. The listener configured with the broadcast address receives the information about the Dead RegionServer and automatically deletes the region location cache information on the Dead RegionServer from the connection established by the client. When the region is accessed next time, the listener obtains the latest location information so that the service side can quickly identify the faulty RegionServer and update the region location information cache.

Enabling the HBase Multicast Function

Currently, this function can be enabled on the HBase client running in an IPv4 Linux/Unix environment only. The client must be able to communicate with the service IP address of the HMaster node. Perform the following operations to enable the Multicast function based on service requirements:

  1. (Optional) This function is enabled and configured on the HMaster server by default. If there are other NICs besides the NICs mounted to the management IP address and service IP address on the node, log in to FusionInsight Manager, choose Cluster > Services > HBase > Configurations > All Configurations > HMaster (Role) > Customization, and add configurations in the hbase.hmaster.config.expandor customized parameter. The value of hbase.status.multicast.ni.name is the name of the NIC to which the service IP address is mounted.
  2. Log in to the node where the HBase client is installed as the client installation user.
  3. In HBase client installation directory/HBase/hbase/conf/hbase-site.xml, add and configure the parameters in Table 1 to enable the Multicast function of the client.

    Table 1 Parameters for enabling the function

    Parameter

    Description

    Value

    hbase.status.published

    If this parameter is set to true, the Multicast function is enabled on the client.

    true

    hbase.status.multicast.address.ip

    Broadcast address used by the Multicast feature. In an IPv4 network, the broadcast address is 226.1.1.3.

    226.1.1.3

    hbase.status.multicast.bind.address.ip

    Broadcast address bound to the client listener. In a Linux/Unix environment, the value must be the same as the broadcast address.

    226.1.1.3

    hbase.status.multicast.ni.name

    Name of the NIC used by the service IP address if a node has multiple NICs. This configuration is optional for a single-NIC node.

    -

    Refer to the following configurations:

    <property>
    <name>hbase.status.published</name>
    <value>true</value>
    </property>
    <property>
    <name>hbase.status.multicast.address.ip</name>
    <value>226.1.1.3</value>
    </property>
    <property>
    <name>hbase.status.multicast.bind.address.ip</name>
    <value>226.1.1.3</value>
    </property>

  4. Verify that the Multicast function is enabled on the client.

    Start read and write tasks on the HBase client and locate the RegionServer where the target region is located. Restart the RegionServer during read/write task execution. If "ClusterStatusListener: There is a new dead server" is displayed on the client, the multicast function is enabled.

    The following describes how to check whether the Multicast function is enabled for read and write tasks executed on the HBase Shell client:

    1. Switch to the client installation directory, configure environment variables, and authenticate the user.

      cd HBase client installation directory

      source bigdata_env

      kinit Component service user (skip this step if Kerberos authentication is disabled for the cluster (the cluster is in normal mode))

    1. Log in to the HBase client, create a table, and write data. Do not close the HBase client.

      hbase shell

      create 'test_multicast', 'f1'

      put 'test_multicast'.'row1','f1:q','value1'

      put 'test_multicast'.'row2','f1:q','value2'

      put 'test_multicast'.'row3','f1:q','value3'

    2. Log in to FusionInsight Manager, choose Cluster > Services > HBase, and click the HMaster(Host name, active) hyperlink on the right of HMaster WebUI to go to the HBase web UI.
    3. In the Tables area, click the table name test_multicast. In the Table Regions area, locate the RegionServer where the table region is located.
    4. On FusionInsight Manager, choose Cluster > Services > HBase > Instances, select the RegionServerServer instance queried in 4.d, and choose More > Restart Instance or Instance Rolling Restart.
    5. If the key log "client.ClusterStatusListener: There is a new dead server" is displayed in the HBase Shell, the multicast function is enabled.