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

Refactor code to make it more readable, minor maybePrintStats bug

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: tools/distcp
    • Labels:
      None

      Description

      This is related to HADOOP-11827 patch from few days ago. I've noticed a minor bug in maybePrintStats logic which is called only when new directory is processed, and prints every 100K objects (effectively, there is a very low probability it'll ever print stats). The reason for this bug is that I was previously printing stats for every new directory, and later decided it's nicer to print stats for large number of new "objects" (files or directories) instead.

      This is a minor issue - and since I'm refactoring this I've also changed the minor retry logic to make code nicer and more readable.

      1. HADOOP-11876.patch
        2 kB
        Zoran Dimitrijevic

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2124 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2124/)
        HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2124 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2124/ ) HADOOP-11876 . Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #175 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/175/)
        HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #175 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/175/ ) HADOOP-11876 . Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #165 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/165/)
        HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #165 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/165/ ) HADOOP-11876 . Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2106 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2106/)
        HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475)

        • hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2106 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2106/ ) HADOOP-11876 . Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475) hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #908 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/908/)
        HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #908 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/908/ ) HADOOP-11876 . Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #174 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/174/)
        HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475)

        • hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #174 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/174/ ) HADOOP-11876 . Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475) hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-trunk-Commit #7668 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7668/)
        HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #7668 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7668/ ) HADOOP-11876 . Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) (raviprak: rev a287d2fb77d9873b61c6ab24134993d784ae8475) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
        Hide
        raviprak Ravi Prakash added a comment -

        Thanks for your contribution Zoran. I've committed this to trunk and branch-2

        Show
        raviprak Ravi Prakash added a comment - Thanks for your contribution Zoran. I've committed this to trunk and branch-2
        Hide
        raviprak Ravi Prakash added a comment -

        +1. lgtm. Checking in shortly

        Show
        raviprak Ravi Prakash added a comment - +1. lgtm. Checking in shortly
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 14m 35s 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 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 javac 7m 30s There were no new javac warning messages.
        +1 javadoc 9m 25s 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 7m 51s There were no new checkstyle issues.
        +1 install 1m 34s mvn install still works.
        +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
        +1 findbugs 0m 38s The patch does not introduce any new Findbugs (version 2.0.3) warnings.
        +1 tools/hadoop tests 6m 16s Tests passed in hadoop-distcp.
            48m 48s  



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12727961/HADOOP-11876.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / cf6c8a1
        hadoop-distcp test log https://builds.apache.org/job/PreCommit-HADOOP-Build/6174/artifact/patchprocess/testrun_hadoop-distcp.txt
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/6174/testReport/
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6174/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 14m 35s 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 whitespace 0m 0s The patch has no lines that end in whitespace. +1 javac 7m 30s There were no new javac warning messages. +1 javadoc 9m 25s 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 7m 51s There were no new checkstyle issues. +1 install 1m 34s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 0m 38s The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 tools/hadoop tests 6m 16s Tests passed in hadoop-distcp.     48m 48s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12727961/HADOOP-11876.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / cf6c8a1 hadoop-distcp test log https://builds.apache.org/job/PreCommit-HADOOP-Build/6174/artifact/patchprocess/testrun_hadoop-distcp.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/6174/testReport/ Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6174/console This message was automatically generated.

          People

          • Assignee:
            3opan Zoran Dimitrijevic
            Reporter:
            3opan Zoran Dimitrijevic
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved:

              Development