Trafodion Troubleshooting-failed because A clone should not have regions to restore

现象

在HBase中做RESTORE_SNAPSHOT时报错,

hbase(main):022:0* restore_snapshot 'RLZYGLXT_FILE_snapshot'

ERROR: org.apache.hadoop.hbase.snapshot.RestoreSnapshotException: clone snapshot={ ss=RLZYGLXT_FILE_snapshot table=RLZYGLXT_FILE type=FLUSH } failed because A clone should not have regions to restore
        at org.apache.hadoop.hbase.master.snapshot.CloneSnapshotHandler.handleCreateHdfsRegions(CloneSnapshotHandler.java:132)
        at org.apache.hadoop.hbase.master.handler.CreateTableHandler.handleCreateTable(CreateTableHandler.java:269)
        at org.apache.hadoop.hbase.master.handler.CreateTableHandler.process(CreateTableHandler.java:205)
        at org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:129)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: A clone should not have regions to restore
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)
        at org.apache.hadoop.hbase.master.snapshot.CloneSnapshotHandler.handleCreateHdfsRegions(CloneSnapshotHandler.java:116)
        ... 6 more

Here is some help for this command:
Restore a specified snapshot.
The restore will replace the content of the original table,
bringing back the content to the snapshot state.
The table must be disabled.

Examples:
  hbase> restore_snapshot 'snapshotName'

分析

之前使用HDFS用户执行的CloneSnapshot,导致/hbase相关目录的owner从hbase改变为hdfs。且/hbase/.tmp下已经有相关对象的region。

解决

删除/hbase/.tmp下面的内容并重新运行RESTORE_SNAPSHOT。

hadoop fs -rmr /hbase/.tmp/*

你可能感兴趣的:(HBase)