hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswara Rao G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-3319) DFSOutputStream should not start a thread in constructors
Date Wed, 25 Apr 2012 18:34:22 GMT

    [ https://issues.apache.org/jira/browse/HDFS-3319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13261909#comment-13261909
] 

Uma Maheswara Rao G commented on HDFS-3319:
-------------------------------------------

Hi Nicholas, I just reviewed the patch.

Patch looks nice. One minor comment:
{code}
/**
    * Create a new output stream to the given DataNode.
    * @see ClientProtocol#create(String, FsPermission, String, boolean, short, long)
    */
-  DFSOutputStream(DFSClient dfsClient, String src, int buffersize, Progressable progress,
+  private DFSOutputStream(DFSClient dfsClient, String src, int buffersize, Progressable progress,
       LocatedBlock lastBlock, HdfsFileStatus stat,
       DataChecksum checksum) throws IOException {
{code}

This particular ctor we used for append...but doc says create to see create.  
Actually this particular Javadoc not added by this patch. Since we got the room here to change,
we can update as part o it.

After addressing this comment, I am +1 for the patch.
                
> DFSOutputStream should not start a thread in constructors
> ---------------------------------------------------------
>
>                 Key: HDFS-3319
>                 URL: https://issues.apache.org/jira/browse/HDFS-3319
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs client
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>            Priority: Minor
>         Attachments: h3319_20120424.patch
>
>
> DFSOutputStream starts the DataStreamer thread in its constructors.  This is a known
bad programming practice.  It will generate findbugs warnings if the class is not final.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message