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

hbase restore gives a misleading message if the table doesn't exist

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

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None
    • Reviewed

    Description

      Carter Shanklin reported the following:

      This backup path and ID exist. When an existing table name is used:

      [vagrant@hdp250-hbase ~]$ sudo -u hbase hbase restore /tmp/backup_incremental $FULL_BACKUP_ID TEST_DATA
      2016-05-10 18:05:22,380 ERROR [main] impl.RestoreClientImpl: Existing table found in the restore target, please add "-overwrite" option in the command if you mean to restore to these existing tables
      2016-05-10 18:05:22,380 INFO  [main] impl.RestoreClientImpl: Existing table list in restore target: [TEST_DATA]
      2016-05-10 18:05:22,380 ERROR [main] impl.RestoreClientImpl: ERROR: restore failed with error: Existing table found in target while no "-overwrite" option found
      java.io.IOException: Existing table found in target while no "-overwrite" option found
      

      If I use a table name that doesn't exist I get this:

      [vagrant@hdp250-hbase ~]$ sudo -u hbase hbase restore /tmp/backup_incremental $FULL_BACKUP_ID fda
      java.io.IOException: Could not find backup manifest for backup_1462900212093 in /tmp/backup_incremental
      

      The error message suggests there is some manifest file under /tmp/backup_incremental/backup_1462900212093 and that probably this directory backup_1462900212093 doesn't exist. Looking at the code, it is actually drilling down into a table at this point which is not obvious to me.

      If the message said something like "could not find backup manifest (.backup.manifest) for table X within /base/path" I think this would be a lot easier to diagnose.

      Attachments

        1. 16088.v1.txt
          0.9 kB
          Ted Yu
        2. 16088.v2.txt
          0.9 kB
          Ted Yu

        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:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment