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

Fix Wrong FileSystem when running `filesystem` on non-HDFS storage

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

Details

    Description

      recently we found a bug that when running hbck filesystem -f on a non-HDFS and caused Wrong FS error and cannot move forward.

      this change fix this problem and use FSUtils.getCurrentFileSystem to respect the root directory of what we set with hbase.rootdir in stead of just using fs.defaultFS

      e.g. this is one of the captured ERROR message

       

      Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: s3://xyz/data/default/abc, expected: hdfs://xyz/
              at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:737)
              at org.apache.hadoop.hdfs.DistributedFileSystem.getPathName(DistributedFileSystem.java:233)
              at org.apache.hadoop.hdfs.DistributedFileSystem.listStatusInternal(DistributedFileSystem.java:1045)
              at org.apache.hadoop.hdfs.DistributedFileSystem.access$1000(DistributedFileSystem.java:131)
              at org.apache.hadoop.hdfs.DistributedFileSystem$24.doCall(DistributedFileSystem.java:1112)
              at org.apache.hadoop.hdfs.DistributedFileSystem$24.doCall(DistributedFileSystem.java:1109)
              at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
              at org.apache.hadoop.hdfs.DistributedFileSystem.listStatus(DistributedFileSystem.java:1119)
              at org.apache.hadoop.hbase.util.FSUtils.listStatusWithStatusFilter(FSUtils.java:1530)
              at org.apache.hbase.hbck1.HFileCorruptionChecker.checkTableDir(HFileCorruptionChecker.java:320)
              at org.apache.hbase.hbck1.HFileCorruptionChecker.checkTables(HFileCorruptionChecker.java:431)
              at org.apache.hbase.FileSystemFsck.fsck(FileSystemFsck.java:87)
              at org.apache.hbase.HBCK2.doCommandLine(HBCK2.java:721)
              at org.apache.hbase.HBCK2.run(HBCK2.java:631)
              at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
              at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
              at org.apache.hbase.HBCK2.main(HBCK2.java:865)
      
       

      Attachments

        Activity

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

          People

            taklwu Tak-Lon (Stephen) Wu
            taklwu Tak-Lon (Stephen) Wu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment