Example usage for org.apache.hadoop.fs FileSystem getXAttr

List of usage examples for org.apache.hadoop.fs FileSystem getXAttr

Introduction

In this page you can find the example usage for org.apache.hadoop.fs FileSystem getXAttr.

Prototype

public byte[] getXAttr(Path path, String name) throws IOException 

Source Link

Document

Get an xattr name and value for a file or directory.

Usage

From source file:com.mellanox.r4h.DistributedFileSystem.java

License:Apache License

@Override
public byte[] getXAttr(Path path, final String name) throws IOException {
    final Path absF = fixRelativePart(path);
    return new FileSystemLinkResolver<byte[]>() {
        @Override/*from  w  w w. j  a v  a 2s .  c  om*/
        public byte[] doCall(final Path p) throws IOException {
            return dfs.getXAttr(getPathName(p), name);
        }

        @Override
        public byte[] next(final FileSystem fs, final Path p) throws IOException, UnresolvedLinkException {
            return fs.getXAttr(p, name);
        }
    }.resolve(this, absF);
}