ITPub博客

首页 > 大数据 > Hadoop > HBase提示:failed because A clone should not have regions to restore

HBase提示:failed because A clone should not have regions to restore

原创 Hadoop 作者:joshliu 时间:2020-10-15 12:06:52 0 删除 编辑

【问题描述】

        在HBase中做RESTORE_SNAPSHOT时提示:failed because A clone should not have regions to restore,详细信息如下:

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/*





来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69985104/viewspace-2727074/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2020-10-09

  • 博文量
    78
  • 访问量
    74243