Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-20966

RestoreTool#getTableInfoPath should look for completed snapshot only

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha-1
    • None
    • None
    • Reviewed

    Description

      Janos Gub reported seeing the following error when running backup / restore test on Azure:

      2018-07-25 17:03:56,661|INFO|MainThread|machine.py:167 - run()||GUID=e7de7672-ebfd-402d-8f1f-68e7e8444cb1|org.apache.hadoop.hbase.snapshot.CorruptedSnapshotException: Couldn't read snapshot info from:wasb://hbase3-m30wub1711kond-115001@humbtesting8wua.blob.core.windows.net/user/hbase/backup_loc/backup_1532538064246/default/table_fnfawii1za/.hbase-snapshot/.tmp/.
      snapshotinfo
      2018-07-25 17:03:56,661|INFO|MainThread|machine.py:167 - run()||GUID=e7de7672-ebfd-402d-8f1f-68e7e8444cb1|at org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils.readSnapshotInfo(SnapshotDescriptionUtils.java:328)
      2018-07-25 17:03:56,661|INFO|MainThread|machine.py:167 - run()||GUID=e7de7672-ebfd-402d-8f1f-68e7e8444cb1|at org.apache.hadoop.hbase.backup.util.RestoreServerUtil.getTableDesc(RestoreServerUtil.java:237)
      2018-07-25 17:03:56,662|INFO|MainThread|machine.py:167 - run()||GUID=e7de7672-ebfd-402d-8f1f-68e7e8444cb1|at org.apache.hadoop.hbase.backup.util.RestoreServerUtil.restoreTableAndCreate(RestoreServerUtil.java:351)
      2018-07-25 17:03:56,662|INFO|MainThread|machine.py:167 - run()||GUID=e7de7672-ebfd-402d-8f1f-68e7e8444cb1|at org.apache.hadoop.hbase.backup.util.RestoreServerUtil.fullRestoreTable(RestoreServerUtil.java:186)
      

      Here is related code in master branch:

        Path getTableInfoPath(TableName tableName) throws IOException {
          Path tableSnapShotPath = getTableSnapshotPath(backupRootPath, tableName, backupId);
          Path tableInfoPath = null;
      
          // can't build the path directly as the timestamp values are different
          FileStatus[] snapshots = fs.listStatus(tableSnapShotPath);
      

      In the above code, we don't exclude incomplete snapshot, leading to exception later when reading snapshot info.

      Attachments

        1. 20966.v1.txt
          0.9 kB
          Ted Yu

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            yuzhihong@gmail.com Ted Yu
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment