Supported by libMapRClient for hadoop-0.20.2 and hadoop-2.x
Reads data from the current offset in an open file. After the read, the current offset is incremented by the number of bytes read.
To read from a specific offset, first call
hdfsSeek() to move to that offset in the file. Then, call
hdfsPread(), specifying an offset in the call.
hdfsPread() does not increment the current offset in the file. The offset that you specify in the call is used only for the read.
The filesystem handle. Filesystem handle can be obtained using one of the
The file handle. Obtain this handle with one of the
The buffer to copy bytes into during the read.
The length of the buffer. The maximum length of the buffer is the maximum size of
Returns the number of bytes actually read, which can be less than than the length of the buffer if the end of the file is reached during the read. Returns -1 on error.
Check errno for error codes and meanings.