Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11674

oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static

    Details

    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      A common optimization in the io classes for Input/Output Streams is to save a single length-1 byte array to use in single byte read/write calls.

      CryptoInputStream and CryptoOutputStream both attempt to follow this practice but mistakenly mark the array as static. That means that only a single instance of each can be present in a JVM safely.

        Activity

        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12702711/HADOOP-11674.1.patch
        against trunk revision 8d88691.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. 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. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5853//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5853//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12702711/HADOOP-11674.1.patch against trunk revision 8d88691. +1 @author . The patch does not contain any @author tags. -1 tests included . 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 . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5853//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5853//console This message is automatically generated.
        Hide
        hitliuyi Yi Liu added a comment -

        +1, oneByteBuf should be non-static, otherwise there may be issue for read() in multi threads.

        Show
        hitliuyi Yi Liu added a comment - +1, oneByteBuf should be non-static, otherwise there may be issue for read() in multi threads.
        Hide
        hitliuyi Yi Liu added a comment -

        Committed to trunk and branch-2. Thanks Sean Busbey for the contribution.

        Show
        hitliuyi Yi Liu added a comment - Committed to trunk and branch-2. Thanks Sean Busbey for the contribution.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #7266 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7266/)
        HADOOP-11674. oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #7266 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7266/ ) HADOOP-11674 . oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #123 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/123/)
        HADOOP-11674. oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #123 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/123/ ) HADOOP-11674 . oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #857 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/857/)
        HADOOP-11674. oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #857 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/857/ ) HADOOP-11674 . oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2055 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2055/)
        HADOOP-11674. oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2055 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2055/ ) HADOOP-11674 . oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #114 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/114/)
        HADOOP-11674. oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #114 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/114/ ) HADOOP-11674 . oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #123 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/123/)
        HADOOP-11674. oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #123 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/123/ ) HADOOP-11674 . oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2073 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2073/)
        HADOOP-11674. oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2073 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2073/ ) HADOOP-11674 . oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu) (yliu: rev 5e9b8144d54f586803212a0bdd8b1c25bdbb1e97) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        vinodkv Vinod Kumar Vavilapalli added a comment -

        Pulled this into 2.6.1 after Akira Ajisaka verified that the patch applies cleanly. Ran compilation before the push.

        Show
        vinodkv Vinod Kumar Vavilapalli added a comment - Pulled this into 2.6.1 after Akira Ajisaka verified that the patch applies cleanly. Ran compilation before the push.

          People

          • Assignee:
            busbey Sean Busbey
            Reporter:
            busbey Sean Busbey
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development