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

Configuration#get return value optimization

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha4, 2.8.2
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The string array return value can be more efficiently determined and some general redundancies can be removed to improve the speed for Configuration.get.

      1. HADOOP-14240.1.patch
        3 kB
        Jonathan Eagles
      2. HADOOP-14240.2.patch
        3 kB
        Jonathan Eagles

        Activity

        Hide
        jeagles Jonathan Eagles added a comment -

        In my testing Configuration#get is roughly 25%-30% faster with the patch applied.

        Show
        jeagles Jonathan Eagles added a comment - In my testing Configuration#get is roughly 25%-30% faster with the patch applied.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 22s 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 12m 50s trunk passed
        +1 compile 14m 13s trunk passed
        +1 checkstyle 0m 38s trunk passed
        +1 mvnsite 1m 2s trunk passed
        +1 mvneclipse 0m 19s trunk passed
        +1 findbugs 1m 27s trunk passed
        +1 javadoc 0m 49s trunk passed
        +1 mvninstall 0m 37s the patch passed
        +1 compile 13m 30s the patch passed
        +1 javac 13m 30s the patch passed
        -0 checkstyle 0m 37s hadoop-common-project/hadoop-common: The patch generated 1 new + 165 unchanged - 9 fixed = 166 total (was 174)
        +1 mvnsite 0m 59s the patch passed
        +1 mvneclipse 0m 19s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 34s the patch passed
        +1 javadoc 0m 47s the patch passed
        -1 unit 8m 0s hadoop-common in the patch failed.
        +1 asflicense 0m 33s The patch does not generate ASF License warnings.
        60m 30s



        Reason Tests
        Failed junit tests hadoop.security.TestKDiag



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue HADOOP-14240
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12860504/HADOOP-14240.1.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 00091c0cf860 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 84ddedc
        Default Java 1.8.0_121
        findbugs v3.0.0
        checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/11929/artifact/patchprocess/diff-checkstyle-hadoop-common-project_hadoop-common.txt
        unit https://builds.apache.org/job/PreCommit-HADOOP-Build/11929/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11929/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11929/console
        Powered by Apache Yetus 0.5.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 22s 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 12m 50s trunk passed +1 compile 14m 13s trunk passed +1 checkstyle 0m 38s trunk passed +1 mvnsite 1m 2s trunk passed +1 mvneclipse 0m 19s trunk passed +1 findbugs 1m 27s trunk passed +1 javadoc 0m 49s trunk passed +1 mvninstall 0m 37s the patch passed +1 compile 13m 30s the patch passed +1 javac 13m 30s the patch passed -0 checkstyle 0m 37s hadoop-common-project/hadoop-common: The patch generated 1 new + 165 unchanged - 9 fixed = 166 total (was 174) +1 mvnsite 0m 59s the patch passed +1 mvneclipse 0m 19s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 34s the patch passed +1 javadoc 0m 47s the patch passed -1 unit 8m 0s hadoop-common in the patch failed. +1 asflicense 0m 33s The patch does not generate ASF License warnings. 60m 30s Reason Tests Failed junit tests hadoop.security.TestKDiag Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HADOOP-14240 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12860504/HADOOP-14240.1.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 00091c0cf860 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 84ddedc Default Java 1.8.0_121 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/11929/artifact/patchprocess/diff-checkstyle-hadoop-common-project_hadoop-common.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/11929/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11929/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11929/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        jeagles Jonathan Eagles added a comment -

        The majority of this optimization relies on the direct return value construction since it saves the construction cost of ArrayList and conversion from ArrayList<String> to String[]

        Show
        jeagles Jonathan Eagles added a comment - The majority of this optimization relies on the direct return value construction since it saves the construction cost of ArrayList and conversion from ArrayList<String> to String[]
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 16s 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 12m 44s trunk passed
        +1 compile 15m 48s trunk passed
        +1 checkstyle 0m 37s trunk passed
        +1 mvnsite 1m 2s trunk passed
        +1 mvneclipse 0m 20s trunk passed
        +1 findbugs 1m 43s trunk passed
        +1 javadoc 0m 53s trunk passed
        +1 mvninstall 0m 49s the patch passed
        +1 compile 14m 53s the patch passed
        +1 javac 14m 53s the patch passed
        +1 checkstyle 0m 39s hadoop-common-project/hadoop-common: The patch generated 0 new + 165 unchanged - 9 fixed = 165 total (was 174)
        +1 mvnsite 0m 59s the patch passed
        +1 mvneclipse 0m 19s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 34s the patch passed
        +1 javadoc 0m 50s the patch passed
        -1 unit 8m 41s hadoop-common in the patch failed.
        +1 asflicense 0m 33s The patch does not generate ASF License warnings.
        64m 36s



        Reason Tests
        Failed junit tests hadoop.fs.sftp.TestSFTPFileSystem
          hadoop.security.TestKDiag



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue HADOOP-14240
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12860510/HADOOP-14240.2.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 5530ecec0be1 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 84ddedc
        Default Java 1.8.0_121
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HADOOP-Build/11930/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11930/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11930/console
        Powered by Apache Yetus 0.5.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 16s 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 12m 44s trunk passed +1 compile 15m 48s trunk passed +1 checkstyle 0m 37s trunk passed +1 mvnsite 1m 2s trunk passed +1 mvneclipse 0m 20s trunk passed +1 findbugs 1m 43s trunk passed +1 javadoc 0m 53s trunk passed +1 mvninstall 0m 49s the patch passed +1 compile 14m 53s the patch passed +1 javac 14m 53s the patch passed +1 checkstyle 0m 39s hadoop-common-project/hadoop-common: The patch generated 0 new + 165 unchanged - 9 fixed = 165 total (was 174) +1 mvnsite 0m 59s the patch passed +1 mvneclipse 0m 19s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 34s the patch passed +1 javadoc 0m 50s the patch passed -1 unit 8m 41s hadoop-common in the patch failed. +1 asflicense 0m 33s The patch does not generate ASF License warnings. 64m 36s Reason Tests Failed junit tests hadoop.fs.sftp.TestSFTPFileSystem   hadoop.security.TestKDiag Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HADOOP-14240 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12860510/HADOOP-14240.2.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 5530ecec0be1 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 84ddedc Default Java 1.8.0_121 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HADOOP-Build/11930/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11930/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11930/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        ajisakaa Akira Ajisaka added a comment -

        LGTM, +1. Thank you for the optimization.

        Show
        ajisakaa Akira Ajisaka added a comment - LGTM, +1. Thank you for the optimization.
        Hide
        jeagles Jonathan Eagles added a comment -

        Thanks, Akira Ajisaka. I have committed this backwards compatible performance jira to trunk, branch-2, and branch-2.8.

        Show
        jeagles Jonathan Eagles added a comment - Thanks, Akira Ajisaka . I have committed this backwards compatible performance jira to trunk, branch-2, and branch-2.8.
        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
        djp Junping Du added a comment -

        Note: the commit message doesn't include JIRA number - for release managers to track.

        Show
        djp Junping Du added a comment - Note: the commit message doesn't include JIRA number - for release managers to track.

          People

          • Assignee:
            jeagles Jonathan Eagles
            Reporter:
            jeagles Jonathan Eagles
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development