hdfsGetXattr()

Supported by libMapRClient for hadoop-2.x

Gets extended attribute values from a file.

Signature

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

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.
path The path to the file.
size The size of the buffer.
value The value for the extended attribute that is read from the system and written to the buffer.

Return Value

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

    Check errno for error codes and meanings.