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

Fix HFile V1 Detector to handle AccessControlException for non-existant files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.96.0
    • 0.98.0, 0.96.0
    • None
    • None
    • Reviewed

    Description

      On some hadoop versions, fs.exists() throws an AccessControlException if there is a non-searchable inode in the file path. Versions such as 2.1.0-beta just returns false.
      This jira is to fix HFile V1 detector tool to avoid making such calls.

      See the below exception when running the tool on one hadoop version

      ERROR util.HFileV1Detector: org.apache.hadoop.security.AccessControlException: Permission denied: user=hbase, access=EXECUTE, inode="/hbase/.META./.tableinfo.0000000001":hbase:supergroup:-rw-r--r--
      	at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:234)
      	at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkTraverse(FSPermissionChecker.java:187)
      	at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:150)
      	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.java:5141)
      	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.java:5123)
      	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkTraverse(FSNamesystem.java:5102)
      	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getFileInfo(FSNamesystem.java:3265)
      	at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getFileInfo(NameNodeRpcServer.java:719)
      	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getFileInfo(ClientNamenodeProtocolServerSideTranslatorPB.java:692)
      	at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java:59628)
      	at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)
      	at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1026)
      	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2040)
      	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2036)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:396)
      	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1477)
      	at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2034)
      

      Attachments

        1. HBase-9509.patch
          1 kB
          Himanshu Vashishtha

        Activity

          People

            v.himanshu Himanshu Vashishtha
            v.himanshu Himanshu Vashishtha
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: