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

Extract out jackson calls into an overrideable method in DelegationTokenAuthenticationHandler

    Details

    • Type: Improvement
    • Status: Patch Available
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      In Apache Solr, we use hadoop-auth for delegation tokens. However, because of the following lines, we need to import Jackson (old version).

      https://github.com/apache/hadoop/blob/branch-2.7/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticationHandler.java#L279

      If we could extract out the calls to ObjectMapper to another method, so that at Solr we could override it to do the Map -> json conversion using noggit, it would be helpful.

      Reference: SOLR-9542

      1. HADOOP-13672.patch
        1 kB
        Ishan Chattopadhyaya
      2. HADOOP-13672.patch
        2 kB
        Ishan Chattopadhyaya

        Activity

        Hide
        stevel@apache.org Steve Loughran added a comment -

        you might want to look at HADOOP-13332 as a fix for this, but an extracted method here is something wed be able to safely backport to 2.7.x, so of more immediate benefit

        Show
        stevel@apache.org Steve Loughran added a comment - you might want to look at HADOOP-13332 as a fix for this, but an extracted method here is something wed be able to safely backport to 2.7.x, so of more immediate benefit
        Hide
        noble.paul Noble Paul added a comment -

        The point is, we do not want to use jackson at all, because Solr uses another library. if the method is extracted out, it is an easy win without any effort from your side

        Show
        noble.paul Noble Paul added a comment - The point is, we do not want to use jackson at all, because Solr uses another library. if the method is extracted out, it is an easy win without any effort from your side
        Hide
        ichattopadhyaya Ishan Chattopadhyaya added a comment -

        Adding a patch for the proposed extraction.

        Show
        ichattopadhyaya Ishan Chattopadhyaya added a comment - Adding a patch for the proposed extraction.
        Hide
        xiaochen Xiao Chen added a comment -

        +1 pending jenkins. Looks to be a simple refactor, and I don't see any harm doing this.
        Targeting to 2.7.x per Steve's comment.

        Show
        xiaochen Xiao Chen added a comment - +1 pending jenkins. Looks to be a simple refactor, and I don't see any harm doing this. Targeting to 2.7.x per Steve's comment.
        Hide
        ichattopadhyaya Ishan Chattopadhyaya added a comment -

        Adding a simpler patch, based on Noble Paul's suggestion [0].
        Xiao Chen, please review. Thanks.

        [0] - https://github.com/apache/hadoop/compare/branch-2.7...noblepaul:patch-2

        Show
        ichattopadhyaya Ishan Chattopadhyaya added a comment - Adding a simpler patch, based on Noble Paul 's suggestion [0] . Xiao Chen , please review. Thanks. [0] - https://github.com/apache/hadoop/compare/branch-2.7...noblepaul:patch-2
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 12s 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 51s trunk passed
        +1 checkstyle 0m 24s trunk passed
        +1 mvnsite 0m 57s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 18s trunk passed
        +1 javadoc 0m 45s trunk passed
        +1 mvninstall 0m 36s the patch passed
        +1 compile 6m 45s the patch passed
        +1 javac 6m 45s the patch passed
        -0 checkstyle 0m 23s hadoop-common-project/hadoop-common: The patch generated 2 new + 60 unchanged - 0 fixed = 62 total (was 60)
        +1 mvnsite 0m 53s the patch passed
        +1 mvneclipse 0m 12s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 27s the patch passed
        +1 javadoc 0m 44s the patch passed
        -1 unit 6m 56s hadoop-common in the patch failed.
        +1 asflicense 0m 21s The patch does not generate ASF License warnings.
        37m 33s



        Reason Tests
        Failed junit tests hadoop.net.TestDNS



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HADOOP-13672
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831330/HADOOP-13672.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux df516de53696 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 607705c
        Default Java 1.8.0_101
        findbugs v3.0.0
        checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/10643/artifact/patchprocess/diff-checkstyle-hadoop-common-project_hadoop-common.txt
        unit https://builds.apache.org/job/PreCommit-HADOOP-Build/10643/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10643/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10643/console
        Powered by Apache Yetus 0.4.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 12s 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 51s trunk passed +1 checkstyle 0m 24s trunk passed +1 mvnsite 0m 57s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 18s trunk passed +1 javadoc 0m 45s trunk passed +1 mvninstall 0m 36s the patch passed +1 compile 6m 45s the patch passed +1 javac 6m 45s the patch passed -0 checkstyle 0m 23s hadoop-common-project/hadoop-common: The patch generated 2 new + 60 unchanged - 0 fixed = 62 total (was 60) +1 mvnsite 0m 53s the patch passed +1 mvneclipse 0m 12s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 27s the patch passed +1 javadoc 0m 44s the patch passed -1 unit 6m 56s hadoop-common in the patch failed. +1 asflicense 0m 21s The patch does not generate ASF License warnings. 37m 33s Reason Tests Failed junit tests hadoop.net.TestDNS Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HADOOP-13672 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831330/HADOOP-13672.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux df516de53696 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 607705c Default Java 1.8.0_101 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/10643/artifact/patchprocess/diff-checkstyle-hadoop-common-project_hadoop-common.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/10643/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10643/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10643/console Powered by Apache Yetus 0.4.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 24s 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 9m 15s trunk passed
        +1 compile 9m 21s trunk passed
        +1 checkstyle 0m 23s trunk passed
        +1 mvnsite 0m 58s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 21s trunk passed
        +1 javadoc 0m 45s trunk passed
        +1 mvninstall 0m 39s the patch passed
        +1 compile 6m 55s the patch passed
        +1 javac 6m 55s the patch passed
        +1 checkstyle 0m 22s the patch passed
        +1 mvnsite 0m 54s the patch passed
        +1 mvneclipse 0m 12s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 27s the patch passed
        +1 javadoc 0m 44s the patch passed
        -1 unit 7m 49s hadoop-common in the patch failed.
        +1 asflicense 0m 24s The patch does not generate ASF License warnings.
        43m 37s



        Reason Tests
        Failed junit tests hadoop.net.TestDNS



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HADOOP-13672
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831371/HADOOP-13672.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux ba79b213c4b1 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 607705c
        Default Java 1.8.0_101
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HADOOP-Build/10644/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10644/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10644/console
        Powered by Apache Yetus 0.4.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 24s 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 9m 15s trunk passed +1 compile 9m 21s trunk passed +1 checkstyle 0m 23s trunk passed +1 mvnsite 0m 58s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 21s trunk passed +1 javadoc 0m 45s trunk passed +1 mvninstall 0m 39s the patch passed +1 compile 6m 55s the patch passed +1 javac 6m 55s the patch passed +1 checkstyle 0m 22s the patch passed +1 mvnsite 0m 54s the patch passed +1 mvneclipse 0m 12s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 27s the patch passed +1 javadoc 0m 44s the patch passed -1 unit 7m 49s hadoop-common in the patch failed. +1 asflicense 0m 24s The patch does not generate ASF License warnings. 43m 37s Reason Tests Failed junit tests hadoop.net.TestDNS Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HADOOP-13672 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831371/HADOOP-13672.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux ba79b213c4b1 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 607705c Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HADOOP-Build/10644/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10644/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10644/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        xiaochen Xiao Chen added a comment -

        +1 on latest patch. Will hold off the commit for 24 hours in case Steve Loughran or others have any comments.

        Show
        xiaochen Xiao Chen added a comment - +1 on latest patch. Will hold off the commit for 24 hours in case Steve Loughran or others have any comments.
        Hide
        stevel@apache.org Steve Loughran added a comment -

        -1 pending a bit of discussion.

        1. Do you want jackson off the CP entirely? Or just marshall differently but retain Jackson on the CP? As the imports in this class probably mandate having jackson there.
        2. have you tested Solr with this patch and subclass?

        I'd like to be confident this patch actually meets your needs; I don't want to be going round in circles patching Hadoop until things stabilize

        Show
        stevel@apache.org Steve Loughran added a comment - -1 pending a bit of discussion. Do you want jackson off the CP entirely? Or just marshall differently but retain Jackson on the CP? As the imports in this class probably mandate having jackson there. have you tested Solr with this patch and subclass? I'd like to be confident this patch actually meets your needs; I don't want to be going round in circles patching Hadoop until things stabilize
        Hide
        xiaochen Xiao Chen added a comment -

        Ishan Chattopadhyaya Noble Paul could you please answer Steve's questions here? Thanks

        Show
        xiaochen Xiao Chen added a comment - Ishan Chattopadhyaya Noble Paul could you please answer Steve's questions here? Thanks
        Hide
        shv Konstantin Shvachko added a comment -

        Moving target version to 2.7.5 due to 2.7.4 release.

        Show
        shv Konstantin Shvachko added a comment - Moving target version to 2.7.5 due to 2.7.4 release.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 0s Docker mode activated.
        -1 patch 0m 5s HADOOP-13672 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.



        Subsystem Report/Notes
        JIRA Issue HADOOP-13672
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831371/HADOOP-13672.patch
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12876/console
        Powered by Apache Yetus 0.6.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 0s Docker mode activated. -1 patch 0m 5s HADOOP-13672 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help. Subsystem Report/Notes JIRA Issue HADOOP-13672 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831371/HADOOP-13672.patch Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12876/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.

          People

          • Assignee:
            ichattopadhyaya Ishan Chattopadhyaya
            Reporter:
            ichattopadhyaya Ishan Chattopadhyaya
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:

              Development