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

      Cleaning up findbugs warnings for some of the files

      1. findbugs.patch
        6 kB
        Suresh Srinivas
      2. findbugs.patch
        9 kB
        Suresh Srinivas
      3. findbugs.patch
        8 kB
        Suresh Srinivas

        Activity

        Hide
        Tsz Wo Nicholas Sze added a comment -

        I have committed this. Thanks, Suresh!

        Show
        Tsz Wo Nicholas Sze added a comment - I have committed this. Thanks, Suresh!
        Hide
        Suresh Srinivas added a comment -

        Passed unit tests as well

        Show
        Suresh Srinivas added a comment - Passed unit tests as well
        Hide
        Suresh Srinivas added a comment -

        Here is the test-patch result. No tests added because this is findbugs warning cleanup.

        [exec] -1 overall.
        [exec]
        [exec] +1 @author. The patch does not contain any @author tags.
        [exec]
        [exec] -1 tests included. The patch doesn't appear to include any new or modified tests.
        [exec] Please justify why no tests are needed for this patch.
        [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.

        Show
        Suresh Srinivas added a comment - Here is the test-patch result. No tests added because this is findbugs warning cleanup. [exec] -1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] -1 tests included. The patch doesn't appear to include any new or modified tests. [exec] Please justify why no tests are needed for this patch. [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.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        +1 patch looks good.

        Show
        Tsz Wo Nicholas Sze added a comment - +1 patch looks good.
        Hide
        Suresh Srinivas added a comment -

        Attaching the right file

        Show
        Suresh Srinivas added a comment - Attaching the right file
        Hide
        Suresh Srinivas added a comment -

        New patch to restrict changes only to fix findbugs warnings

        Show
        Suresh Srinivas added a comment - New patch to restrict changes only to fix findbugs warnings
        Hide
        Suresh Srinivas added a comment -

        Warnings fixed:

        1. org.apache.hadoop.hdfs.server.protocol.BlockMetaDataInfo doesn't override org.apache.hadoop.hdfs.protocol.Block.equals(Object)
        2. org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration doesn't override org.apache.hadoop.hdfs.protocol.DatanodeID.equals(Object)
        3. Write to static field org.apache.hadoop.hdfs.server.datanode.DataNode.datanodeObject from instance method new org.apache.hadoop.hdfs.server.datanode.DataNode(Configuration, AbstractList?)
        4. Write to static field org.apache.hadoop.hdfs.server.datanode.DataNode.nameNodeAddr from instance method org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(Configuration, AbstractList?)
        5. Write to static field org.apache.hadoop.hdfs.server.namenode.NameNode.myMetrics from instance method org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(Configuration)

        Changes:

        1. Added equals method implementation
        2. Made Namenode constructor protected so that createNameNode methods are the only way to create namenode. Initializing static variables using a static method.
        3. Made Datanode constructor protected so that makeInstance method is the only way to create datanode. Initializing static variables using a static method.
        Show
        Suresh Srinivas added a comment - Warnings fixed: org.apache.hadoop.hdfs.server.protocol.BlockMetaDataInfo doesn't override org.apache.hadoop.hdfs.protocol.Block.equals(Object) org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration doesn't override org.apache.hadoop.hdfs.protocol.DatanodeID.equals(Object) Write to static field org.apache.hadoop.hdfs.server.datanode.DataNode.datanodeObject from instance method new org.apache.hadoop.hdfs.server.datanode.DataNode(Configuration, AbstractList?) Write to static field org.apache.hadoop.hdfs.server.datanode.DataNode.nameNodeAddr from instance method org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(Configuration, AbstractList?) Write to static field org.apache.hadoop.hdfs.server.namenode.NameNode.myMetrics from instance method org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(Configuration) Changes: Added equals method implementation Made Namenode constructor protected so that createNameNode methods are the only way to create namenode. Initializing static variables using a static method. Made Datanode constructor protected so that makeInstance method is the only way to create datanode. Initializing static variables using a static method.

          People

          • Assignee:
            Suresh Srinivas
            Reporter:
            Suresh Srinivas
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development