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

Fix wrong use of BytesWritable in FSEditLogOp#RenameOp

    Details

    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      After readField using BytesWritable, the data length should be writable.getLength(), instead of writable.getBytes().length which is the buffer length.
      This will cause returned Rename[] is longer than expected and may include some incorrect values (Currently they are Rename#NONE, and have not caused problem but code logic is incorrect).

      BytesWritable writable = new BytesWritable();
      writable.readFields(in);
      
      byte[] bytes = writable.getBytes();
      Rename[] options = new Rename[bytes.length];
      
      for (int i = 0; i < bytes.length; i++) {
        options[i] = Rename.valueOf(bytes[i]);
      }
      

        Activity

        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 14m 35s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 tests included 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 javac 7m 30s There were no new javac warning messages.
        +1 javadoc 9m 36s There were no new javadoc warning messages.
        +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings.
        -1 checkstyle 2m 13s The applied patch generated 1 new checkstyle issues (total was 361, now 361).
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 34s mvn install still works.
        +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
        +1 findbugs 3m 2s The patch does not introduce any new Findbugs (version 2.0.3) warnings.
        +1 native 3m 13s Pre-build of native portion
        +1 hdfs tests 164m 54s Tests passed in hadoop-hdfs.
            207m 36s  



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12663087/HDFS-6885.001.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / a319771
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/10732/artifact/patchprocess/diffcheckstylehadoop-hdfs.txt
        hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/10732/artifact/patchprocess/testrun_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/10732/testReport/
        Java 1.7.0_55
        uname Linux asf907.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/10732/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 14m 35s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. -1 tests included 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 javac 7m 30s There were no new javac warning messages. +1 javadoc 9m 36s There were no new javadoc warning messages. +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings. -1 checkstyle 2m 13s The applied patch generated 1 new checkstyle issues (total was 361, now 361). +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 34s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 3m 2s The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 native 3m 13s Pre-build of native portion +1 hdfs tests 164m 54s Tests passed in hadoop-hdfs.     207m 36s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12663087/HDFS-6885.001.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / a319771 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/10732/artifact/patchprocess/diffcheckstylehadoop-hdfs.txt hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/10732/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/10732/testReport/ Java 1.7.0_55 uname Linux asf907.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HDFS-Build/10732/console This message was automatically generated.
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 14m 36s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 tests included 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 javac 7m 27s There were no new javac warning messages.
        +1 javadoc 9m 33s There were no new javadoc warning messages.
        +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings.
        -1 checkstyle 2m 14s The applied patch generated 1 new checkstyle issues (total was 361, now 361).
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 36s mvn install still works.
        +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse.
        +1 findbugs 3m 3s The patch does not introduce any new Findbugs (version 2.0.3) warnings.
        +1 native 3m 14s Pre-build of native portion
        +1 hdfs tests 166m 3s Tests passed in hadoop-hdfs.
            208m 44s  



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12663087/HDFS-6885.001.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / a319771
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/10759/artifact/patchprocess/diffcheckstylehadoop-hdfs.txt
        hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/10759/artifact/patchprocess/testrun_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/10759/testReport/
        Java 1.7.0_55
        uname Linux asf902.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/10759/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 14m 36s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. -1 tests included 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 javac 7m 27s There were no new javac warning messages. +1 javadoc 9m 33s There were no new javadoc warning messages. +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings. -1 checkstyle 2m 14s The applied patch generated 1 new checkstyle issues (total was 361, now 361). +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 36s mvn install still works. +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse. +1 findbugs 3m 3s The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 native 3m 14s Pre-build of native portion +1 hdfs tests 166m 3s Tests passed in hadoop-hdfs.     208m 44s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12663087/HDFS-6885.001.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / a319771 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/10759/artifact/patchprocess/diffcheckstylehadoop-hdfs.txt hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/10759/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/10759/testReport/ Java 1.7.0_55 uname Linux asf902.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HDFS-Build/10759/console This message was automatically generated.
        Hide
        vinodkv Vinod Kumar Vavilapalli added a comment -

        Moving bugs out of previously closed releases into the next minor release 2.8.0.

        Show
        vinodkv Vinod Kumar Vavilapalli added a comment - Moving bugs out of previously closed releases into the next minor release 2.8.0.
        Hide
        wheat9 Haohui Mai added a comment -

        +1. Committing.

        Show
        wheat9 Haohui Mai added a comment - +1. Committing.
        Hide
        wheat9 Haohui Mai added a comment -

        I've committed the patch to trunk and branch-2. Thanks Yi Liu for the contribution.

        Show
        wheat9 Haohui Mai added a comment - I've committed the patch to trunk and branch-2. Thanks Yi Liu for the contribution.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8848 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8848/)
        HDFS-6885. Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8848 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8848/ ) HDFS-6885 . Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2638 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2638/)
        HDFS-6885. Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2638 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2638/ ) HDFS-6885 . Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #698 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/698/)
        HDFS-6885. Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #698 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/698/ ) HDFS-6885 . Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #709 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/709/)
        HDFS-6885. Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #709 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/709/ ) HDFS-6885 . Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk #1434 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1434/)
        HDFS-6885. Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #1434 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1434/ ) HDFS-6885 . Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2567 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2567/)
        HDFS-6885. Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2567 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2567/ ) HDFS-6885 . Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #629 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/629/)
        HDFS-6885. Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #629 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/629/ ) HDFS-6885 . Fix wrong use of BytesWritable in FSEditLogOp#RenameOp. (wheat9: rev bfbcfe73644db6c047d774c4a461da27915eef84) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

          People

          • Assignee:
            hitliuyi Yi Liu
            Reporter:
            hitliuyi Yi Liu
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development