Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-2084

Deprecated org.apache.hadoop.util package in MapReduce produces deprecations in Common classes in Eclipse

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.21.0
    • Fix Version/s: 0.22.0
    • Component/s: documentation
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      As reported in this thread the classes in org.apache.hadoop.util from the Common JAR, like Tool, are marked as deprecated by Eclipse, even though they are not deprecated. The fix is to mark the individual classes in the MapReduce org.apache.hadoop.util class as deprecated, not the whole package.

      1. MAPREDUCE-2084.patch
        0.7 kB
        Tom White
      2. MAPREDUCE-2084.patch
        1 kB
        Tom White

        Activity

        Hide
        Tom White added a comment -

        Patch that removes package-info.java.

        Show
        Tom White added a comment - Patch that removes package-info.java.
        Hide
        Nigel Daley added a comment -

        Tom, shouldn't this patch also add the appropriate deprecation annotations for the individual classes? It's a little unclear from the thread on MAPREDUCE-1623 (that created this file) what should be deprecated.

        Show
        Nigel Daley added a comment - Tom, shouldn't this patch also add the appropriate deprecation annotations for the individual classes? It's a little unclear from the thread on MAPREDUCE-1623 (that created this file) what should be deprecated.
        Hide
        Tom White added a comment -

        Nigel, the individual classes in MapReduce's org.apache.hadoop.util package (LinuxMemoryCalculatorPlugin, MemoryCalculatorPlugin, ProcessTree, ProcfsBasedProcessTree) are already marked as deprecated. The reason that I added a package-info.java class originally was so that I could mark the whole package as @InterfaceAudience.Private, and not have the package show up at all in the MapReduce Javadoc. Without this file the package appears in the Javadoc but is empty, since all the classes are Private themselves. Thinking about it more, the better fix is to keep the package-info.java file, but remove the @Deprecated annotation, since this is the part that is tripping up Eclipse.

        Show
        Tom White added a comment - Nigel, the individual classes in MapReduce's org.apache.hadoop.util package (LinuxMemoryCalculatorPlugin, MemoryCalculatorPlugin, ProcessTree, ProcfsBasedProcessTree) are already marked as deprecated. The reason that I added a package-info.java class originally was so that I could mark the whole package as @InterfaceAudience.Private, and not have the package show up at all in the MapReduce Javadoc. Without this file the package appears in the Javadoc but is empty, since all the classes are Private themselves. Thinking about it more, the better fix is to keep the package-info.java file, but remove the @Deprecated annotation, since this is the part that is tripping up Eclipse.
        Hide
        Nigel Daley added a comment -

        +1 to just removing @Deprecated

        Show
        Nigel Daley added a comment - +1 to just removing @Deprecated
        Hide
        Tom White added a comment -

        Here's a patch that removes @Deprecated from package-info.java.

        Show
        Tom White added a comment - Here's a patch that removes @Deprecated from package-info.java.
        Hide
        Todd Lipcon added a comment -

        +1

        Show
        Todd Lipcon added a comment - +1
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12457467/MAPREDUCE-2084.patch
        against trunk revision 1054873.

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

        +0 tests included. The patch appears to be a documentation patch that doesn't require tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

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

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

        -1 core tests. The patch failed these core unit tests:
        org.apache.hadoop.mapred.TestControlledMapReduceJob

        -1 contrib tests. The patch failed contrib unit tests.

        -1 system test framework. The patch failed system test framework compile.

        Test results: https://hudson.apache.org/hudson/job/PreCommit-MAPREDUCE-Build/9//testReport/
        Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-MAPREDUCE-Build/9//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://hudson.apache.org/hudson/job/PreCommit-MAPREDUCE-Build/9//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12457467/MAPREDUCE-2084.patch against trunk revision 1054873. +1 @author. The patch does not contain any @author tags. +0 tests included. The patch appears to be a documentation patch that doesn't require tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these core unit tests: org.apache.hadoop.mapred.TestControlledMapReduceJob -1 contrib tests. The patch failed contrib unit tests. -1 system test framework. The patch failed system test framework compile. Test results: https://hudson.apache.org/hudson/job/PreCommit-MAPREDUCE-Build/9//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-MAPREDUCE-Build/9//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-MAPREDUCE-Build/9//console This message is automatically generated.
        Hide
        Tom White added a comment -

        The test failures are not related to this patch.

        Show
        Tom White added a comment - The test failures are not related to this patch.
        Hide
        Nigel Daley added a comment -

        Thanks Tom! I just committed this to trunk and branch-0.22

        Show
        Nigel Daley added a comment - Thanks Tom! I just committed this to trunk and branch-0.22
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #575 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/575/)
        MAPREDUCE-2084. Remove deprecate annotation from package javadoc file. (Contributed by tomwhite)

        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #575 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/575/ ) MAPREDUCE-2084 . Remove deprecate annotation from package javadoc file. (Contributed by tomwhite)
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-22-branch #33 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-22-branch/33/)

        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-22-branch #33 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-22-branch/33/ )
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #643 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk/643/)

        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #643 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk/643/ )

          People

          • Assignee:
            Tom White
            Reporter:
            Tom White
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development