hdfsSetXattr()

Supported by libMapRClient for hadoop-2.x

Sets extended attribute on a file.

Signature

int hdfsSetXattr(hdfsFS fs, const char* path, const char *name, int nameLen, char *value, int valueLen);

Parameters

Parameter Description
fs The handle of the file system where the file is located. Obtain this handle with one of the hdfsConnect() APIs.
name The name of the extended attribute.
nameLen The length of the name of the extended attribute.
path The path to the file.
value The value for the extended attribute.
valueLen The length of the value of the extended attribute.

Return Value

Returns 0 on success, -1 on error.

Check errno for error codes and meanings.