[ 
https://issues.apache.org/jira/browse/HDFS-1303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tsz Wo (Nicholas), SZE resolved HDFS-1303.
------------------------------------------

      Assignee: Tsz Wo (Nicholas), SZE
    Resolution: Duplicate

> StreamFile.doGet(..) uses an additional RPC to get file length
> --------------------------------------------------------------
>
>                 Key: HDFS-1303
>                 URL: https://issues.apache.org/jira/browse/HDFS-1303
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>
> {code}
> //StreamFile.doGet(..)
>     long fileLen = dfs.getFileInfo(filename).getLen();
>     FSInputStream in = dfs.open(filename);
> {code}
> In the codes above, t is unnecessary to call getFileInfo(..), which is an 
> additional RPC to namenode.  The file length can be obtained from  the input 
> stream after open(..).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to