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] Created: (HDFS-1303) StreamFile.doGet(..) uses an additional RPC to get file length
Date Fri, 16 Jul 2010 02:15:50 GMT
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


{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