Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-4844

Counters / AbstractCounters have constant references not declared final

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.0, 3.0.0-alpha1
    • 2.8.0, 3.0.0-alpha1
    • None
    • None
    • Reviewed

    Description

      Counters have a number of immutable fields that have not been declared 'final'.

      For example, the field groups is not final. It is, however, accessed in a couple of methods that are declared 'synchronized'. While there is a happens-before relationship between these methods calls, there is none between the Counters object initialization and these synchronized methods.

      Attachments

        1. MAPREDUCE-4844-002.patch
          2 kB
          Brahma Reddy Battula
        2. MAPREDUCE-4844-002.patch
          1 kB
          Brahma Reddy Battula
        3. MAPREDUCE-4844-branch-1.patch
          3 kB
          Gera Shegalov

        Activity

          jira.shegalov Kindly review the attached patch!!!

          brahmareddy Brahma Reddy Battula added a comment - jira.shegalov Kindly review the attached patch!!!
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12708077/MAPREDUCE-4844-002.patch
          against trunk revision 232eca9.

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. There were no new javadoc warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core.

          Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5350//testReport/
          Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5350//console

          This message is automatically generated.

          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12708077/MAPREDUCE-4844-002.patch against trunk revision 232eca9. +1 @author . The patch does not contain any @author tags. -1 tests included . 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 . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core. Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5350//testReport/ Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5350//console This message is automatically generated.
          jira.shegalov Gera Shegalov added a comment -

          Thanks for working on this old JIRA, brahmareddy! Changes to mapred.Counters look fine to me. Can you also add a final qualifier to a bunch maps towards the top of the counters.AbstractCounters class?

          jira.shegalov Gera Shegalov added a comment - Thanks for working on this old JIRA, brahmareddy ! Changes to mapred.Counters look fine to me. Can you also add a final qualifier to a bunch maps towards the top of the counters.AbstractCounters class?

          Thanks a lot for review..Updated patch..Kindly Review...

          brahmareddy Brahma Reddy Battula added a comment - Thanks a lot for review..Updated patch..Kindly Review...
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12708750/MAPREDUCE-4844-002.patch
          against trunk revision 4922394.

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. There were no new javadoc warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core.

          Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5364//testReport/
          Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5364//console

          This message is automatically generated.

          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12708750/MAPREDUCE-4844-002.patch against trunk revision 4922394. +1 @author . The patch does not contain any @author tags. -1 tests included . 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 . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core. Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5364//testReport/ Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5364//console This message is automatically generated.
          jira.shegalov Gera Shegalov added a comment - +1 for https://issues.apache.org/jira/secure/attachment/12708750/MAPREDUCE-4844-002.patch . Committing this.
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-trunk-Commit #7506 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7506/)
          MAPREDUCE-4844. Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8)

          • hadoop-mapreduce-project/CHANGES.txt
          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java
          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #7506 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7506/ ) MAPREDUCE-4844 . Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8) hadoop-mapreduce-project/CHANGES.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java
          jira.shegalov Gera Shegalov added a comment -

          Committed to trunk and branch-2. Thanks brahmareddy for contributing the patch.

          jira.shegalov Gera Shegalov added a comment - Committed to trunk and branch-2. Thanks brahmareddy for contributing the patch.

          Thanks a lot @gera shegalov for review and commit!!!

          brahmareddy Brahma Reddy Battula added a comment - Thanks a lot @gera shegalov for review and commit!!!
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #153 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/153/)
          MAPREDUCE-4844. Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8)

          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java
          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java
          • hadoop-mapreduce-project/CHANGES.txt
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #153 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/153/ ) MAPREDUCE-4844 . Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java hadoop-mapreduce-project/CHANGES.txt
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #887 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/887/)
          MAPREDUCE-4844. Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8)

          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java
          • hadoop-mapreduce-project/CHANGES.txt
          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #887 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/887/ ) MAPREDUCE-4844 . Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java hadoop-mapreduce-project/CHANGES.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #144 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/144/)
          MAPREDUCE-4844. Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8)

          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java
          • hadoop-mapreduce-project/CHANGES.txt
          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #144 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/144/ ) MAPREDUCE-4844 . Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java hadoop-mapreduce-project/CHANGES.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Hdfs-trunk #2085 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2085/)
          MAPREDUCE-4844. Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8)

          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java
          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java
          • hadoop-mapreduce-project/CHANGES.txt
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk #2085 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2085/ ) MAPREDUCE-4844 . Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java hadoop-mapreduce-project/CHANGES.txt
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #154 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/154/)
          MAPREDUCE-4844. Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8)

          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java
          • hadoop-mapreduce-project/CHANGES.txt
          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #154 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/154/ ) MAPREDUCE-4844 . Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java hadoop-mapreduce-project/CHANGES.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2103 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2103/)
          MAPREDUCE-4844. Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8)

          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java
          • hadoop-mapreduce-project/CHANGES.txt
          • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2103 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2103/ ) MAPREDUCE-4844 . Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera) (gera: rev a0795c1e81685b812288cf2f4df6f8d23da30ab8) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java hadoop-mapreduce-project/CHANGES.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java

          People

            brahmareddy Brahma Reddy Battula
            jira.shegalov Gera Shegalov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: