public class GlusterVolume
extends org.apache.hadoop.fs.RawLocalFileSystem
| Modifier and Type | Field and Description |
|---|---|
protected static GlusterFSXattr |
attr |
static int |
DEFAULT_BLOCK_SIZE |
protected String |
default_volume |
protected URI |
NAME |
static int |
OPTIMAL_WRITE_BUFFER_SIZE |
static int |
OVERRIDE_WRITE_BUFFER_SIZE
General reason for these constants is to help us decide
when to override the specified buffer size.
|
protected Hashtable<String,String> |
volumes |
| Constructor and Description |
|---|
GlusterVolume() |
GlusterVolume(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
protected URI |
canonicalizeUri(URI uri) |
boolean |
delete(org.apache.hadoop.fs.Path p,
boolean recursive)
Delete the given path to a file or directory.
|
org.apache.hadoop.fs.Path |
fileToPath(File path) |
long |
getBlockSize(org.apache.hadoop.fs.Path path) |
org.apache.hadoop.fs.BlockLocation[] |
getFileBlockLocations(org.apache.hadoop.fs.FileStatus file,
long start,
long len) |
org.apache.hadoop.fs.FileStatus |
getFileStatus(org.apache.hadoop.fs.Path f) |
protected org.apache.hadoop.fs.Path |
getInitialWorkingDirectory() |
URI |
getUri() |
void |
initialize(URI uri,
org.apache.hadoop.conf.Configuration conf) |
org.apache.hadoop.fs.FileStatus[] |
listStatus(org.apache.hadoop.fs.Path f) |
boolean |
mkdirs(org.apache.hadoop.fs.Path f) |
File |
pathToFile(org.apache.hadoop.fs.Path path) |
boolean |
rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst) |
boolean |
sameVolume(org.apache.hadoop.fs.Path p) |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
void |
setOwner(org.apache.hadoop.fs.Path p,
String username,
String groupname) |
void |
setPermission(org.apache.hadoop.fs.Path p,
org.apache.hadoop.fs.permission.FsPermission permission) |
String |
toString() |
append, close, completeLocalOutput, create, create, createNonRecursive, createNonRecursive, createSymlink, getFileLinkStatus, getHomeDirectory, getLinkTarget, getStatus, getWorkingDirectory, mkdirs, moveFromLocalFile, open, primitiveMkdir, setTimes, setWorkingDirectory, startLocalOutput, supportsSymlinks, useStatIfAvailableaddDelegationTokens, append, append, areSymlinksEnabled, cancelDeleteOnExit, checkPath, clearStatistics, closeAll, closeAllForUGI, concat, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, createNewFile, createNonRecursive, createSnapshot, createSnapshot, delete, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAllStatistics, getCanonicalServiceName, getCanonicalUri, getChildFileSystems, getContentSummary, getDefaultBlockSize, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultReplication, getDefaultUri, getDelegationToken, getFileBlockLocations, getFileChecksum, getFileSystemClass, getFSofPath, getLength, getLocal, getName, getNamed, getReplication, getScheme, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getUsed, globStatus, globStatus, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, makeQualified, mkdirs, modifyAclEntries, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, primitiveCreate, primitiveMkdir, printStatistics, processDeleteOnExit, removeAcl, removeAclEntries, removeDefaultAcl, rename, renameSnapshot, resolveLink, resolvePath, setAcl, setDefaultUri, setDefaultUri, setReplication, setVerifyChecksum, setWriteChecksumpublic static final int OVERRIDE_WRITE_BUFFER_SIZE
public static final int OPTIMAL_WRITE_BUFFER_SIZE
public static final int DEFAULT_BLOCK_SIZE
protected URI NAME
protected String default_volume
protected static GlusterFSXattr attr
public GlusterVolume()
public GlusterVolume(org.apache.hadoop.conf.Configuration conf)
public URI getUri()
getUri in class org.apache.hadoop.fs.RawLocalFileSystempublic void initialize(URI uri, org.apache.hadoop.conf.Configuration conf) throws IOException
initialize in class org.apache.hadoop.fs.RawLocalFileSystemIOExceptionprotected URI canonicalizeUri(URI uri)
canonicalizeUri in class org.apache.hadoop.fs.FileSystempublic boolean sameVolume(org.apache.hadoop.fs.Path p)
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.ConfigurablesetConf in class org.apache.hadoop.conf.Configuredpublic File pathToFile(org.apache.hadoop.fs.Path path)
pathToFile in class org.apache.hadoop.fs.RawLocalFileSystemprotected org.apache.hadoop.fs.Path getInitialWorkingDirectory()
getInitialWorkingDirectory in class org.apache.hadoop.fs.RawLocalFileSystempublic org.apache.hadoop.fs.Path fileToPath(File path)
public boolean rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
throws IOException
rename in class org.apache.hadoop.fs.RawLocalFileSystemIOExceptionpublic boolean delete(org.apache.hadoop.fs.Path p,
boolean recursive)
throws IOException
delete in class org.apache.hadoop.fs.RawLocalFileSystemp - the path to deleterecursive - to delete sub-directoriesIOException - if p is non-empty and recursive is falsepublic boolean mkdirs(org.apache.hadoop.fs.Path f)
throws IOException
mkdirs in class org.apache.hadoop.fs.RawLocalFileSystemIOExceptionpublic org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path f)
throws IOException
listStatus in class org.apache.hadoop.fs.RawLocalFileSystemIOExceptionpublic org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path f)
throws IOException
getFileStatus in class org.apache.hadoop.fs.RawLocalFileSystemIOExceptionpublic long getBlockSize(org.apache.hadoop.fs.Path path)
throws IOException
getBlockSize in class org.apache.hadoop.fs.FileSystemIOExceptionpublic void setOwner(org.apache.hadoop.fs.Path p,
String username,
String groupname)
throws IOException
setOwner in class org.apache.hadoop.fs.RawLocalFileSystemIOExceptionpublic void setPermission(org.apache.hadoop.fs.Path p,
org.apache.hadoop.fs.permission.FsPermission permission)
throws IOException
setPermission in class org.apache.hadoop.fs.RawLocalFileSystemIOExceptionpublic org.apache.hadoop.fs.BlockLocation[] getFileBlockLocations(org.apache.hadoop.fs.FileStatus file,
long start,
long len)
throws IOException
getFileBlockLocations in class org.apache.hadoop.fs.FileSystemIOExceptionpublic String toString()
toString in class org.apache.hadoop.fs.RawLocalFileSystemCopyright © 2014. All rights reserved.