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.GcsFileChecksumType, GoogleHadoopFileSystemBase.GlobAlgorithm, GoogleHadoopFileSystemBase.InvocationRaisingIOE<R>, GoogleHadoopFileSystemBase.OutputStreamType| Modifier and Type | Field and Description |
|---|---|
static String |
SCHEME
URI scheme for GoogleHadoopFileSystem
|
DEFAULT_FILTER, defaultBlockSize, delegationTokens, GHFS_ID, initUri, PROPERTIES_FILE, REPLICATION_FACTOR_DEFAULT, UNKNOWN_VERSION, VERSION, VERSION_PROPERTY| Constructor and Description |
|---|
GoogleHadoopFileSystem()
Constructs an instance of GoogleHadoopFileSystem; the internal GoogleCloudStorageFileSystem
will be set up with config settings when initialize() is called.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkPath(org.apache.hadoop.fs.Path path) |
protected void |
configureBuckets(GoogleCloudStorageFileSystem gcsFs)
Sets and validates the root 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, concat, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, create, createNonRecursive, delete, deleteOnExit, getCanonicalServiceName, getContentSummary, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDelegationToken, getFileChecksum, getFileStatus, getGcsFs, getHomeDirectory, getStorageStatistics, getUri, getUsed, getWorkingDirectory, getXAttr, getXAttrs, getXAttrs, globStatus, globStatus, hasPathCapability, initialize, listStatus, listXAttrs, makeQualified, mkdirs, open, processDeleteOnExit, removeXAttr, rename, setOwner, setPermission, setTimes, setVerifyChecksum, setWorkingDirectory, setXAttr, startLocalOutputaccess, append, append, appendFile, areSymlinksEnabled, cancelDeleteOnExit, canonicalizeUri, clearStatistics, closeAll, closeAllForUGI, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, create, createFile, createNewFile, createNonRecursive, createNonRecursive, createPathHandle, createSnapshot, createSnapshot, createSymlink, delete, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAdditionalTokenIssuers, getAllStatistics, getAllStoragePolicies, getBlockSize, getCanonicalUri, getChildFileSystems, getDefaultBlockSize, getDefaultReplication, getDefaultUri, getFileBlockLocations, getFileBlockLocations, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getGlobalStorageStatistics, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getPathHandle, getQuotaUsage, getReplication, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getStoragePolicy, getTrashRoot, getTrashRoots, getUsed, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, listStatusBatch, listStatusIterator, mkdirs, mkdirs, modifyAclEntries, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, msync, newInstance, newInstance, newInstance, newInstanceLocal, open, open, open, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, removeAcl, removeAclEntries, removeDefaultAcl, rename, renameSnapshot, resolveLink, resolvePath, satisfyStoragePolicy, setAcl, setDefaultUri, setDefaultUri, setQuota, setQuotaByStorageType, setReplication, setStoragePolicy, setWriteChecksum, setXAttr, supportsSymlinks, truncate, unsetStoragePolicypublic static final String SCHEME
public GoogleHadoopFileSystem()
protected void configureBuckets(GoogleCloudStorageFileSystem gcsFs) throws IOException
configureBuckets in class GoogleHadoopFileSystemBasegcsFs - GoogleCloudStorageFileSystem to configure bucketsIOException - if bucket name is invalid or cannot be found.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://bucket/object-path.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 © 2024. All rights reserved.