You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by Pratyush Das <re...@gmail.com> on 2022/07/14 20:48:27 UTC

hdfsAvailable returning int

Hi,

Since hdfsAvailable's return type (
https://github.com/apache/hadoop/blob/3b46aae977e078cf7eb5e6bbbc55aca7cecee4c7/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/include/hdfs/hdfs.h#L824)
is int, it is difficult to accurately get the size of large files using the
C API. Are there any workarounds?

Thank you,

-- 
Pratyush Das

Re: hdfsAvailable returning int

Posted by Pratyush Das <re...@gmail.com>.
Thank you!

On Thu, 14 Jul 2022 at 23:37, Ji Cheng <me...@gmail.com> wrote:

> To get the size of a file, you should use hdfsGetPathInfo instead.
>
> On Fri, 15 Jul 2022 at 04:49, Pratyush Das <re...@gmail.com> wrote:
>
>> Hi,
>>
>> Since hdfsAvailable's return type (
>> https://github.com/apache/hadoop/blob/3b46aae977e078cf7eb5e6bbbc55aca7cecee4c7/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/include/hdfs/hdfs.h#L824)
>> is int, it is difficult to accurately get the size of large files using
>> the C API. Are there any workarounds?
>>
>> Thank you,
>>
>> --
>> Pratyush Das
>>
>

-- 
Pratyush Das

Re: hdfsAvailable returning int

Posted by Ji Cheng <me...@gmail.com>.
To get the size of a file, you should use hdfsGetPathInfo instead.

On Fri, 15 Jul 2022 at 04:49, Pratyush Das <re...@gmail.com> wrote:

> Hi,
>
> Since hdfsAvailable's return type (
> https://github.com/apache/hadoop/blob/3b46aae977e078cf7eb5e6bbbc55aca7cecee4c7/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/include/hdfs/hdfs.h#L824)
> is int, it is difficult to accurately get the size of large files using
> the C API. Are there any workarounds?
>
> Thank you,
>
> --
> Pratyush Das
>