Checking Consistency and Rebuilding Index Data
Scenarios
You can use the GSI tool to check the consistency between table data and index data. If they are inconsistent, use this tool to rebuild index data.
How to Use
Run the following command on the HBase client to check data consistency. If data is inconsistent, index data will be rebuilt. The consistency check result is saved to the {NameSpace where the data table is}:GSI_INCONSISTENCY_TABLE table.
hbase org.apache.hadoop.hbase.hindex.global.tools.GlobalHIndexConsistencyTool -dt table1 -n idx3 -src BOTH -r
The parameters are described as follows:
- -dt,--data-table: indicates the name of the data table where you want to check the consistency.
- -n,--index-name: indicates the name of the index where you want to check the consistency.
- -src,--source: indicates source tables used in the check. The default value is BOTH. The following modes are supported:
- INDEX_TABLE_SOURCE: The index table is used as the source table.
- DATA_TABLE_SOURCE: The data table is used as the source table.
- BOTH: Both index tables and data tables are used as the source tables.
- -r,--repair: indicates the index data rebuilding option. The index data will be repaired after the check.
- (Optional) -sc,--scan-caching: indicates the size of scan caching in a MapReduce job for consistency check or index data rebuilding.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot