You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Demai Ni <ni...@gmail.com> on 2014/10/02 23:51:04 UTC

hdfs: a C API call to getFileSize() through libhdfs or libhdfs3?

hi, folks,

To get the size of a hdfs file, jave API has
FileSystem#getFileStatus(PATH)#getLen();
now I am trying to use a C client to do the same thing.

For a file on local file system, I can grab the info like this:
fseeko(file, 0, SEEK_END);
size = ftello(file);

But I can't find the SEEK_END or a getFileSize() call in the existing
libhdfs or the newly libhdfs3
<https://issues.apache.org/jira/browse/HDFS-6994>

Can someone point me to the right direction? many thanks

Demai