public class ChrootedHdfsClient extends Object implements HdfsClient
| Constructor and Description |
|---|
ChrootedHdfsClient(org.apache.hadoop.fs.FileSystem fs,
String rootDir) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPathAttr(String path,
String name,
byte[] value) |
void |
createDir(String relativePath) |
void |
createEmptyFile(String relativePath) |
void |
createEncryptedDir(String relativePath) |
void |
deleteById(String relativePath) |
List<byte[]> |
getDirectSubPathsAttrs(String path,
String attrName) |
Optional<byte[]> |
getPathAttr(String path,
String name) |
String |
getRootDir()
Root directory without "/" at the end.
|
public ChrootedHdfsClient(org.apache.hadoop.fs.FileSystem fs,
String rootDir)
throws IOException
IOExceptionpublic void addPathAttr(String path, String name, byte[] value) throws IOException
addPathAttr in interface HdfsClientIOExceptionpublic Optional<byte[]> getPathAttr(String path, String name) throws IOException
getPathAttr in interface HdfsClientIOExceptionpublic List<byte[]> getDirectSubPathsAttrs(String path, String attrName) throws IOException
getDirectSubPathsAttrs in interface HdfsClientIOExceptionpublic void createDir(String relativePath) throws IOException
createDir in interface HdfsClientIOExceptionpublic void createEncryptedDir(String relativePath) throws IOException
createEncryptedDir in interface HdfsClientIOExceptionpublic void createEmptyFile(String relativePath) throws IOException
createEmptyFile in interface HdfsClientIOExceptionpublic void deleteById(String relativePath) throws IOException
deleteById in interface HdfsClientIOExceptionpublic String getRootDir()
HdfsClientgetRootDir in interface HdfsClientCopyright © 2016. All rights reserved.