Rate This Document
Findability
Accuracy
Completeness
Readability

Repairing Index Read

If index read repair is enabled, an index is used during data table query, and invalid index data is found, the index data is repaired to be consistent with that in the data table.

Scenarios

Data may fail to be written to an index table or a data table. As a result, invalid index data exists. If read repair is not enabled, invalid index data is also returned as valid data.

How to Use

  1. Log in to the management node server and stop the HBase service.
    /usr/local/hbase/bin/stop-hbase.sh
  2. Open the HBase configuration file hbase-site.xml.
    vi /usr/local/hbase/conf/hbase-site.xml
  3. Press i to enter the insert mode and change the values of the following parameters. If the parameters do not exist, add them.
    <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>

    The default value of hbase.regionserver.global.index.row.delete.age.threshold is 60000, in milliseconds. You can change the value based on your requirements.

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