Supported by libMapRClient for hadoop-0.20.2 and hadoop-2.x

Flushes the write buffer for the specified file to the server

Signature

int hdfsFlush(hdfsFS fs, hdfsFile file)

Parameters

fs

The filesystem handle. Obtain this handle with one of the hdfsConnect() APIs.

file

The file handle. Obtain this handle with one of the hdfsOpenFile() APIs.

Return Value

Returns 0 on success, -1 on error.

Check errno for error codes and meanings.

errno is set to EINVAL if the input arguments are invalid.