Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-6855

Specify charset when create String in CredentialsTestJob

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha4, 2.8.2
    • Component/s: None
    • Labels:

      Description

            String secretValueStr = new String (secretValue);
      

      should be

            String secretValueStr = new String(secretValue, StandardCharsets.UTF_8);
      

        Activity

        Hide
        vinodkv Vinod Kumar Vavilapalli added a comment -

        2.8.1 became a security release. Moving fix-version to 2.8.2 after the fact.

        Show
        vinodkv Vinod Kumar Vavilapalli added a comment - 2.8.1 became a security release. Moving fix-version to 2.8.2 after the fact.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Jenkins build Hadoop-trunk-Commit #11361 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11361/)
        MAPREDUCE-6855. Specify charset when create String in (aajisaka: rev 14413989cac9acc1fa6f8d330fac32f772613325)

        • (edit) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/CredentialsTestJob.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Jenkins build Hadoop-trunk-Commit #11361 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11361/ ) MAPREDUCE-6855 . Specify charset when create String in (aajisaka: rev 14413989cac9acc1fa6f8d330fac32f772613325) (edit) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/CredentialsTestJob.java
        Hide
        ajisakaa Akira Ajisaka added a comment -

        Committed this to trunk, branch-2, and branch-2.8. Thanks Kai Sasaki for the contribution!

        Show
        ajisakaa Akira Ajisaka added a comment - Committed this to trunk, branch-2, and branch-2.8. Thanks Kai Sasaki for the contribution!
        Hide
        ajisakaa Akira Ajisaka added a comment -

        +1

        Show
        ajisakaa Akira Ajisaka added a comment - +1
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 27s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 11m 58s trunk passed
        +1 compile 0m 23s trunk passed
        +1 checkstyle 0m 17s trunk passed
        +1 mvnsite 0m 24s trunk passed
        +1 mvneclipse 0m 16s trunk passed
        +1 findbugs 0m 23s trunk passed
        +1 javadoc 0m 13s trunk passed
        +1 mvninstall 0m 19s the patch passed
        +1 compile 0m 18s the patch passed
        +1 javac 0m 18s the patch passed
        +1 checkstyle 0m 14s the patch passed
        +1 mvnsite 0m 20s the patch passed
        +1 mvneclipse 0m 11s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 0m 27s the patch passed
        +1 javadoc 0m 10s the patch passed
        -1 unit 113m 9s hadoop-mapreduce-client-jobclient in the patch failed.
        +1 asflicense 0m 25s The patch does not generate ASF License warnings.
        130m 33s



        Reason Tests
        Timed out junit tests org.apache.hadoop.mapred.TestMRIntermediateDataEncryption



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12856296/MAPREDUCE-6855.01.patch
        JIRA Issue MAPREDUCE-6855
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 301c05249b74 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 3536ce0
        Default Java 1.8.0_121
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6912/artifact/patchprocess/patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-jobclient.txt
        unit test logs https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6912/artifact/patchprocess/patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-jobclient.txt
        Test Results https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6912/testReport/
        modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient U: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient
        Console output https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6912/console
        Powered by Apache Yetus 0.3.0 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 27s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 11m 58s trunk passed +1 compile 0m 23s trunk passed +1 checkstyle 0m 17s trunk passed +1 mvnsite 0m 24s trunk passed +1 mvneclipse 0m 16s trunk passed +1 findbugs 0m 23s trunk passed +1 javadoc 0m 13s trunk passed +1 mvninstall 0m 19s the patch passed +1 compile 0m 18s the patch passed +1 javac 0m 18s the patch passed +1 checkstyle 0m 14s the patch passed +1 mvnsite 0m 20s the patch passed +1 mvneclipse 0m 11s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 0m 27s the patch passed +1 javadoc 0m 10s the patch passed -1 unit 113m 9s hadoop-mapreduce-client-jobclient in the patch failed. +1 asflicense 0m 25s The patch does not generate ASF License warnings. 130m 33s Reason Tests Timed out junit tests org.apache.hadoop.mapred.TestMRIntermediateDataEncryption Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12856296/MAPREDUCE-6855.01.patch JIRA Issue MAPREDUCE-6855 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 301c05249b74 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 3536ce0 Default Java 1.8.0_121 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6912/artifact/patchprocess/patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-jobclient.txt unit test logs https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6912/artifact/patchprocess/patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-jobclient.txt Test Results https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6912/testReport/ modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient U: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient Console output https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6912/console Powered by Apache Yetus 0.3.0 http://yetus.apache.org This message was automatically generated.
        Hide
        ajisakaa Akira Ajisaka added a comment -

        Do you think we need to detect this type of bug even in test code? I'm wondering it might be overkill.

        Agreed that it might be overkill. Thank you for taking this issue on.

        Show
        ajisakaa Akira Ajisaka added a comment - Do you think we need to detect this type of bug even in test code? I'm wondering it might be overkill. Agreed that it might be overkill. Thank you for taking this issue on.
        Hide
        lewuathe Kai Sasaki added a comment -

        Sangjin Lee Akira Ajisaka Thanks for pointing out. Do you think we need to detect this type of bug even in test code? I'm wondering it might be overkill.
        Anyway we can fix the code in CredentialsTestJob.

        Show
        lewuathe Kai Sasaki added a comment - Sangjin Lee Akira Ajisaka Thanks for pointing out. Do you think we need to detect this type of bug even in test code? I'm wondering it might be overkill. Anyway we can fix the code in CredentialsTestJob .
        Hide
        sjlee0 Sangjin Lee added a comment -

        Thanks.

        Show
        sjlee0 Sangjin Lee added a comment - Thanks.
        Hide
        ajisakaa Akira Ajisaka added a comment -

        It would be great if we can catch things like this with a findbugs rule.

        Yes, findbugs can detect this bug pattern, but only production code. Test code is ignored by default.

        Show
        ajisakaa Akira Ajisaka added a comment - It would be great if we can catch things like this with a findbugs rule. Yes, findbugs can detect this bug pattern, but only production code. Test code is ignored by default.
        Hide
        sjlee0 Sangjin Lee added a comment -

        It would be great if we can catch things like this with a findbugs rule. Do you know if that is straightforward?

        Show
        sjlee0 Sangjin Lee added a comment - It would be great if we can catch things like this with a findbugs rule. Do you know if that is straightforward?

          People

          • Assignee:
            lewuathe Kai Sasaki
            Reporter:
            ajisakaa Akira Ajisaka
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development