hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HDFS-1303) StreamFile.doGet(..) uses an additional RPC to get file length
Date Mon, 19 Jul 2010 21:07:50 GMT

     [ 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.


Mime
View raw message