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

Renames the specified file. For information about the format to use for paths, see Specifying Paths to Files and Directories.

Signature

int hdfsRename(hdfsFS fs, const char* oldPath, const char* newPath)

Parameters

fs

The handle of the filesystem where the file is located. Obtain this handle with one of the hdfsConnect() APIs.

oldPath

The path of the source file.

newPath

The path of the destination file.

Return Value

Returns 0 on success, -1 on error.

Check errno for error codes and meanings.