Hadoop Common
  1. Hadoop Common
  2. HADOOP-5864

Fix DMI and OBL findbugs in packages hdfs and metrics

    Details

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

      Description

      This issue is to fix the following findbugs:
      DMI in org.apache.hadoop.hdfs.server.namenode.INodeDirectory.getExistingPathINodes(byte[][], INode[])
      OBL in org.apache.hadoop.hdfs.server.datanode.DataStorage.linkBlocks(File, File, int)
      OBL in org.apache.hadoop.hdfs.server.datanode.FSDataset.createBlockWriteStreams(File, File)
      OBL in org.apache.hadoop.hdfs.server.datanode.FSDataset.getTmpInputStreams(Block, long, long)
      OBL in org.apache.hadoop.metrics.ContextFactory.setAttributes()

      1. findbugs3.hdfs.patch
        0.9 kB
        Suresh Srinivas
      2. findBugs2.patch
        7 kB
        Hairong Kuang
      3. findBugs1.patch
        7 kB
        Hairong Kuang
      4. findBugs.patch
        7 kB
        Hairong Kuang

        Activity

        Hide
        Hairong Kuang added a comment -

        OBLs reported in FSDataset are not real bugs. So this patch put them in the findbugs exclude file. This patch fix the rest of the bugs. It also fixed improper handling of streams in FSShell and DatanodeBlockInfo.

        Show
        Hairong Kuang added a comment - OBLs reported in FSDataset are not real bugs. So this patch put them in the findbugs exclude file. This patch fix the rest of the bugs. It also fixed improper handling of streams in FSShell and DatanodeBlockInfo.
        Hide
        Suresh Srinivas added a comment -

        +1

        Please add a brief comment in findbugsExcludeFile.xml to describe the reason for exclusion. Also creating a bug to track getting rid of copyBytes version that closes the streams in the method instead of the caller of the method would be nice.

        Show
        Suresh Srinivas added a comment - +1 Please add a brief comment in findbugsExcludeFile.xml to describe the reason for exclusion. Also creating a bug to track getting rid of copyBytes version that closes the streams in the method instead of the caller of the method would be nice.
        Hide
        Hairong Kuang added a comment -

        This patch additionally adds a comment in the findbugs exclude file. Once this patch is committed, I will file a jira to deprecate the method copyBytes that allows to close the streams in the method instead of the caller of the method

        Show
        Hairong Kuang added a comment - This patch additionally adds a comment in the findbugs exclude file. Once this patch is committed, I will file a jira to deprecate the method copyBytes that allows to close the streams in the method instead of the caller of the method
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12408499/findBugs1.patch
        against trunk revision 777330.

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

        +1 tests included. The patch appears to include 3 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 Eclipse classpath. The patch retains Eclipse classpath integrity.

        -1 release audit. The applied patch generated 492 release audit warnings (more than the trunk's current 491 warnings).

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

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

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/377/testReport/
        Release audit warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/377/artifact/trunk/current/releaseAuditDiffWarnings.txt
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/377/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/377/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/377/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/12408499/findBugs1.patch against trunk revision 777330. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 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 Eclipse classpath. The patch retains Eclipse classpath integrity. -1 release audit. The applied patch generated 492 release audit warnings (more than the trunk's current 491 warnings). +1 core tests. The patch passed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/377/testReport/ Release audit warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/377/artifact/trunk/current/releaseAuditDiffWarnings.txt Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/377/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/377/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/377/console This message is automatically generated.
        Hide
        Hairong Kuang added a comment -

        Resubmit the patch to be synced with the trunk.

        Show
        Hairong Kuang added a comment - Resubmit the patch to be synced with the trunk.
        Hide
        Hairong Kuang added a comment -

        ant testpatch result:
        [exec] +1 overall.
        [exec]
        [exec] +1 @author. The patch does not contain any @author tags.
        [exec]
        [exec] +1 tests included. The patch appears to include 3 new or modified tests.
        [exec]
        [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
        [exec]
        [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
        [exec]
        [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
        [exec]
        [exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
        [exec]
        [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
        [exec]

        All core tests were passed except for TestJobHistory reported in HADOOP-5920.

        Show
        Hairong Kuang added a comment - ant testpatch result: [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 3 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. [exec] All core tests were passed except for TestJobHistory reported in HADOOP-5920 .
        Hide
        Hairong Kuang added a comment -

        I've just committed this.

        Show
        Hairong Kuang added a comment - I've just committed this.
        Hide
        Hairong Kuang added a comment -

        HADOOP-5943 is filed to deprecate copyBytes versions that close the pass-in streams.

        Show
        Hairong Kuang added a comment - HADOOP-5943 is filed to deprecate copyBytes versions that close the pass-in streams.
        Hide
        Suresh Srinivas added a comment -

        After project split, the change made to findbugExcludeFile.xml is missing in the HDFS subproject. Attaching a patch to introduce the change again.

        Show
        Suresh Srinivas added a comment - After project split, the change made to findbugExcludeFile.xml is missing in the HDFS subproject. Attaching a patch to introduce the change again.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        The changed was committed by Hairong before. We should investigate why the change disappeared.

        Show
        Tsz Wo Nicholas Sze added a comment - The changed was committed by Hairong before. We should investigate why the change disappeared.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        The changed was committed by Hairong before. We should investigate why the change disappeared.

        Show
        Tsz Wo Nicholas Sze added a comment - The changed was committed by Hairong before. We should investigate why the change disappeared.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        Talked to Suresh. Look like that the changes was lost during project split.

        Show
        Tsz Wo Nicholas Sze added a comment - Talked to Suresh. Look like that the changes was lost during project split.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        I have re-committed the missing changes to hdfs trunk. Thanks, Suresh!

        Show
        Tsz Wo Nicholas Sze added a comment - I have re-committed the missing changes to hdfs trunk. Thanks, Suresh!

          People

          • Assignee:
            Hairong Kuang
            Reporter:
            Hairong Kuang
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development