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

SSLFactory#createSSLSocketFactory exception message is wrong

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.2-alpha
    • Fix Version/s: 2.9.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None

      Description

      If in SERVER model, the following code should throw exception indicating Factory is in SERVER mode, not in CLIENT mode. Otherwise, it could be confusing.

      SSLSocketFactory.java
      public SSLSocketFactory createSSLSocketFactory()
          throws GeneralSecurityException, IOException {
          if (mode != Mode.CLIENT) {
            throw new IllegalStateException("Factory is in CLIENT mode");
          }
          return context.getSocketFactory();
        }
      
      1. HADOOP-12895.003.patch
        2 kB
        Wei-Chiu Chuang
      2. HADOOP-12895.002.patch
        1 kB
        Wei-Chiu Chuang
      3. HADOOP-12895.001.patch
        0.8 kB
        Wei-Chiu Chuang

        Activity

        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Rev01: Updated exception message.

        Show
        jojochuang Wei-Chiu Chuang added a comment - Rev01: Updated exception message.
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Rev02: Exception message in SSLFactory#getHostnameVerifier has the same bug. Update it too.

        Show
        jojochuang Wei-Chiu Chuang added a comment - Rev02: Exception message in SSLFactory#getHostnameVerifier has the same bug. Update it too.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 9s 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 23s trunk passed
        +1 compile 5m 33s trunk passed with JDK v1.8.0_74
        +1 compile 6m 30s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 20s trunk passed
        +1 mvnsite 0m 55s trunk passed
        +1 mvneclipse 0m 14s trunk passed
        +1 findbugs 1m 32s trunk passed
        +1 javadoc 0m 51s trunk passed with JDK v1.8.0_74
        +1 javadoc 1m 2s trunk passed with JDK v1.7.0_95
        +1 mvninstall 0m 40s the patch passed
        +1 compile 5m 31s the patch passed with JDK v1.8.0_74
        +1 javac 5m 31s the patch passed
        +1 compile 6m 46s the patch passed with JDK v1.7.0_95
        +1 javac 6m 46s the patch passed
        +1 checkstyle 0m 21s the patch passed
        +1 mvnsite 0m 54s the patch passed
        +1 mvneclipse 0m 14s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 1m 55s the patch passed
        +1 javadoc 0m 57s the patch passed with JDK v1.8.0_74
        +1 javadoc 1m 6s the patch passed with JDK v1.7.0_95
        +1 unit 7m 9s hadoop-common in the patch passed with JDK v1.8.0_74.
        +1 unit 7m 17s hadoop-common in the patch passed with JDK v1.7.0_95.
        +1 asflicense 0m 22s Patch does not generate ASF License warnings.
        57m 46s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:0ca8df7
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12791689/HADOOP-12895.001.patch
        JIRA Issue HADOOP-12895
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux c74ab7f8dc9f 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
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 19ee185
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8802/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8802/console
        Powered by Apache Yetus 0.3.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 9s 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 23s trunk passed +1 compile 5m 33s trunk passed with JDK v1.8.0_74 +1 compile 6m 30s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 20s trunk passed +1 mvnsite 0m 55s trunk passed +1 mvneclipse 0m 14s trunk passed +1 findbugs 1m 32s trunk passed +1 javadoc 0m 51s trunk passed with JDK v1.8.0_74 +1 javadoc 1m 2s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 40s the patch passed +1 compile 5m 31s the patch passed with JDK v1.8.0_74 +1 javac 5m 31s the patch passed +1 compile 6m 46s the patch passed with JDK v1.7.0_95 +1 javac 6m 46s the patch passed +1 checkstyle 0m 21s the patch passed +1 mvnsite 0m 54s the patch passed +1 mvneclipse 0m 14s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 55s the patch passed +1 javadoc 0m 57s the patch passed with JDK v1.8.0_74 +1 javadoc 1m 6s the patch passed with JDK v1.7.0_95 +1 unit 7m 9s hadoop-common in the patch passed with JDK v1.8.0_74. +1 unit 7m 17s hadoop-common in the patch passed with JDK v1.7.0_95. +1 asflicense 0m 22s Patch does not generate ASF License warnings. 57m 46s Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12791689/HADOOP-12895.001.patch JIRA Issue HADOOP-12895 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux c74ab7f8dc9f 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 Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 19ee185 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8802/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8802/console Powered by Apache Yetus 0.3.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        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 48s trunk passed
        +1 compile 6m 23s trunk passed with JDK v1.8.0_74
        +1 compile 7m 4s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 20s trunk passed
        +1 mvnsite 1m 0s trunk passed
        +1 mvneclipse 0m 16s trunk passed
        +1 findbugs 1m 36s trunk passed
        +1 javadoc 0m 59s trunk passed with JDK v1.8.0_74
        +1 javadoc 1m 3s trunk passed with JDK v1.7.0_95
        +1 mvninstall 0m 40s the patch passed
        +1 compile 5m 33s the patch passed with JDK v1.8.0_74
        +1 javac 5m 33s the patch passed
        +1 compile 6m 29s the patch passed with JDK v1.7.0_95
        +1 javac 6m 29s the patch passed
        +1 checkstyle 0m 22s the patch passed
        +1 mvnsite 0m 53s the patch passed
        +1 mvneclipse 0m 14s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 1m 47s the patch passed
        +1 javadoc 0m 51s the patch passed with JDK v1.8.0_74
        +1 javadoc 1m 1s the patch passed with JDK v1.7.0_95
        +1 unit 6m 36s hadoop-common in the patch passed with JDK v1.8.0_74.
        +1 unit 6m 57s hadoop-common in the patch passed with JDK v1.7.0_95.
        +1 asflicense 0m 22s Patch does not generate ASF License warnings.
        58m 32s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:0ca8df7
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12791692/HADOOP-12895.002.patch
        JIRA Issue HADOOP-12895
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux f917e08929e9 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
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 19ee185
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8803/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8803/console
        Powered by Apache Yetus 0.3.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 48s trunk passed +1 compile 6m 23s trunk passed with JDK v1.8.0_74 +1 compile 7m 4s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 20s trunk passed +1 mvnsite 1m 0s trunk passed +1 mvneclipse 0m 16s trunk passed +1 findbugs 1m 36s trunk passed +1 javadoc 0m 59s trunk passed with JDK v1.8.0_74 +1 javadoc 1m 3s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 40s the patch passed +1 compile 5m 33s the patch passed with JDK v1.8.0_74 +1 javac 5m 33s the patch passed +1 compile 6m 29s the patch passed with JDK v1.7.0_95 +1 javac 6m 29s the patch passed +1 checkstyle 0m 22s the patch passed +1 mvnsite 0m 53s the patch passed +1 mvneclipse 0m 14s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 47s the patch passed +1 javadoc 0m 51s the patch passed with JDK v1.8.0_74 +1 javadoc 1m 1s the patch passed with JDK v1.7.0_95 +1 unit 6m 36s hadoop-common in the patch passed with JDK v1.8.0_74. +1 unit 6m 57s hadoop-common in the patch passed with JDK v1.7.0_95. +1 asflicense 0m 22s Patch does not generate ASF License warnings. 58m 32s Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12791692/HADOOP-12895.002.patch JIRA Issue HADOOP-12895 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux f917e08929e9 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 Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 19ee185 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8803/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8803/console Powered by Apache Yetus 0.3.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        andrew.wang Andrew Wang added a comment -

        Hi Wei-chiu, good spot here, do you think it's better to make the message say "Factory is not in <x> mode" or "Factory is not in <x> mode. Actual mode is <y>". so it matches up with the logic of the if check? We may never add another Mode to the enum, but it seems like good practice.

        Show
        andrew.wang Andrew Wang added a comment - Hi Wei-chiu, good spot here, do you think it's better to make the message say "Factory is not in <x> mode" or "Factory is not in <x> mode. Actual mode is <y>". so it matches up with the logic of the if check? We may never add another Mode to the enum, but it seems like good practice.
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Andrew Wang thanks for the suggestion.
        Yes indeed this will make it more clear. Attaching the updated patch. Please review again, thanks!

        Show
        jojochuang Wei-Chiu Chuang added a comment - Andrew Wang thanks for the suggestion. Yes indeed this will make it more clear. Attaching the updated patch. Please review again, thanks!
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 9s 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 7m 14s trunk passed
        +1 compile 6m 38s trunk passed with JDK v1.8.0_74
        +1 compile 6m 56s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 23s trunk passed
        +1 mvnsite 1m 1s trunk passed
        +1 mvneclipse 0m 14s trunk passed
        +1 findbugs 1m 39s trunk passed
        +1 javadoc 1m 0s trunk passed with JDK v1.8.0_74
        +1 javadoc 1m 6s trunk passed with JDK v1.7.0_95
        +1 mvninstall 0m 43s the patch passed
        +1 compile 6m 29s the patch passed with JDK v1.8.0_74
        +1 javac 6m 29s the patch passed
        +1 compile 6m 52s the patch passed with JDK v1.7.0_95
        +1 javac 6m 52s the patch passed
        +1 checkstyle 0m 23s the patch passed
        +1 mvnsite 0m 56s the patch passed
        +1 mvneclipse 0m 14s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 1m 53s the patch passed
        +1 javadoc 1m 0s the patch passed with JDK v1.8.0_74
        +1 javadoc 1m 9s the patch passed with JDK v1.7.0_95
        +1 unit 7m 53s hadoop-common in the patch passed with JDK v1.8.0_74.
        +1 unit 8m 1s hadoop-common in the patch passed with JDK v1.7.0_95.
        +1 asflicense 0m 21s Patch does not generate ASF License warnings.
        63m 27s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:0ca8df7
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12791918/HADOOP-12895.003.patch
        JIRA Issue HADOOP-12895
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux b11b5ed91404 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
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 49eedc7
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8816/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8816/console
        Powered by Apache Yetus 0.2.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 9s 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 7m 14s trunk passed +1 compile 6m 38s trunk passed with JDK v1.8.0_74 +1 compile 6m 56s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 23s trunk passed +1 mvnsite 1m 1s trunk passed +1 mvneclipse 0m 14s trunk passed +1 findbugs 1m 39s trunk passed +1 javadoc 1m 0s trunk passed with JDK v1.8.0_74 +1 javadoc 1m 6s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 43s the patch passed +1 compile 6m 29s the patch passed with JDK v1.8.0_74 +1 javac 6m 29s the patch passed +1 compile 6m 52s the patch passed with JDK v1.7.0_95 +1 javac 6m 52s the patch passed +1 checkstyle 0m 23s the patch passed +1 mvnsite 0m 56s the patch passed +1 mvneclipse 0m 14s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 53s the patch passed +1 javadoc 1m 0s the patch passed with JDK v1.8.0_74 +1 javadoc 1m 9s the patch passed with JDK v1.7.0_95 +1 unit 7m 53s hadoop-common in the patch passed with JDK v1.8.0_74. +1 unit 8m 1s hadoop-common in the patch passed with JDK v1.7.0_95. +1 asflicense 0m 21s Patch does not generate ASF License warnings. 63m 27s Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12791918/HADOOP-12895.003.patch JIRA Issue HADOOP-12895 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux b11b5ed91404 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 Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 49eedc7 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8816/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8816/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
        Hide
        andrew.wang Andrew Wang added a comment -

        LGTM thanks Wei-chiu, committing shortly.

        Show
        andrew.wang Andrew Wang added a comment - LGTM thanks Wei-chiu, committing shortly.
        Hide
        andrew.wang Andrew Wang added a comment -

        Pushed to trunk and branch-2, thanks Wei-Chiu!

        Show
        andrew.wang Andrew Wang added a comment - Pushed to trunk and branch-2, thanks Wei-Chiu!
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #9444 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9444/)
        HADOOP-12895. SSLFactory#createSSLSocketFactory exception message is (wang: rev a3cc6e2511e096ea9a54f500b59257866a1df66b)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/SSLFactory.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9444 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9444/ ) HADOOP-12895 . SSLFactory#createSSLSocketFactory exception message is (wang: rev a3cc6e2511e096ea9a54f500b59257866a1df66b) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/SSLFactory.java
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Thanks Andrew for review and commit!

        Show
        jojochuang Wei-Chiu Chuang added a comment - Thanks Andrew for review and commit!

          People

          • Assignee:
            jojochuang Wei-Chiu Chuang
            Reporter:
            jojochuang Wei-Chiu Chuang
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development