Hbase combat stepped pit

Write a few Hbase stepped pit it

Question 1: TRUNCATE the Table after the Region the number is 1 , so do not TRUNCATE the Table .

Hbase try not to execute truncate table. Once the execution region will become number 1, before the pre-partition is not used.

So if you want to delete the data can only be cleared to re-build the table!

 

 

 

Problems 2: the TTL is 7 days, this time stamp data inserted, timestamps are 7 data days ago, Hbase not check.

If it is said to do data migration, data prior to migration, it is necessary to remove the timestamp

Question 3: Hbase key the same coverage

rowkey same will be covered. At the same time remind yourself and readers before each mission to deliver their own be sure to check it again.

SD online yesterday met a mistake, left by their predecessors bug! You can be pulled directly chop! ! People feel that you are going into operation and maintenance of a son, a day filled pit predecessors. . .

3.1 Hbase online library is always only one record, very strange, and then began to research from storage and processing.

3.2 finally found the problem and found that they ran online a few months of the program, rowkey the same cause! You can not say exasperating air!

At the same time, give yourself mind you, and then later when troubleshooting problems ah, sometimes directly to the last step, step by step with, a very time-consuming.

To write a script Hbase batch execution 

#!/bin/bash

source /etc/profile
exec $HBASE_HOME/bin/hbase shell <<EOF
major_compact('t_abc')
disable 't_abc'
drop 't_abc'
create 't_abc', 'info'
EOF

 

Published 131 original articles · won praise 79 · views 310 000 +

Guess you like

Origin blog.csdn.net/qq_31780525/article/details/100162776