After you configure the mappings between the HBase table and the Search index, the data that is written to the HBase table in real time is automatically synchronized to the Search index. However, to synchronize historical data in the HBase table, you must manually build an index for full data to complete the synchronization.
Build an index for full data
In HBase Shell, run the build_external_index
command to build an index for the historical data in the HBase table. The command is asynchronously run.
Note During the building process, Data Definition Language (DDL) operations on the HBase table are blocked until the index is built. However, this does not affect the reads and writes on the table.
hbase shell> build_external_index 'testTable'
View the building progress
The index for the historical data is built by the associated BDS instance. You can view the building progress in the BDS console.
- On the details page of the BDS instance that is associated with the HBase cluster, find the web console entrance.
- In the BDS console, click
Lindorm Search
and selectFull Data replication to Solr
- Click the name of the task of which you want to view the current building progress. The building progress is displayed. If the status is SUCCESS, the index is built.
Cancel the build task
You can stop an index build task by running the following command:
hbase> cancel_build_external_index 'testTable'
You can also click Abort to delete the task in the BDS console.