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

findbugs and javac warnings on trunk is non-zero

    Details

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

      Description

      Obsvered that there are Six findbugs warnings in trunk. They would have gone in, because of manual test-patch with a different findbugs version.

      1. patch-769.txt
        17 kB
        Amareshwari Sriramadasu

        Issue Links

          Activity

          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #113 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk/113/)
          . Make findbugs and javac warnings to zero. Contributed by Amareshwari Sriramadasu.

          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #113 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk/113/ ) . Make findbugs and javac warnings to zero. Contributed by Amareshwari Sriramadasu.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #76 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/76/)
          . Make findbugs and javac warnings to zero. Contributed by Amareshwari Sriramadasu.

          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #76 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/76/ ) . Make findbugs and javac warnings to zero. Contributed by Amareshwari Sriramadasu.
          Hide
          Sharad Agarwal added a comment -

          I just committed this. Thanks Amareshwari!

          Show
          Sharad Agarwal added a comment - I just committed this. Thanks Amareshwari!
          Hide
          Vinod Kumar Vavilapalli added a comment -

          Created MAPREDUCE-1108 so we don't need to create another issue like this one in future w.r.t findBugs warnings.

          Show
          Vinod Kumar Vavilapalli added a comment - Created MAPREDUCE-1108 so we don't need to create another issue like this one in future w.r.t findBugs warnings.
          Hide
          Sharad Agarwal added a comment -

          The javac warning due to Avro generated code would be fixed with Avro 1.2 release. I think we don't need to hold this jira for that. I will commit this tomorrow if no objections.

          Show
          Sharad Agarwal added a comment - The javac warning due to Avro generated code would be fixed with Avro 1.2 release. I think we don't need to hold this jira for that. I will commit this tomorrow if no objections.
          Hide
          Doug Cutting added a comment -

          > This is a javac warning and not findbugs.

          Ah. Then maybe we should change Avro to put @SuppressWarnings("all") in generated code?

          Show
          Doug Cutting added a comment - > This is a javac warning and not findbugs. Ah. Then maybe we should change Avro to put @SuppressWarnings("all") in generated code?
          Hide
          Amareshwari Sriramadasu added a comment -

          To ensure that none of the new patches reintroduce "non-deprecated" javac warnings, we should increase maxwarns in test-patch.sh to something like 10000 (from the current value of 1000) so that test-patch catches them.

          Created HADOOP-6300 for this.

          Show
          Amareshwari Sriramadasu added a comment - To ensure that none of the new patches reintroduce "non-deprecated" javac warnings, we should increase maxwarns in test-patch.sh to something like 10000 (from the current value of 1000) so that test-patch catches them. Created HADOOP-6300 for this.
          Hide
          Jothi Padmanabhan added a comment -

          To ensure that none of the new patches reintroduce "non-deprecated" javac warnings, we should increase maxwarns in test-patch.sh to something like 10000 (from the current value of 1000) so that test-patch catches them.

          Show
          Jothi Padmanabhan added a comment - To ensure that none of the new patches reintroduce "non-deprecated" javac warnings, we should increase maxwarns in test-patch.sh to something like 10000 (from the current value of 1000) so that test-patch catches them.
          Hide
          Sharad Agarwal added a comment -

          I don't think we should run findbugs on generated code.

          This is a javac warning and not findbugs. The subject is misleading. Actually it is fixing both findbugs and javac warnings. For findbugs we can suppress specific warnings, but I am not sure we can do the same for javac. One possible way to avoid these to have a different javac target with -nowarn for generated code.

          Show
          Sharad Agarwal added a comment - I don't think we should run findbugs on generated code. This is a javac warning and not findbugs. The subject is misleading. Actually it is fixing both findbugs and javac warnings. For findbugs we can suppress specific warnings, but I am not sure we can do the same for javac. One possible way to avoid these to have a different javac target with -nowarn for generated code.
          Hide
          Jothi Padmanabhan added a comment -

          +1. Changes look fine.

          Show
          Jothi Padmanabhan added a comment - +1. Changes look fine.
          Hide
          Amareshwari Sriramadasu added a comment -

          -1 core tests. Is known issue.

          Show
          Amareshwari Sriramadasu added a comment - -1 core tests. Is known issue.
          Hide
          Doug Cutting added a comment -

          > Although, there is a javac warning in Avro generated code [ ... ]

          I don't think we should run findbugs on generated code. It may also contain unused imports, etc. In general I don't think all style guidelines should apply to generated code. Generated code should be permitted to be ugly, if needed.

          Show
          Doug Cutting added a comment - > Although, there is a javac warning in Avro generated code [ ... ] I don't think we should run findbugs on generated code. It may also contain unused imports, etc. In general I don't think all style guidelines should apply to generated code. Generated code should be permitted to be ugly, if needed.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12421504/patch-769.txt
          against trunk revision 819740.

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

          +1 tests included. The patch appears to include 24 new or modified 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 warnings.

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

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

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/65/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/65/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/65/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/65/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/12421504/patch-769.txt against trunk revision 819740. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 24 new or modified 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 warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/65/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/65/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/65/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/65/console This message is automatically generated.
          Hide
          Amareshwari Sriramadasu added a comment -

          Patch makes findbugs warnings to zero.
          Fixes all javac warnings in core, examples and core-test, except deprecated warnings.
          Although, there is a javac warning in Avro generated code

              [javac] /home/amarsri/mapred/build/src/org/apache/hadoop/mapreduce/jobhistory/Events.java:632: warning: [cast] redundant cast to java.lang.Object
              [javac]       case 1: event = (Object)_value; break;
          

          This will be fixed by AVRO-137.

          Show
          Amareshwari Sriramadasu added a comment - Patch makes findbugs warnings to zero. Fixes all javac warnings in core, examples and core-test, except deprecated warnings. Although, there is a javac warning in Avro generated code [javac] /home/amarsri/mapred/build/src/org/apache/hadoop/mapreduce/jobhistory/Events.java:632: warning: [ cast ] redundant cast to java.lang. Object [javac] case 1: event = ( Object )_value; break ; This will be fixed by AVRO-137 .
          Hide
          Ravi Gummadi added a comment -

          Also need to handle javac warnings introduced because of broken test-patch. See HADOOP-6124

          Show
          Ravi Gummadi added a comment - Also need to handle javac warnings introduced because of broken test-patch. See HADOOP-6124

            People

            • Assignee:
              Amareshwari Sriramadasu
              Reporter:
              Amareshwari Sriramadasu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development