List of usage examples for org.apache.hadoop.hdfs XAttrHelper buildXAttrMap
public static Map<String, byte[]> buildXAttrMap(List<XAttr> xAttrs)
XAttr list, the key is xattr name with prefix, and value is xattr value. From source file:com.mellanox.r4h.DFSClient.java
License:Apache License
public Map<String, byte[]> getXAttrs(String src) throws IOException { checkOpen();/*from w w w. jav a2s .c o m*/ TraceScope scope = getPathTraceScope("getXAttrs", src); try { return XAttrHelper.buildXAttrMap(namenode.getXAttrs(src, null)); } catch (RemoteException re) { throw re.unwrapRemoteException(AccessControlException.class, FileNotFoundException.class, UnresolvedPathException.class); } finally { scope.close(); } }
From source file:com.mellanox.r4h.DFSClient.java
License:Apache License
public Map<String, byte[]> getXAttrs(String src, List<String> names) throws IOException { checkOpen();//from w w w .jav a2s.c o m TraceScope scope = getPathTraceScope("getXAttrs", src); try { return XAttrHelper.buildXAttrMap(namenode.getXAttrs(src, XAttrHelper.buildXAttrs(names))); } catch (RemoteException re) { throw re.unwrapRemoteException(AccessControlException.class, FileNotFoundException.class, UnresolvedPathException.class); } finally { scope.close(); } }
From source file:com.mellanox.r4h.DFSClient.java
License:Apache License
public List<String> listXAttrs(String src) throws IOException { checkOpen();// www.j a v a 2 s . c om TraceScope scope = getPathTraceScope("listXAttrs", src); try { final Map<String, byte[]> xattrs = XAttrHelper.buildXAttrMap(namenode.listXAttrs(src)); return Lists.newArrayList(xattrs.keySet()); } catch (RemoteException re) { throw re.unwrapRemoteException(AccessControlException.class, FileNotFoundException.class, UnresolvedPathException.class); } finally { scope.close(); } }