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. findBugs.patch
        7 kB
        Hairong Kuang
      2. findBugs1.patch
        7 kB
        Hairong Kuang
      3. findBugs2.patch
        7 kB
        Hairong Kuang
      4. findbugs3.hdfs.patch
        0.9 kB
        Suresh Srinivas

        Activity

        Hairong Kuang created issue -
        Hairong Kuang made changes -
        Field Original Value New Value
        Assignee Hairong Kuang [ hairong ]
        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.metrics.ContextFactory.setAttributes()
        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()
        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.
        Hairong Kuang made changes -
        Attachment findBugs.patch [ 12408413 ]
        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
        Hairong Kuang made changes -
        Attachment findBugs1.patch [ 12408499 ]
        Hairong Kuang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        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.
        Hairong Kuang made changes -
        Attachment findBugs2.patch [ 12409328 ]
        Hairong Kuang made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Hairong Kuang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hairong Kuang made changes -
        Summary Fix fDMI and OBL findbugs in packages hdfs and metrics Fix DMI and OBL findbugs in packages hdfs and metrics
        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.
        Hairong Kuang made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Resolution Fixed [ 1 ]
        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.
        Owen O'Malley made changes -
        Component/s dfs [ 12310710 ]
        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.
        Suresh Srinivas made changes -
        Attachment findbugs3.hdfs.patch [ 12413745 ]
        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.
        Tsz Wo Nicholas Sze made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        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!
        Tsz Wo Nicholas Sze made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Tom White made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Patch Available Patch Available Open Open
        9d 6h 50m 1 Hairong Kuang 29/May/09 01:30
        Open Open Patch Available Patch Available
        20h 47m 2 Hairong Kuang 29/May/09 01:30
        Patch Available Patch Available Resolved Resolved
        20h 57m 1 Hairong Kuang 29/May/09 22:28
        Resolved Resolved Reopened Reopened
        55d 9m 1 Tsz Wo Nicholas Sze 23/Jul/09 22:38
        Reopened Reopened Resolved Resolved
        3m 19s 1 Tsz Wo Nicholas Sze 23/Jul/09 22:41
        Resolved Resolved Closed Closed
        396d 22h 56m 1 Tom White 24/Aug/10 21:37

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development