Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-6232

OfflineEditsViewer throws a NPE on edits containing ACL modifications

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 2.4.0
    • Fix Version/s: 2.4.1
    • Component/s: tools
    • Labels:
      None

      Description

      The OfflineEditsViewer using the XML parser will through a NPE when using an edit with a SET_ACL op.

      [root@hdfs-nfs current]# hdfs oev -i edits_0000000000000000001-0000000000000000007 -o fsedits.out
      14/04/10 14:14:18 ERROR offlineEditsViewer.OfflineEditsBinaryLoader: Got RuntimeException at position 505
      Encountered exception. Exiting: null
      java.lang.NullPointerException
      	at org.apache.hadoop.hdfs.util.XMLUtils.mangleXmlString(XMLUtils.java:122)
      	at org.apache.hadoop.hdfs.util.XMLUtils.addSaxString(XMLUtils.java:193)
      	at org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.appendAclEntriesToXml(FSEditLogOp.java:4085)
      	at org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.access$3300(FSEditLogOp.java:132)
      	at org.apache.hadoop.hdfs.server.namenode.FSEditLogOp$SetAclOp.toXml(FSEditLogOp.java:3528)
      	at org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.outputToXml(FSEditLogOp.java:3928)
      	at org.apache.hadoop.hdfs.tools.offlineEditsViewer.XmlEditsVisitor.visitOp(XmlEditsVisitor.java:116)
      	at org.apache.hadoop.hdfs.tools.offlineEditsViewer.OfflineEditsBinaryLoader.loadEdits(OfflineEditsBinaryLoader.java:80)
      	at org.apache.hadoop.hdfs.tools.offlineEditsViewer.OfflineEditsViewer.go(OfflineEditsViewer.java:142)
      	at org.apache.hadoop.hdfs.tools.offlineEditsViewer.OfflineEditsViewer.run(OfflineEditsViewer.java:228)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
      	at org.apache.hadoop.hdfs.tools.offlineEditsViewer.OfflineEditsViewer.main(OfflineEditsViewer.java:237)
      [root@hdfs-nfs current]# 
      

      This is reproducible by setting an acl on a file and then running the OEV on the editsinprogress file.

      The stats and binary parsers run OK.

      1. HDFS-6232.2.patch
        4 kB
        Akira AJISAKA
      2. HDFS-6232.patch
        3 kB
        Akira AJISAKA

        Issue Links

          Activity

          Stephen Chu created issue -
          Akira AJISAKA made changes -
          Field Original Value New Value
          Assignee Akira AJISAKA [ ajisakaa ]
          Akira AJISAKA made changes -
          Attachment HDFS-6232.patch [ 12639741 ]
          Akira AJISAKA made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Akira AJISAKA made changes -
          Attachment HDFS-6232.2.patch [ 12639853 ]
          Colin Patrick McCabe made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Fix Version/s 2.4.1 [ 12326696 ]
          Resolution Fixed [ 1 ]
          Chris Nauroth made changes -
          Link This issue relates to HDFS-4685 [ HDFS-4685 ]
          Arun C Murthy made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Akira AJISAKA
              Reporter:
              Stephen Chu
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development