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

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

Introduction

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

Prototype

public Map<String, byte[]> getXAttrs(Path path, List<String> names) throws IOException 

Source Link

Document

Get all of the xattrs name/value pairs for a file or directory.

Usage

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

License:Apache License

@Override
public Map<String, byte[]> getXAttrs(Path path, final List<String> names) throws IOException {
    final Path absF = fixRelativePart(path);
    return new FileSystemLinkResolver<Map<String, byte[]>>() {
        @Override//from  w ww.  ja  v  a  2  s . com
        public Map<String, byte[]> doCall(final Path p) throws IOException {
            return dfs.getXAttrs(getPathName(p), names);
        }

        @Override
        public Map<String, byte[]> next(final FileSystem fs, final Path p)
                throws IOException, UnresolvedLinkException {
            return fs.getXAttrs(p, names);
        }
    }.resolve(this, absF);
}