Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10909

De-duplicate code in ErasureCodingWorker#initializeStripedReadThreadPool and DFSClient#initThreadsNumForStripedReads

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha2
    • Fix Version/s: 3.0.0-alpha2
    • Component/s: None
    • Labels:
      None

      Description

      The two methods are mostly the same. Maybe it make sense to deduplicate the code. A good place to place the code is DFSUtilClient

      1. HDFS-10909.01.patch
        8 kB
        Manoj Govindassamy
      2. HDFS-10909.02.patch
        8 kB
        Manoj Govindassamy

        Activity

        Hide
        manojg Manoj Govindassamy added a comment -

        Attached patch to remove the code duplication. Made the ThreadPoolExecutor creation as a generic util which the EC readers are using now. Wei-Chiu Chuang, can you please take a look ?

        Show
        manojg Manoj Govindassamy added a comment - Attached patch to remove the code duplication. Made the ThreadPoolExecutor creation as a generic util which the EC readers are using now. Wei-Chiu Chuang , can you please take a look ?
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 17s 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.
        0 mvndep 0m 28s Maven dependency ordering for branch
        +1 mvninstall 8m 46s trunk passed
        +1 compile 1m 44s trunk passed
        +1 checkstyle 0m 34s trunk passed
        +1 mvnsite 1m 41s trunk passed
        +1 mvneclipse 0m 26s trunk passed
        +1 findbugs 3m 25s trunk passed
        +1 javadoc 1m 20s trunk passed
        0 mvndep 0m 7s Maven dependency ordering for patch
        +1 mvninstall 1m 32s the patch passed
        +1 compile 1m 41s the patch passed
        +1 javac 1m 41s the patch passed
        +1 checkstyle 0m 31s hadoop-hdfs-project: The patch generated 0 new + 70 unchanged - 1 fixed = 70 total (was 71)
        +1 mvnsite 1m 33s the patch passed
        +1 mvneclipse 0m 23s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 3m 44s the patch passed
        +1 javadoc 1m 19s the patch passed
        +1 unit 1m 0s hadoop-hdfs-client in the patch passed.
        -1 unit 60m 15s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 20s The patch does not generate ASF License warnings.
        92m 37s



        Reason Tests
        Failed junit tests hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFSStriped



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HDFS-10909
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831042/HDFS-10909.01.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux dcbe940e7c60 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 / 10be459
        Default Java 1.8.0_101
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/16941/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16941/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs-client hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16941/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 17s 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. 0 mvndep 0m 28s Maven dependency ordering for branch +1 mvninstall 8m 46s trunk passed +1 compile 1m 44s trunk passed +1 checkstyle 0m 34s trunk passed +1 mvnsite 1m 41s trunk passed +1 mvneclipse 0m 26s trunk passed +1 findbugs 3m 25s trunk passed +1 javadoc 1m 20s trunk passed 0 mvndep 0m 7s Maven dependency ordering for patch +1 mvninstall 1m 32s the patch passed +1 compile 1m 41s the patch passed +1 javac 1m 41s the patch passed +1 checkstyle 0m 31s hadoop-hdfs-project: The patch generated 0 new + 70 unchanged - 1 fixed = 70 total (was 71) +1 mvnsite 1m 33s the patch passed +1 mvneclipse 0m 23s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 3m 44s the patch passed +1 javadoc 1m 19s the patch passed +1 unit 1m 0s hadoop-hdfs-client in the patch passed. -1 unit 60m 15s hadoop-hdfs in the patch failed. +1 asflicense 0m 20s The patch does not generate ASF License warnings. 92m 37s Reason Tests Failed junit tests hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFSStriped Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10909 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831042/HDFS-10909.01.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux dcbe940e7c60 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 / 10be459 Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/16941/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16941/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs-client hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16941/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        manojg Manoj Govindassamy added a comment -

        Lei (Eddy) Xu, Wei-Chiu Chuang, can you please review the patch ?

        Show
        manojg Manoj Govindassamy added a comment - Lei (Eddy) Xu , Wei-Chiu Chuang , can you please review the patch ?
        Hide
        eddyxu Lei (Eddy) Xu added a comment -

        Hi, Manoj Govindassamy

        It looks good to me overall.

        Some nits:

        assert corePoolSize > 0;
        

        We can use Preconditions here.

        boolean callerRunsRejectedExecution
        

        Can we have a short name for this flag?

        +1 pending changes.

        Show
        eddyxu Lei (Eddy) Xu added a comment - Hi, Manoj Govindassamy It looks good to me overall. Some nits: assert corePoolSize > 0; We can use Preconditions here. boolean callerRunsRejectedExecution Can we have a short name for this flag? +1 pending changes.
        Hide
        manojg Manoj Govindassamy added a comment -

        Thanks for the review Lei (Eddy) Xu. Incorporated your comments. Please take a look.

        Show
        manojg Manoj Govindassamy added a comment - Thanks for the review Lei (Eddy) Xu . Incorporated your comments. Please take a look.
        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.
        0 mvndep 0m 8s Maven dependency ordering for branch
        +1 mvninstall 8m 35s trunk passed
        +1 compile 1m 48s trunk passed
        +1 checkstyle 0m 37s trunk passed
        +1 mvnsite 1m 55s trunk passed
        +1 mvneclipse 0m 38s trunk passed
        +1 findbugs 3m 42s trunk passed
        +1 javadoc 1m 16s trunk passed
        0 mvndep 0m 9s Maven dependency ordering for patch
        +1 mvninstall 1m 43s the patch passed
        +1 compile 1m 48s the patch passed
        +1 javac 1m 48s the patch passed
        +1 checkstyle 0m 37s hadoop-hdfs-project: The patch generated 0 new + 70 unchanged - 1 fixed = 70 total (was 71)
        +1 mvnsite 1m 44s the patch passed
        +1 mvneclipse 0m 26s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 3m 52s the patch passed
        +1 javadoc 1m 8s the patch passed
        +1 unit 0m 52s hadoop-hdfs-client in the patch passed.
        -1 unit 74m 59s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 19s The patch does not generate ASF License warnings.
        108m 18s



        Reason Tests
        Failed junit tests hadoop.hdfs.TestMaintenanceState



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HDFS-10909
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12836664/HDFS-10909.02.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 85b02b6b5653 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / f2800f5
        Default Java 1.8.0_101
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/17393/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17393/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs-client hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17393/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 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. 0 mvndep 0m 8s Maven dependency ordering for branch +1 mvninstall 8m 35s trunk passed +1 compile 1m 48s trunk passed +1 checkstyle 0m 37s trunk passed +1 mvnsite 1m 55s trunk passed +1 mvneclipse 0m 38s trunk passed +1 findbugs 3m 42s trunk passed +1 javadoc 1m 16s trunk passed 0 mvndep 0m 9s Maven dependency ordering for patch +1 mvninstall 1m 43s the patch passed +1 compile 1m 48s the patch passed +1 javac 1m 48s the patch passed +1 checkstyle 0m 37s hadoop-hdfs-project: The patch generated 0 new + 70 unchanged - 1 fixed = 70 total (was 71) +1 mvnsite 1m 44s the patch passed +1 mvneclipse 0m 26s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 3m 52s the patch passed +1 javadoc 1m 8s the patch passed +1 unit 0m 52s hadoop-hdfs-client in the patch passed. -1 unit 74m 59s hadoop-hdfs in the patch failed. +1 asflicense 0m 19s The patch does not generate ASF License warnings. 108m 18s Reason Tests Failed junit tests hadoop.hdfs.TestMaintenanceState Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10909 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12836664/HDFS-10909.02.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 85b02b6b5653 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / f2800f5 Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/17393/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17393/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs-client hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17393/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        manojg Manoj Govindassamy added a comment -

        Lei (Eddy) Xu, TestMaintenanceState failure is not related to the patch. thanks.

        Show
        manojg Manoj Govindassamy added a comment - Lei (Eddy) Xu , TestMaintenanceState failure is not related to the patch. thanks.
        Hide
        eddyxu Lei (Eddy) Xu added a comment -

        +1. Committed to trunk.

        Thanks for the hard work, Manoj Govindassamy.

        Show
        eddyxu Lei (Eddy) Xu added a comment - +1. Committed to trunk. Thanks for the hard work, Manoj Govindassamy .
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10757 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10757/)
        HDFS-10909. De-duplicate code in (lei: rev b59206190e6f773fc223bcb81774a09715551367)

        • (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/ErasureCodingWorker.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSUtilClient.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10757 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10757/ ) HDFS-10909 . De-duplicate code in (lei: rev b59206190e6f773fc223bcb81774a09715551367) (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/ErasureCodingWorker.java (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSUtilClient.java

          People

          • Assignee:
            manojg Manoj Govindassamy
            Reporter:
            jojochuang Wei-Chiu Chuang
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development