|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.conf.Configured
org.apache.hadoop.fs.FileSystem
org.apache.hadoop.fs.http.client.HttpFSFileSystem
public class HttpFSFileSystem
HttpFSServer implementation of the FileSystemAccess FileSystem.
This implementation allows a user to access HDFS over HTTP via a HttpFSServer server.
| Nested Class Summary | |
|---|---|
static class |
HttpFSFileSystem.DeleteOpValues
Delete operations. |
static class |
HttpFSFileSystem.FILE_TYPE
|
static class |
HttpFSFileSystem.GetOpValues
Get operations. |
static class |
HttpFSFileSystem.PostOpValues
Post operations. |
static class |
HttpFSFileSystem.PutOpValues
Put operations. |
| Nested classes/interfaces inherited from class org.apache.hadoop.fs.FileSystem |
|---|
org.apache.hadoop.fs.FileSystem.Statistics |
| Fields inherited from class org.apache.hadoop.fs.FileSystem |
|---|
DEFAULT_FS, FS_DEFAULT_NAME_KEY, LOG, SHUTDOWN_HOOK_PRIORITY, statistics |
| Constructor Summary | |
|---|---|
HttpFSFileSystem()
|
|
| Method Summary | |
|---|---|
org.apache.hadoop.fs.FSDataOutputStream |
append(org.apache.hadoop.fs.Path f,
int bufferSize,
org.apache.hadoop.util.Progressable progress)
Append to an existing file (optional operation). |
org.apache.hadoop.fs.FSDataOutputStream |
create(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
Opens an FSDataOutputStream at the indicated Path with write-progress reporting. |
boolean |
delete(org.apache.hadoop.fs.Path f)
Deprecated. Use delete(Path, boolean) instead |
boolean |
delete(org.apache.hadoop.fs.Path f,
boolean recursive)
Delete a file. |
org.apache.hadoop.fs.ContentSummary |
getContentSummary(org.apache.hadoop.fs.Path f)
|
org.apache.hadoop.fs.FileChecksum |
getFileChecksum(org.apache.hadoop.fs.Path f)
|
org.apache.hadoop.fs.FileStatus |
getFileStatus(org.apache.hadoop.fs.Path f)
Return a file status object that represents the path. |
org.apache.hadoop.fs.Path |
getHomeDirectory()
Return the current user's home directory in this filesystem. |
URI |
getUri()
Returns a URI whose scheme and authority identify this FileSystem. |
org.apache.hadoop.fs.Path |
getWorkingDirectory()
Get the current working directory for the given file system |
void |
initialize(URI name,
org.apache.hadoop.conf.Configuration conf)
Called after a new FileSystem instance is constructed. |
org.apache.hadoop.fs.FileStatus[] |
listStatus(org.apache.hadoop.fs.Path f)
List the statuses of the files/directories in the given path if the path is a directory. |
boolean |
mkdirs(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission)
Make the given file and all non-existent parents into directories. |
org.apache.hadoop.fs.FSDataInputStream |
open(org.apache.hadoop.fs.Path f,
int bufferSize)
Opens an FSDataInputStream at the indicated Path. |
static String |
permissionToString(org.apache.hadoop.fs.permission.FsPermission p)
Converts a FsPermission to a Unix octal representation. |
boolean |
rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
Renames Path src to Path dst. |
void |
setOwner(org.apache.hadoop.fs.Path p,
String username,
String groupname)
Set owner of a path (i.e. |
void |
setPermission(org.apache.hadoop.fs.Path p,
org.apache.hadoop.fs.permission.FsPermission permission)
Set permission of a path. |
boolean |
setReplication(org.apache.hadoop.fs.Path src,
short replication)
Set replication for an existing file. |
void |
setTimes(org.apache.hadoop.fs.Path p,
long mtime,
long atime)
Set access time of a file |
void |
setWorkingDirectory(org.apache.hadoop.fs.Path newDir)
Set the current working directory for the given file system. |
| Methods inherited from class org.apache.hadoop.fs.FileSystem |
|---|
addDelegationTokens, append, append, cancelDeleteOnExit, checkPath, clearStatistics, close, closeAll, closeAllForUGI, completeLocalOutput, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, createNewFile, createNonRecursive, createNonRecursive, deleteOnExit, exists, get, get, get, getAllStatistics, getBlockSize, getCanonicalServiceName, getCanonicalUri, getChildFileSystems, getDefaultBlockSize, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultReplication, getDefaultUri, getDelegationToken, getFileBlockLocations, getFileBlockLocations, getInitialWorkingDirectory, getLength, getLocal, getName, getNamed, getReplication, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getUsed, globStatus, globStatus, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, makeQualified, mkdirs, mkdirs, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, rename, resolvePath, setDefaultUri, setDefaultUri, setVerifyChecksum, setWriteChecksum, startLocalOutput |
| Methods inherited from class org.apache.hadoop.conf.Configured |
|---|
getConf, setConf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SERVICE_NAME
public static final String SERVICE_VERSION
public static final String SERVICE_PREFIX
public static final String OP_PARAM
public static final String DO_AS_PARAM
public static final String OVERWRITE_PARAM
public static final String REPLICATION_PARAM
public static final String BLOCKSIZE_PARAM
public static final String PERMISSION_PARAM
public static final String DESTINATION_PARAM
public static final String RECURSIVE_PARAM
public static final String OWNER_PARAM
public static final String GROUP_PARAM
public static final String MODIFICATION_TIME_PARAM
public static final String ACCESS_TIME_PARAM
public static final String RENEWER_PARAM
public static final String DEFAULT_PERMISSION
public static final String RENAME_JSON
public static final String DELETE_JSON
public static final String MKDIRS_JSON
public static final String HOME_DIR_JSON
public static final String SET_REPLICATION_JSON
public static final String UPLOAD_CONTENT_TYPE
public static final String FILE_STATUSES_JSON
public static final String FILE_STATUS_JSON
public static final String PATH_SUFFIX_JSON
public static final String TYPE_JSON
public static final String LENGTH_JSON
public static final String OWNER_JSON
public static final String GROUP_JSON
public static final String PERMISSION_JSON
public static final String ACCESS_TIME_JSON
public static final String MODIFICATION_TIME_JSON
public static final String BLOCK_SIZE_JSON
public static final String REPLICATION_JSON
public static final String FILE_CHECKSUM_JSON
public static final String CHECKSUM_ALGORITHM_JSON
public static final String CHECKSUM_BYTES_JSON
public static final String CHECKSUM_LENGTH_JSON
public static final String CONTENT_SUMMARY_JSON
public static final String CONTENT_SUMMARY_DIRECTORY_COUNT_JSON
public static final String CONTENT_SUMMARY_FILE_COUNT_JSON
public static final String CONTENT_SUMMARY_LENGTH_JSON
public static final String CONTENT_SUMMARY_QUOTA_JSON
public static final String CONTENT_SUMMARY_SPACE_CONSUMED_JSON
public static final String CONTENT_SUMMARY_SPACE_QUOTA_JSON
public static final String DELEGATION_TOKEN_JSON
public static final String DELEGATION_TOKEN_URL_STRING_JSON
public static final String ERROR_JSON
public static final String ERROR_EXCEPTION_JSON
public static final String ERROR_CLASSNAME_JSON
public static final String ERROR_MESSAGE_JSON
public static final int HTTP_TEMPORARY_REDIRECT
| Constructor Detail |
|---|
public HttpFSFileSystem()
| Method Detail |
|---|
public void initialize(URI name,
org.apache.hadoop.conf.Configuration conf)
throws IOException
initialize in class org.apache.hadoop.fs.FileSystemname - a uri whose authority section names the host, port, etc. for this FileSystemconf - the configuration
IOExceptionpublic URI getUri()
getUri in class org.apache.hadoop.fs.FileSystem
public org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path f,
int bufferSize)
throws IOException
does not support the
PositionReadable and Seekable methods.
- Specified by:
open in class org.apache.hadoop.fs.FileSystem
- Parameters:
f - the file name to openbufferSize - the size of the buffer to be used.
- Throws:
IOException
public static String permissionToString(org.apache.hadoop.fs.permission.FsPermission p)
FsPermission to a Unix octal representation.
p - the permission.
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
throws IOException
Progressable parameter is not used.
create in class org.apache.hadoop.fs.FileSystemf - the file name to open.permission - file permission.overwrite - if a file with this name already exists, then if true,
the file will be overwritten, and if false an error will be thrown.bufferSize - the size of the buffer to be used.replication - required block replication for the file.blockSize - block size.progress - progressable.
IOExceptionsetPermission(Path, FsPermission)
public org.apache.hadoop.fs.FSDataOutputStream append(org.apache.hadoop.fs.Path f,
int bufferSize,
org.apache.hadoop.util.Progressable progress)
throws IOException
Progressable parameter is not used.
append in class org.apache.hadoop.fs.FileSystemf - the existing file to be appended.bufferSize - the size of the buffer to be used.progress - for reporting progress if it is not null.
IOException
public boolean rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
throws IOException
rename in class org.apache.hadoop.fs.FileSystemIOException
@Deprecated
public boolean delete(org.apache.hadoop.fs.Path f)
throws IOException
delete in class org.apache.hadoop.fs.FileSystemIOException
public boolean delete(org.apache.hadoop.fs.Path f,
boolean recursive)
throws IOException
delete in class org.apache.hadoop.fs.FileSystemf - the path to delete.recursive - if path is a directory and set to
true, the directory is deleted else throws an exception. In
case of a file the recursive can be set to either true or false.
IOException
public org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path f)
throws IOException
listStatus in class org.apache.hadoop.fs.FileSystemf - given path
IOExceptionpublic void setWorkingDirectory(org.apache.hadoop.fs.Path newDir)
setWorkingDirectory in class org.apache.hadoop.fs.FileSystemnewDir - new directory.public org.apache.hadoop.fs.Path getWorkingDirectory()
getWorkingDirectory in class org.apache.hadoop.fs.FileSystem
public boolean mkdirs(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission)
throws IOException
mkdirs in class org.apache.hadoop.fs.FileSystemIOException
public org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path f)
throws IOException
getFileStatus in class org.apache.hadoop.fs.FileSystemf - The path we want information from
FileNotFoundException - when the path does not exist;
IOException see specific implementation
IOExceptionpublic org.apache.hadoop.fs.Path getHomeDirectory()
getHomeDirectory in class org.apache.hadoop.fs.FileSystem
public void setOwner(org.apache.hadoop.fs.Path p,
String username,
String groupname)
throws IOException
setOwner in class org.apache.hadoop.fs.FileSystemp - The pathusername - If it is null, the original username remains unchanged.groupname - If it is null, the original groupname remains unchanged.
IOException
public void setPermission(org.apache.hadoop.fs.Path p,
org.apache.hadoop.fs.permission.FsPermission permission)
throws IOException
setPermission in class org.apache.hadoop.fs.FileSystemp - path.permission - permission.
IOException
public void setTimes(org.apache.hadoop.fs.Path p,
long mtime,
long atime)
throws IOException
setTimes in class org.apache.hadoop.fs.FileSystemp - The pathmtime - Set the modification time of this file.
The number of milliseconds since Jan 1, 1970.
A value of -1 means that this call should not set modification time.atime - Set the access time of this file.
The number of milliseconds since Jan 1, 1970.
A value of -1 means that this call should not set access time.
IOException
public boolean setReplication(org.apache.hadoop.fs.Path src,
short replication)
throws IOException
setReplication in class org.apache.hadoop.fs.FileSystemsrc - file namereplication - new replication
IOException
public org.apache.hadoop.fs.ContentSummary getContentSummary(org.apache.hadoop.fs.Path f)
throws IOException
getContentSummary in class org.apache.hadoop.fs.FileSystemIOException
public org.apache.hadoop.fs.FileChecksum getFileChecksum(org.apache.hadoop.fs.Path f)
throws IOException
getFileChecksum in class org.apache.hadoop.fs.FileSystemIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||