Details

      Description

      The latest build of the HDFS-5535 branch (rolling upgrades) shows five new findbugs warnings.

      1. HDFS-6020.patch
        3 kB
        Kihwal Lee
      2. HDFS-6020.patch
        3 kB
        Kihwal Lee

        Activity

        Kihwal Lee created issue -
        Kihwal Lee made changes -
        Field Original Value New Value
        Component/s datanode [ 12312927 ]
        Component/s ha [ 12316609 ]
        Component/s hdfs-client [ 12312928 ]
        Component/s namenode [ 12312926 ]
        Kihwal Lee made changes -
        Assignee Kihwal Lee [ kihwal ]
        Hide
        Kihwal Lee added a comment -

        The patch fixes 4 findbugs warnings.

        • Three were for ignoring return value of File.delete(). Moved them into a conditional statement and added logging.
        • Fourth was for not closing a FileWriter instance in some cases. This was originally ignored since it is non-critical and during shutdown. A finally block has been added to close it at all times.

        The fifth warning is not something introduced by recent changes. There already is an entry in the exception list for this. So I am not fixing this.

        <Match>
        <Class name="org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer$ResponseProcessor" />
        <Method name="run" />
        <Bug pattern="REC_CATCH_EXCEPTION" />
        </Match>

        Show
        Kihwal Lee added a comment - The patch fixes 4 findbugs warnings. Three were for ignoring return value of File.delete(). Moved them into a conditional statement and added logging. Fourth was for not closing a FileWriter instance in some cases. This was originally ignored since it is non-critical and during shutdown. A finally block has been added to close it at all times. The fifth warning is not something introduced by recent changes. There already is an entry in the exception list for this. So I am not fixing this. <Match> <Class name="org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer$ResponseProcessor" /> <Method name="run" /> <Bug pattern="REC_CATCH_EXCEPTION" /> </Match>
        Kihwal Lee made changes -
        Attachment HDFS-6020.patch [ 12631248 ]
        Hide
        Chris Nauroth added a comment -

        Hi, Kihwal. This patch looks good. Minor nit: the finally block for closing the FileWriter could be simplified to a one-liner using IOUtils#cleanup or IOUtils#closeStream. +1 after that's addressed. Thanks!

        Show
        Chris Nauroth added a comment - Hi, Kihwal. This patch looks good. Minor nit: the finally block for closing the FileWriter could be simplified to a one-liner using IOUtils#cleanup or IOUtils#closeStream . +1 after that's addressed. Thanks!
        Chris Nauroth made changes -
        Hadoop Flags Reviewed [ 10343 ]
        Hide
        Kihwal Lee added a comment -

        Thanks for the review, Chris. It is now calling IOUtils.cleanup().

        Show
        Kihwal Lee added a comment - Thanks for the review, Chris. It is now calling IOUtils.cleanup().
        Kihwal Lee made changes -
        Attachment HDFS-6020.patch [ 12631279 ]
        Hide
        Chris Nauroth added a comment -

        +1 Thanks again!

        Show
        Chris Nauroth added a comment - +1 Thanks again!
        Hide
        Kihwal Lee added a comment -

        I've committed this to the RU branch.

        Show
        Kihwal Lee added a comment - I've committed this to the RU branch.
        Kihwal Lee made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s HDFS-5535 (Rolling upgrades) [ 12325754 ]
        Resolution Fixed [ 1 ]
        Hide
        Tsz Wo Nicholas Sze added a comment -

        The class name in findbugsExcludeFile.xml is incorrect; filed HDFS-6025.

        Show
        Tsz Wo Nicholas Sze added a comment - The class name in findbugsExcludeFile.xml is incorrect; filed HDFS-6025 .

          People

          • Assignee:
            Kihwal Lee
            Reporter:
            Kihwal Lee
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development