hdfsCloseFile()

Supported by libMapRClient for hadoop-2.x

Closes an open file. Flushes all pending write buffers for the file and releases resources that are associated with the file.

Signature

int hdfsCloseFile(hdfsFS fs, hdfsFile file)

Parameters

Parameter Description
fs The handle of the file system where the file is located. 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.