hdfsGetXattr()

Supported by libMapRClient for hadoop-2.x

Gets extended attribute values from a file.

Signature

int hdfsSetXattr(hdfsFS fs, const char* path, const char *name, char *value, size_t size);

Parameters

Parameter Description
fs The handle of the filesystem where the file is located. Obtain this handle with one of the hdfsConnect() APIs.
name The name of the extended attribute.
path The path to the file.
size The size of the buffer.
value The value for the extended attribute.

Return Value

Returns:
  • Current size of the value of the extended attribute on success
  • -1 on error

    Check errno for error codes and meanings.