Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9851

Name node throws NPE when setPermission is called on a path that does not exist

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.7.1, 2.7.2
    • 2.8.0, 2.7.3, 3.0.0-alpha1
    • namenode
    • None
    • Reviewed

    Description

      Tried it on both Hadoop 2.7.1 and 2.7.2, and I'm getting the same error when setPermission is called on a path that does not exist:

      16/02/23 16:37:03.888 DEBUG security.UserGroupInformation:FSPermissionChecker.ja
      va:164 - ACCESS CHECK: org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker@299b19af, doCheckOwner=true, ancestorAccess=null, parentAccess=null, access=null, subAccess=null, ignoreEmptyDir=false
      16/02/23 16:37:03.889 DEBUG ipc.Server:ProtobufRpcEngine.java:631 - Served: setPermission queueTime= 3 procesingTime= 3 exception= NullPointerException
      16/02/23 16:37:03.890 WARN ipc.Server:Server.java:2068 - IPC Server handler 2 on 9000, call org.apache.hadoop.hdfs.protocol.ClientProtocol.setPermission from 127.0.0.1:36190 Call#21 Retry#0
      java.lang.NullPointerException
              at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkOwner(FSPermissionChecker.java:247)
              at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:227)
              at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:190)
              at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1720)
              at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1704)
              at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkOwner(FSDirectory.java:1673)
              at org.apache.hadoop.hdfs.server.namenode.FSDirAttrOp.setPermission(FSDirAttrOp.java:61)
              at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.setPermission(FSNamesystem.java:1653)
              at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.setPermission(NameNodeRpcServer.java:695)
              at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.setPermission(ClientNamenodeProtocolServerSideTranslatorPB.java:453)
              at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
              at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)
              at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:969)
              at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2049)
              at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2045)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAs(Subject.java:415)
              at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
              at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2043)
      

      I don't see this problem with Hadoop 2.6.x.
      The client that issues the setPermission call was compiled with Hadoop 2.2.0 libraries.

      Attachments

        1. HDFS-9851-branch-2.7.patch
          4 kB
          Brahma Reddy Battula
        2. HDFS-9851-002.patch
          5 kB
          Brahma Reddy Battula
        3. HDFS-9851.patch
          4 kB
          Brahma Reddy Battula

        Issue Links

          Activity

            People

              brahmareddy Brahma Reddy Battula
              davidyan David Yan
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: