Package alluxio.underfs.gcs
Class GCSUnderFileSystem
- java.lang.Object
-
- alluxio.underfs.BaseUnderFileSystem
-
- alluxio.underfs.ObjectUnderFileSystem
-
- alluxio.underfs.gcs.GCSUnderFileSystem
-
- All Implemented Interfaces:
alluxio.underfs.UnderFileSystem,java.io.Closeable,java.lang.AutoCloseable
@ThreadSafe public class GCSUnderFileSystem extends alluxio.underfs.ObjectUnderFileSystemGoogle Cloud StorageUnderFileSystemimplementation based on the jets3t library.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class alluxio.underfs.ObjectUnderFileSystem
alluxio.underfs.ObjectUnderFileSystem.DeleteBuffer, alluxio.underfs.ObjectUnderFileSystem.ObjectListingChunk, alluxio.underfs.ObjectUnderFileSystem.ObjectPermissions, alluxio.underfs.ObjectUnderFileSystem.ObjectStatus, alluxio.underfs.ObjectUnderFileSystem.ObjectStoreOperation<T extends java.lang.Object>, alluxio.underfs.ObjectUnderFileSystem.OperationBuffer<T extends java.lang.Object>, alluxio.underfs.ObjectUnderFileSystem.RenameBuffer
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGCSUnderFileSystem(alluxio.AlluxioURI uri, org.jets3t.service.impl.rest.httpclient.GoogleStorageService googleStorageService, java.lang.String bucketName, alluxio.underfs.UnderFileSystemConfiguration conf)Constructor forGCSUnderFileSystem.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancopyObject(java.lang.String src, java.lang.String dst)booleancreateEmptyObject(java.lang.String key)static GCSUnderFileSystemcreateInstance(alluxio.AlluxioURI uri, alluxio.underfs.UnderFileSystemConfiguration conf)Constructs a new instance ofGCSUnderFileSystem.protected java.io.OutputStreamcreateObject(java.lang.String key)protected booleandeleteObject(java.lang.String key)alluxio.underfs.UfsDirectoryStatusgetExistingDirectoryStatus(java.lang.String path)protected java.lang.StringgetFolderSuffix()protected alluxio.underfs.ObjectUnderFileSystem.ObjectListingChunkgetObjectListingChunk(java.lang.String key, boolean recursive)protected alluxio.underfs.ObjectUnderFileSystem.ObjectStatusgetObjectStatus(java.lang.String key)protected alluxio.underfs.ObjectUnderFileSystem.ObjectPermissionsgetPermissions()protected java.lang.StringgetRootKey()java.lang.StringgetUnderFSType()java.io.InputStreamopenExistingFile(java.lang.String path)java.io.InputStreamopenExistingFile(java.lang.String path, alluxio.underfs.options.OpenOptions options)protected java.io.InputStreamopenObject(java.lang.String key, alluxio.underfs.options.OpenOptions options, alluxio.retry.RetryPolicy retryPolicy)alluxio.PositionReaderopenPositionRead(java.lang.String path, long fileLength)voidsetMode(java.lang.String path, short mode)voidsetOwner(java.lang.String path, java.lang.String user, java.lang.String group)-
Methods inherited from class alluxio.underfs.ObjectUnderFileSystem
cleanup, close, connectFromMaster, connectFromWorker, convertToFolderName, create, createNonexistingFile, createNonexistingFile, deleteDirectory, deleteExistingDirectory, deleteExistingDirectory, deleteExistingFile, deleteFile, deleteObjects, getBlockSizeByte, getChildName, getDirectoryStatus, getExistingFileStatus, getExistingStatus, getFileLocations, getFileLocations, getFileStatus, getListingChunkLength, getListingChunkLengthMax, getObjectListingChunkForPath, getParentPath, getSpace, getStatus, isDirectory, isExistingDirectory, isFile, isObjectStorage, isRoot, listInternal, listStatus, listStatus, mkdirs, mkdirsInternal, open, parentExists, renameDirectory, renameFile, renameRenamableDirectory, renameRenamableFile, retryOnException, stripPrefixIfPresent, supportsFlush
-
Methods inherited from class alluxio.underfs.BaseUnderFileSystem
create, deleteDirectory, exists, getAclPair, getActiveSyncInfo, getConfiguration, getFingerprint, getOperationMode, getParsedFingerprint, getPhysicalStores, isSeekable, mkdirs, open, resolveUri, setAclEntries, startActiveSyncPolling, startSync, stopActiveSyncPolling, stopSync, supportsActiveSync, validatePath
-
-
-
-
Constructor Detail
-
GCSUnderFileSystem
protected GCSUnderFileSystem(alluxio.AlluxioURI uri, org.jets3t.service.impl.rest.httpclient.GoogleStorageService googleStorageService, java.lang.String bucketName, alluxio.underfs.UnderFileSystemConfiguration conf)Constructor forGCSUnderFileSystem.- Parameters:
uri- theAlluxioURIfor this UFSgoogleStorageService- the Jets3t GCS clientbucketName- bucket name of user's configured Alluxio bucketconf- configuration for this UFS
-
-
Method Detail
-
createInstance
public static GCSUnderFileSystem createInstance(alluxio.AlluxioURI uri, alluxio.underfs.UnderFileSystemConfiguration conf) throws org.jets3t.service.ServiceException
Constructs a new instance ofGCSUnderFileSystem.- Parameters:
uri- theAlluxioURIfor this UFSconf- the configuration for this UFS- Returns:
- the created
GCSUnderFileSysteminstance - Throws:
org.jets3t.service.ServiceException- when a connection to GCS could not be created
-
getUnderFSType
public java.lang.String getUnderFSType()
-
setOwner
public void setOwner(java.lang.String path, java.lang.String user, java.lang.String group)
-
setMode
public void setMode(java.lang.String path, short mode) throws java.io.IOException- Throws:
java.io.IOException
-
getExistingDirectoryStatus
public alluxio.underfs.UfsDirectoryStatus getExistingDirectoryStatus(java.lang.String path) throws java.io.IOException- Specified by:
getExistingDirectoryStatusin interfacealluxio.underfs.UnderFileSystem- Overrides:
getExistingDirectoryStatusin classalluxio.underfs.ObjectUnderFileSystem- Throws:
java.io.IOException
-
openExistingFile
public java.io.InputStream openExistingFile(java.lang.String path) throws java.io.IOException- Specified by:
openExistingFilein interfacealluxio.underfs.UnderFileSystem- Overrides:
openExistingFilein classalluxio.underfs.ObjectUnderFileSystem- Throws:
java.io.IOException
-
openExistingFile
public java.io.InputStream openExistingFile(java.lang.String path, alluxio.underfs.options.OpenOptions options) throws java.io.IOException- Specified by:
openExistingFilein interfacealluxio.underfs.UnderFileSystem- Overrides:
openExistingFilein classalluxio.underfs.ObjectUnderFileSystem- Throws:
java.io.IOException
-
openPositionRead
public alluxio.PositionReader openPositionRead(java.lang.String path, long fileLength)
-
copyObject
protected boolean copyObject(java.lang.String src, java.lang.String dst)- Specified by:
copyObjectin classalluxio.underfs.ObjectUnderFileSystem
-
createEmptyObject
public boolean createEmptyObject(java.lang.String key)
- Specified by:
createEmptyObjectin classalluxio.underfs.ObjectUnderFileSystem
-
createObject
protected java.io.OutputStream createObject(java.lang.String key) throws java.io.IOException- Specified by:
createObjectin classalluxio.underfs.ObjectUnderFileSystem- Throws:
java.io.IOException
-
deleteObject
protected boolean deleteObject(java.lang.String key) throws java.io.IOException- Specified by:
deleteObjectin classalluxio.underfs.ObjectUnderFileSystem- Throws:
java.io.IOException
-
getFolderSuffix
protected java.lang.String getFolderSuffix()
- Specified by:
getFolderSuffixin classalluxio.underfs.ObjectUnderFileSystem
-
getObjectListingChunk
protected alluxio.underfs.ObjectUnderFileSystem.ObjectListingChunk getObjectListingChunk(java.lang.String key, boolean recursive) throws java.io.IOException- Specified by:
getObjectListingChunkin classalluxio.underfs.ObjectUnderFileSystem- Throws:
java.io.IOException
-
getObjectStatus
protected alluxio.underfs.ObjectUnderFileSystem.ObjectStatus getObjectStatus(java.lang.String key) throws java.io.IOException- Specified by:
getObjectStatusin classalluxio.underfs.ObjectUnderFileSystem- Throws:
java.io.IOException
-
getPermissions
protected alluxio.underfs.ObjectUnderFileSystem.ObjectPermissions getPermissions()
- Specified by:
getPermissionsin classalluxio.underfs.ObjectUnderFileSystem
-
getRootKey
protected java.lang.String getRootKey()
- Specified by:
getRootKeyin classalluxio.underfs.ObjectUnderFileSystem
-
openObject
protected java.io.InputStream openObject(java.lang.String key, alluxio.underfs.options.OpenOptions options, alluxio.retry.RetryPolicy retryPolicy)- Specified by:
openObjectin classalluxio.underfs.ObjectUnderFileSystem
-
-