hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daryn Sharp (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-3322) Update file context to use HdfsDataInputStream and HdfsDataOutputStream
Date Thu, 26 Apr 2012 13:36:18 GMT

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

Daryn Sharp commented on HDFS-3322:

Looks good!  A few minor comments/questions: The exception message in {{DistributedFileSystem}}
should be updated to reflect that requirement of {{HdfsDataInputStream}} streams.
-    if(!(in instanceof DFSDataInputStream && sums instanceof DFSDataInputStream))
+    if(!(in instanceof HdfsDataInputStream && sums instanceof HdfsDataInputStream))
       throw new IllegalArgumentException("Input streams must be types " +
                                          "of DFSDataInputStream");

Is it possible to update the method signature to require {{HdfsDataInputStream}} args instead
of using {{instanceof}} and casts?

Although not touched in this patch, I'm just curious why {{HdfsDataInputStream}} repeatedly
casts its stream to {{DFSInputStream}} when the ctor takes a {{DFSInputStream}}?
> Update file context to use HdfsDataInputStream and HdfsDataOutputStream
> -----------------------------------------------------------------------
>                 Key: HDFS-3322
>                 URL: https://issues.apache.org/jira/browse/HDFS-3322
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>         Attachments: h3322_20120425.patch

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


View raw message