[
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.
{code}
- if(!(in instanceof DFSDataInputStream && sums instanceof
DFSDataInputStream))
+ if(!(in instanceof HdfsDataInputStream && sums instanceof
HdfsDataInputStream))
throw new IllegalArgumentException("Input streams must be types " +
"of DFSDataInputStream");
^^^^^^^^^^^^^^^^^^
{code}
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