public class GoogleHadoopFileSystem extends GoogleHadoopFileSystemBase
This implementation sacrifices a small amount of cross-bucket interoperability in favor of more straightforward FileSystem semantics and compatibility with existing Hadoop applications. In particular, it is not subject to bucket-naming constraints, and files are allowed to be placed in root.
GoogleHadoopFileSystemBase.Counter, GoogleHadoopFileSystemBase.ListStatusFileNotFoundBehavior, GoogleHadoopFileSystemBase.ParentTimestampUpdateIncludePredicateAUTHENTICATION_PREFIX, BLOCK_SIZE_DEFAULT, BLOCK_SIZE_KEY, BUFFERSIZE_DEFAULT, BUFFERSIZE_KEY, counters, DEFAULT_FILTER, defaultBlockSize, ENABLE_GCE_SERVICE_ACCOUNT_AUTH_KEY, GCS_CLIENT_ID_KEY, GCS_CLIENT_SECRET_KEY, GCS_CREATE_SYSTEM_BUCKET_DEFAULT, GCS_CREATE_SYSTEM_BUCKET_KEY, GCS_ENABLE_FLAT_GLOB_DEFAULT, GCS_ENABLE_FLAT_GLOB_KEY, GCS_ENABLE_MARKER_FILE_CREATION_DEFAULT, GCS_ENABLE_MARKER_FILE_CREATION_KEY, GCS_ENABLE_METADATA_CACHE_DEFAULT, GCS_ENABLE_METADATA_CACHE_KEY, GCS_ENABLE_REPAIR_IMPLICIT_DIRECTORIES_DEFAULT, GCS_ENABLE_REPAIR_IMPLICIT_DIRECTORIES_KEY, GCS_FILE_SIZE_LIMIT_250GB, GCS_FILE_SIZE_LIMIT_250GB_DEFAULT, GCS_METADATA_CACHE_DIRECTORY_DEFAULT, GCS_METADATA_CACHE_DIRECTORY_KEY, GCS_METADATA_CACHE_TYPE_DEFAULT, GCS_METADATA_CACHE_TYPE_KEY, GCS_PARENT_TIMESTAMP_UPDATE_ENABLE_DEFAULT, GCS_PARENT_TIMESTAMP_UPDATE_ENABLE_KEY, GCS_PARENT_TIMESTAMP_UPDATE_EXCLUDES_DEFAULT, GCS_PARENT_TIMESTAMP_UPDATE_EXCLUDES_KEY, GCS_PARENT_TIMESTAMP_UPDATE_INCLUDES_DEFAULT, GCS_PARENT_TIMESTAMP_UPDATE_INCLUDES_KEY, GCS_PROJECT_ID_KEY, GCS_SYSTEM_BUCKET_KEY, GCS_WORKING_DIRECTORY_KEY, gcsfs, GHFS_ID, initUri, listStatusFileNotFoundBehavior, log, MR_JOB_HISTORY_DONE_DIR_KEY, MR_JOB_HISTORY_INTERMEDIATE_DONE_DIR_KEY, PROPERTIES_FILE, REPLICATION_FACTOR_DEFAULT, SERVICE_ACCOUNT_AUTH_EMAIL_KEY, SERVICE_ACCOUNT_AUTH_KEYFILE_KEY, systemBucket, UNKNOWN_VERSION, VERSION, VERSION_PROPERTY, WRITE_BUFFERSIZE_DEFAULT, WRITE_BUFFERSIZE_KEY| Constructor and Description |
|---|
GoogleHadoopFileSystem()
Constructs an instance of GoogleHadoopFileSystem; the internal
GoogleCloudStorageFileSystem will be set up with config settings when initialize() is called.
|
GoogleHadoopFileSystem(GoogleCloudStorageFileSystem gcsfs)
Constructs an instance of GoogleHadoopFileSystem using the provided
GoogleCloudStorageFileSystem; initialize() will not re-initialize it.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkPath(org.apache.hadoop.fs.Path path) |
void |
configureBuckets(String systemBucketName,
boolean createConfiguredBuckets)
Validates and possibly creates the system bucket.
|
org.apache.hadoop.fs.Path |
getDefaultWorkingDirectory()
Gets the default value of working directory.
|
org.apache.hadoop.fs.Path |
getFileSystemRoot()
Returns the Hadoop path representing the root of the FileSystem associated with this
FileSystemDescriptor.
|
URI |
getGcsPath(org.apache.hadoop.fs.Path hadoopPath)
Translates a "gs:/" style hadoopPath (or relative path which is not fully-qualified) into
the appropriate GCS path which is compatible with the underlying GcsFs or gsutil.
|
org.apache.hadoop.fs.Path |
getHadoopPath(URI gcsPath)
Validates GCS Path belongs to this file system.
|
protected String |
getHomeDirectorySubpath()
Override to allow a homedir subpath which sits directly on our FileSystem root.
|
String |
getScheme()
As the global-rooted FileSystem, our hadoop-path "scheme" is exactly equal to the general
GCS scheme.
|
append, close, completeLocalOutput, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, create, createCounterMap, delete, delete, deleteOnExit, getCanonicalServiceName, getContentSummary, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDelegationToken, getFileChecksum, getFileStatus, getHadoopScheme, getHomeDirectory, getUri, getUsed, getWorkingDirectory, globStatus, globStatus, initialize, initialize, listStatus, makeQualified, mkdirs, open, processDeleteOnExit, rename, setListStatusFileNotFoundBehavior, setOwner, setPermission, setTimes, setVerifyChecksum, setWorkingDirectory, startLocalOutputaddDelegationTokens, append, append, areSymlinksEnabled, cancelDeleteOnExit, canonicalizeUri, clearStatistics, closeAll, closeAllForUGI, concat, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, create, createNewFile, createNonRecursive, createNonRecursive, createNonRecursive, createSnapshot, createSnapshot, createSymlink, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAllStatistics, getBlockSize, getCanonicalUri, getChildFileSystems, getDefaultBlockSize, getDefaultReplication, getDefaultUri, getFileBlockLocations, getFileBlockLocations, getFileLinkStatus, getFileSystemClass, getFSofPath, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getReplication, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, mkdirs, mkdirs, modifyAclEntries, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, removeAcl, removeAclEntries, removeDefaultAcl, rename, renameSnapshot, resolveLink, resolvePath, setAcl, setDefaultUri, setDefaultUri, setReplication, setWriteChecksum, supportsSymlinkspublic GoogleHadoopFileSystem()
public GoogleHadoopFileSystem(GoogleCloudStorageFileSystem gcsfs)
public void configureBuckets(String systemBucketName, boolean createConfiguredBuckets) throws IOException
configureBuckets in class GoogleHadoopFileSystemBasesystemBucketName - Name of system bucketcreateConfiguredBuckets - Whether or not to create systemBucketName if it does not exist.IOException - if systemBucketName is invalid or cannot be found.
and createSystemBucket is false.protected void checkPath(org.apache.hadoop.fs.Path path)
checkPath in class GoogleHadoopFileSystemBaseprotected String getHomeDirectorySubpath()
getHomeDirectorySubpath in class GoogleHadoopFileSystemBasepublic org.apache.hadoop.fs.Path getHadoopPath(URI gcsPath)
getHadoopPath in class GoogleHadoopFileSystemBasegcsPath - Fully-qualified GCS path, of the form gs://public URI getGcsPath(org.apache.hadoop.fs.Path hadoopPath)
getGcsPath in class GoogleHadoopFileSystemBasehadoopPath - Hadoop path.public String getScheme()
getScheme in interface FileSystemDescriptorgetScheme in class GoogleHadoopFileSystemBasepublic org.apache.hadoop.fs.Path getFileSystemRoot()
FileSystemDescriptorgetFileSystemRoot in interface FileSystemDescriptorgetFileSystemRoot in class GoogleHadoopFileSystemBasepublic org.apache.hadoop.fs.Path getDefaultWorkingDirectory()
getDefaultWorkingDirectory in class GoogleHadoopFileSystemBaseCopyright © 2015. All rights reserved.