Rate This Document
Findability
Accuracy
Completeness
Readability

Installing the Feature

Stop the HBase service on the management node and install the OmniHBaseGSI software on all nodes. OmniHBaseGSI is disabled by default in the cluster. To use this function, manually modify related configurations and restart the HBase service.

  1. Log in to the management node and stop the HBase service.
    1
    /usr/local/hbase/bin/stop-hbase.sh
    
  2. Install OmniHBaseGSI on all nodes.
    Upload the OmniHBaseGSI software installation package obtained in Table 3 to the server, decompress the package, and save the package to the /usr/local/hbase/lib directory.
    1
    2
    3
    4
    5
    6
    unzip BoostKit-hindex_1.0.0.zip
    tar -xvf boostkit-hbase-index-1.0.0-aarch64.tar.gz
    chmod 550 boostkit-hbase-index-1.0.0-aarch64.jar
    chmod 550 boostkit-hbase-index-client-1.0.0-aarch64.jar
    cp boostkit-hbase-index-1.0.0-aarch64.jar /usr/local/hbase/lib
    cp boostkit-hbase-index-client-1.0.0-aarch64.jar /usr/local/hbase/lib
    
  3. Modify the HBase configuration file on all nodes.
    1. To harden security hardening, set the permission on the HBase configuration file directory and log file directory used by OmniHBaseGSI to 750, and the permission on the HBase configuration file and log file to 640.
      1
      2
      3
      4
      chmod 750 /usr/local/hbase/conf/
      chmod 750 /usr/local/hbase/logs/
      chmod 640 /usr/local/hbase/conf/hbase-site.xml
      chmod 640 /usr/local/hbase/logs/*
      
    2. Open the HBase configuration file hbase-site.xml.
      1
      vi /usr/local/hbase/conf/hbase-site.xml
      
    3. Press i to enter the insert mode and add the following parameters. If any of these parameters is missing, the service may fail to be started.
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      15
      16
      <property>
      	<name>hbase.coprocessor.master.classes</name>
      	<value>com.huawei.boostkit.hindex.master.GlobalIndexMasterCoprocessor</value>
      </property>
      <property>
      	<name>hbase.coprocessor.regionserver.classes</name>
      	<value>com.huawei.boostkit.hindex.regionserver.GlobalIndexRegionServerCoprocessor</value>
      </property>
      <property>
      	<name>hbase.coprocessor.region.classes</name>
      	<value>com.huawei.boostkit.hindex.GlobalIndexRegionObserver</value>
      </property>
      <property>
      	<name>hbase.client.connection.impl</name>
      	<value>org.apache.hadoop.hbase.client.IndexConnectionImplementation</value>
      </property>
      
      Table 1 Parameter description

      Parameter

      Value

      Description

      hbase.coprocessor.master.classes

      com.huawei.boostkit.hindex.master.GlobalIndexMasterCoprocessor

      Adds an HMaster-level coprocessor to support index DDL operations, such as creating indexes, deleting indexes, and changing index status.

      hbase.coprocessor.regionserver.classes

      com.huawei.boostkit.hindex.regionserver.GlobalIndexRegionServerCoprocessor

      Adds a RegionServer-level coprocessor to manage functions such as index caching in RegionServer.

      hbase.coprocessor.region.classes

      com.huawei.boostkit.hindex.GlobalIndexRegionObserver

      Adds a Region-level coprocessor to support synchronous modification of the index table when the data table is modified.

      hbase.client.connection.impl

      org.apache.hadoop.hbase.client.IndexConnectionImplementation

      Adds the Connection implementation class to intercept scan requests and query the index table for acceleration.

    4. Optional: Add one or more of the following parameters as needed.
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      <property>
      	<name>hbase.regionserver.global.index.read.repair.enabled</name>
      	<value>true</value>
      </property>
      <property>
      	<name>hbase.regionserver.global.index.row.delete.age.threshold</name>
      	<value>60000</value>
      </property>
      <property>
      	<name>hbase.gsi.max.index.count.per.table</name>
      	<value>5</value>
      </property>
      <property>
      	<name>hbase.client.max.filter.depth</name>
      	<value>10</value>
      </property>
      <property>
      	<name>hbase.client.max.filter.length</name>
      	<value>50</value>
      </property>
      
      Table 2 Parameter description

      Parameter

      Value

      Description

      hbase.regionserver.global.index.read.repair.enabled

      true

      Enables the OmniHBaseGSI read repair function. The default value is false. It is recommended that you enable this function.

      hbase.regionserver.global.index.row.delete.age.threshold

      60000

      Sets the aging time of old data during index read repair. The default value is 1 minute. The unit is ms.

      hbase.gsi.max.index.count.per.table

      5

      Sets the maximum number of indexes supported by a single data table. The default value is 5.

      hbase.client.max.filter.depth

      10

      Sets the maximum nesting depth of the filters applied to a scan. The default value is 10. This configuration is used to prevent malicious filter attacks.

      hbase.client.max.filter.length

      50

      Sets the maximum length of the filters applied to a scan. The default value is 50. This configuration is used to prevent malicious filter attacks.

    5. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Log in to the management node server and restart the HBase service.
    1
    /usr/local/hbase/bin/start-hbase.sh