Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using HBase/ Common Issues About HBase/ Restrictions on using the Phoenix BulkLoad Tool
Updated on 2026-04-10 GMT+08:00
Restrictions on using the Phoenix BulkLoad Tool
Question
When the indexed field data is updated, if a batch of data exists in the user table, the BulkLoad tool cannot update the global and partial mutable indexes.
Answer
Problem Analysis
- Create a table.
CREATE TABLE TEST_TABLE( DATE varchar not null, NUM integer not null, SEQ_NUM integer not null, ACCOUNT1 varchar not null, ACCOUNTDES varchar, FLAG varchar, SALL double, CONSTRAINT PK PRIMARY KEY (DATE,NUM,SEQ_NUM,ACCOUNT1) );
- Create a global index.
CREATE INDEX TEST_TABLE_INDEX ON TEST_TABLE(ACCOUNT1,DATE,NUM,ACCOUNTDES,SEQ_NUM);
- Insert data.
UPSERT INTO TEST_TABLE (DATE,NUM,SEQ_NUM,ACCOUNT1,ACCOUNTDES,FLAG,SALL) values ('20201001',30201001,13,'367392332','sffa1','',''); - Execute the BulkLoad task to update data.
- Symptom: The existing index data cannot be directly updated. As a result, two pieces of index data exist.
+------------+-----------+-----------+---------------+----------------+ | :ACCOUNT1 | :DATE | :NUM | 0:ACCOUNTDES | :SEQ_NUM | +------------+-----------+-----------+---------------+----------------+ | 367392332 | 20201001 | 30201001 | sffa1 | 13 | | 367392332 | 20201001 | 30201001 | sffa888 | 13 | +------------+-----------+-----------+---------------+----------------+
Solution
- Delete the old index table.
DROP INDEX TEST_TABLE_INDEX ON TEST_TABLE;
- Create an index table in asynchronous mode.
CREATE INDEX TEST_TABLE_INDEX ON TEST_TABLE(ACCOUNT1,DATE,NUM,ACCOUNTDES,SEQ_NUM) ASYNC;
- Recreate an index.
hbase org.apache.phoenix.mapreduce.index.IndexTool --data-table TEST_TABLE --index-table TEST_TABLE_INDEX --output-path /user/test_table
Parent topic: Common Issues About HBase
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.