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

CreateEditsLog throws NullPointerException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: hdfs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      When trying to create edit logs through CreateEditsLog, the following exception is encountered.

      Exception in thread "main" java.lang.NullPointerException
      at java.io.File.<init>(File.java:415)
      at org.apache.hadoop.hdfs.server.namenode.NNStorage.getStorageDirectory(NNStorage.java:343)
      at org.apache.hadoop.hdfs.server.namenode.FSImageTestUtil.createStandaloneEditLog(FSImageTestUtil.java:200)
      at org.apache.hadoop.hdfs.server.namenode.CreateEditsLog.main(CreateEditsLog.java:205)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.hadoop.util.RunJar.run(RunJar.java:239)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:153)

      This happens as Mockito is unable to access package protected method NNStorage#getStorageDirectory
      We need to change the access of this method to public

      1. HDFS-11128.000.patch
        0.9 kB
        Hanisha Koneru

        Activity

        Hide
        arpitagarwal Arpit Agarwal added a comment -

        +1 pending Jenkins.

        Show
        arpitagarwal Arpit Agarwal added a comment - +1 pending Jenkins.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 14s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
        +1 mvninstall 6m 46s trunk passed
        +1 compile 0m 46s trunk passed
        +1 checkstyle 0m 25s trunk passed
        +1 mvnsite 0m 51s trunk passed
        +1 mvneclipse 0m 12s trunk passed
        +1 findbugs 1m 41s trunk passed
        +1 javadoc 0m 39s trunk passed
        +1 mvninstall 0m 45s the patch passed
        +1 compile 0m 42s the patch passed
        +1 javac 0m 42s the patch passed
        +1 checkstyle 0m 22s the patch passed
        +1 mvnsite 0m 50s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 49s the patch passed
        +1 javadoc 0m 40s the patch passed
        -1 unit 57m 6s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 18s The patch does not generate ASF License warnings.
        75m 31s



        Reason Tests
        Failed junit tests hadoop.hdfs.TestAppendSnapshotTruncate
          hadoop.hdfs.tools.TestDFSAdmin



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:e809691
        JIRA Issue HDFS-11128
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12838468/HDFS-11128.000.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 0dcb3f810d43 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 93eeb13
        Default Java 1.8.0_101
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/17521/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17521/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17521/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 14s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 6m 46s trunk passed +1 compile 0m 46s trunk passed +1 checkstyle 0m 25s trunk passed +1 mvnsite 0m 51s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 41s trunk passed +1 javadoc 0m 39s trunk passed +1 mvninstall 0m 45s the patch passed +1 compile 0m 42s the patch passed +1 javac 0m 42s the patch passed +1 checkstyle 0m 22s the patch passed +1 mvnsite 0m 50s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 49s the patch passed +1 javadoc 0m 40s the patch passed -1 unit 57m 6s hadoop-hdfs in the patch failed. +1 asflicense 0m 18s The patch does not generate ASF License warnings. 75m 31s Reason Tests Failed junit tests hadoop.hdfs.TestAppendSnapshotTruncate   hadoop.hdfs.tools.TestDFSAdmin Subsystem Report/Notes Docker Image:yetus/hadoop:e809691 JIRA Issue HDFS-11128 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12838468/HDFS-11128.000.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 0dcb3f810d43 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 93eeb13 Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/17521/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17521/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17521/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        +1, Nice catch, Hanisha Koneru..

        Test Failures are unrelated.

        HDFS-11129 to track TestAppendSnapshotTruncate and
        HDFS-11122 to track TestDFSAdmin

        will commit shortly.

        Show
        brahmareddy Brahma Reddy Battula added a comment - +1, Nice catch, Hanisha Koneru .. Test Failures are unrelated. HDFS-11129 to track TestAppendSnapshotTruncate and HDFS-11122 to track TestDFSAdmin will commit shortly.
        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        Committed to trunk,branch-2 and branch-2.8.

        Thanks Hanisha Koneru for contributions and thanks to Arpit Agarwal for review.

        Show
        brahmareddy Brahma Reddy Battula added a comment - Committed to trunk,branch-2 and branch-2.8. Thanks Hanisha Koneru for contributions and thanks to Arpit Agarwal for review.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10819 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10819/)
        HDFS-11128. CreateEditsLog throws NullPointerException. Contributed by (brahma: rev 1ae57f0f75695178dc135b0c259d066f7da31c9d)

        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10819 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10819/ ) HDFS-11128 . CreateEditsLog throws NullPointerException. Contributed by (brahma: rev 1ae57f0f75695178dc135b0c259d066f7da31c9d) (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java
        Hide
        hanishakoneru Hanisha Koneru added a comment - - edited

        Thank you Arpit Agarwal and Brahma Reddy Battula] for reviewing and committing the patch.

        Show
        hanishakoneru Hanisha Koneru added a comment - - edited Thank you Arpit Agarwal and Brahma Reddy Battula ] for reviewing and committing the patch.

          People

          • Assignee:
            hanishakoneru Hanisha Koneru
            Reporter:
            hanishakoneru Hanisha Koneru
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development