hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dhruba borthakur (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-5143) Add a method to get file length for Seekable, FSDataInputStream and libhdfs
Date Sun, 26 Apr 2009 08:32:30 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-5143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702868#action_12702868
] 

dhruba borthakur commented on HADOOP-5143:
------------------------------------------

Hi Qi, is it possible for you to add the new method getFileLength() only to FSInputStream
and libhdfs (and not to the Seekable) interface. As Raghu points out, the getFileLength()
API does not seem to match with the goals of the Seekable interface. 

You mentioned about the shortcomings about the available() interface for files greater than
2GB. is this something that is fixed in later releases of the JDK?

> Add a method to get file length for Seekable, FSDataInputStream and libhdfs
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-5143
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5143
>             Project: Hadoop Core
>          Issue Type: New Feature
>          Components: dfs, fs, libhdfs
>    Affects Versions: 0.18.2
>            Reporter: Qi Liu
>         Attachments: HADOOP-5143.patch, hadoop.patch
>
>
> When open any seekable file, it should be able to get the length of the file via Seekable
interface, since the seek method should be able to detect seeking beyond the end of file.
Such interface can benefit distributed file systems by saving a network round-trip of FileSystem.getFileStatus(Path).getLen()
for any open file.
> In libhdfs, such interface should also be exposed to make native program taking advantage
of this change.
> I have the changes locally for all FSInputStream concrete classes. The change can be
considered trivial, since some of the FSInputStream classes already have a method named getFileLength(),
or a member field named size/length/end.

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