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

KMSClientProvider uses equalsIgnoreCase("application/json")

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.1
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: kms
    • Labels:
      None

      Description

      KMSClientProvider.call() validates the content type returned by going

      "application/json".equalsIgnoreCase(conn.getContentType())
      

      that's not going to work in all locales, not if upper case is being returned.

      1. HADOOP-12088.patch
        1 kB
        Brahma Reddy Battula

        Activity

        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        As per RFC specification type and sub type can be followed by parameters separated by ";"

        So, I think its sufficient to check as conn.getContentType().startsWIth("application/json")

        Steve Loughran please let me know your opinion.

        Show
        brahmareddy Brahma Reddy Battula added a comment - As per RFC specification type and sub type can be followed by parameters separated by ";" So, I think its sufficient to check as conn.getContentType().startsWIth("application/json") Steve Loughran please let me know your opinion.
        Hide
        stevel@apache.org Steve Loughran added a comment -

        yes to starts with, but the case conversion may also want to go toLower(EN_US) (oh, and handle a null content-type), which the first check does

        Show
        stevel@apache.org Steve Loughran added a comment - yes to starts with, but the case conversion may also want to go toLower(EN_US) (oh, and handle a null content-type), which the first check does
        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        I think, we no need to pass EN_US.Correct me If I am wrong....Attaching the patch,,kindly review..

        Show
        brahmareddy Brahma Reddy Battula added a comment - I think, we no need to pass EN_US.Correct me If I am wrong....Attaching the patch,,kindly review..
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 16m 29s 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 32s There were no new javac warning messages.
        +1 javadoc 9m 39s There were no new javadoc warning messages.
        +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings.
        +1 checkstyle 1m 4s There were no new checkstyle issues.
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 35s mvn install still works.
        +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
        +1 findbugs 1m 51s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 common tests 23m 7s Tests passed in hadoop-common.
            62m 16s  



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12739622/HADOOP-12088.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / 4c5da9b
        hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/6963/artifact/patchprocess/testrun_hadoop-common.txt
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/6963/testReport/
        Java 1.7.0_55
        uname Linux asf905.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-HADOOP-Build/6963/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 16m 29s 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 32s There were no new javac warning messages. +1 javadoc 9m 39s There were no new javadoc warning messages. +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 4s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 35s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 1m 51s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 23m 7s Tests passed in hadoop-common.     62m 16s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12739622/HADOOP-12088.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 4c5da9b hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/6963/artifact/patchprocess/testrun_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/6963/testReport/ Java 1.7.0_55 uname Linux asf905.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-HADOOP-Build/6963/console This message was automatically generated.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8185 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8185/)
        HADOOP-12088. KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8185 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8185/ ) HADOOP-12088 . KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #259 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/259/)
        HADOOP-12088. KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #259 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/259/ ) HADOOP-12088 . KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2208 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2208/)
        HADOOP-12088. KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2208 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2208/ ) HADOOP-12088 . KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #263 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/263/)
        HADOOP-12088. KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #263 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/263/ ) HADOOP-12088 . KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk #993 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/993/)
        HADOOP-12088. KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #993 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/993/ ) HADOOP-12088 . KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2190 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2190/)
        HADOOP-12088. KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2190 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2190/ ) HADOOP-12088 . KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #252 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/252/)
        HADOOP-12088. KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #252 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/252/ ) HADOOP-12088 . KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel) (stevel: rev 05fa3368f12d189a95a2d6cd8eebc6f7e3a719ee) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        Steve Loughran thanks a lot for your review and commit.

        Show
        brahmareddy Brahma Reddy Battula added a comment - Steve Loughran thanks a lot for your review and commit.

          People

          • Assignee:
            brahmareddy Brahma Reddy Battula
            Reporter:
            stevel@apache.org Steve Loughran
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development