Class GCSV2UnderFileSystem

  • All Implemented Interfaces:
    alluxio.underfs.AsyncUfsClient, alluxio.underfs.UnderFileSystem, java.io.Closeable, java.lang.AutoCloseable

    @ThreadSafe
    public class GCSV2UnderFileSystem
    extends alluxio.underfs.ObjectUnderFileSystem
    GCS FS UnderFileSystem implementation based on the Google cloud storage 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, alluxio.underfs.ObjectUnderFileSystem.UfsStatusIterator
      • Nested classes/interfaces inherited from interface alluxio.underfs.UnderFileSystem

        alluxio.underfs.UnderFileSystem.Factory, alluxio.underfs.UnderFileSystem.SpaceType
    • Field Summary

      • Fields inherited from class alluxio.underfs.ObjectUnderFileSystem

        mExecutorService, mRootKeySupplier, PATH_SEPARATOR, PATH_SEPARATOR_CHAR
      • Fields inherited from class alluxio.underfs.BaseUnderFileSystem

        EMPTY_ACL, mUfsConf, mUri
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected GCSV2UnderFileSystem​(alluxio.AlluxioURI uri, com.google.cloud.storage.Storage storageClient, java.lang.String bucketName, alluxio.underfs.UnderFileSystemConfiguration conf)
      Constructor for GCSV2UnderFileSystem.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean copyObject​(java.lang.String src, java.lang.String dst)  
      boolean createEmptyObject​(java.lang.String key)  
      static GCSV2UnderFileSystem createInstance​(alluxio.AlluxioURI uri, alluxio.underfs.UnderFileSystemConfiguration conf)
      Constructs a new instance of GCSV2UnderFileSystem.
      protected java.io.OutputStream createObject​(java.lang.String key)  
      protected boolean deleteObject​(java.lang.String key)  
      protected java.lang.String getFolderSuffix()  
      protected alluxio.underfs.ObjectUnderFileSystem.ObjectListingChunk getObjectListingChunk​(java.lang.String key, boolean recursive)  
      protected alluxio.underfs.ObjectUnderFileSystem.ObjectStatus getObjectStatus​(java.lang.String key)  
      protected alluxio.underfs.ObjectUnderFileSystem.ObjectPermissions getPermissions()  
      protected java.lang.String getRootKey()  
      java.lang.String getUnderFSType()  
      protected java.io.InputStream openObject​(java.lang.String key, alluxio.underfs.options.OpenOptions options, alluxio.retry.RetryPolicy retryPolicy)  
      alluxio.PositionReader openPositionRead​(java.lang.String path, long fileLength)  
      void setMode​(java.lang.String path, short mode)  
      void setOwner​(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, getExistingDirectoryStatus, getExistingFileStatus, getExistingStatus, getFileLocations, getFileLocations, getFileStatus, getListingChunkLength, getListingChunkLengthMax, getObjectListingChunk, getObjectListingChunkForPath, getObjectListingChunkForPath, getParentPath, getSpace, getStatus, isDirectory, isExistingDirectory, isFile, isObjectStorage, isRoot, listInternal, listStatus, listStatus, listStatusIterable, mkdirs, mkdirsInternal, open, openExistingFile, openExistingFile, parentExists, renameDirectory, renameFile, renameRenamableDirectory, renameRenamableFile, retryOnException, stripPrefixIfPresent, supportsFlush
      • Methods inherited from class alluxio.underfs.BaseUnderFileSystem

        create, deleteDirectory, exists, getAclPair, getActiveSyncInfo, getConfiguration, getFingerprint, getOperationMode, getParsedFingerprint, getParsedFingerprint, getPhysicalStores, isSeekable, mkdirs, open, performListingAsync, resolveUri, setAclEntries, startActiveSyncPolling, startSync, stopActiveSyncPolling, stopSync, supportsActiveSync, validatePath
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface alluxio.underfs.UnderFileSystem

        getFileStatus, getStatus, getTemporaryToken, isTemporaryConnectionToken, listStatuses, refreshTemporaryToken, setTemporaryTokenRefreshContext
    • Constructor Detail

      • GCSV2UnderFileSystem

        protected GCSV2UnderFileSystem​(alluxio.AlluxioURI uri,
                                       com.google.cloud.storage.Storage storageClient,
                                       java.lang.String bucketName,
                                       alluxio.underfs.UnderFileSystemConfiguration conf)
        Constructor for GCSV2UnderFileSystem.
        Parameters:
        uri - the AlluxioURI for this UFS
        storageClient - the Google cloud storage client
        bucketName - bucket name of user's configured Alluxio bucket
        conf - configuration for this UFS
    • Method Detail

      • createInstance

        public static GCSV2UnderFileSystem createInstance​(alluxio.AlluxioURI uri,
                                                          alluxio.underfs.UnderFileSystemConfiguration conf)
                                                   throws java.io.IOException
        Constructs a new instance of GCSV2UnderFileSystem.
        Parameters:
        uri - the AlluxioURI for this UFS
        conf - the configuration for this UFS
        Returns:
        the created GCSV2UnderFileSystem instance
        Throws:
        java.io.IOException
      • getUnderFSType

        public java.lang.String getUnderFSType()
      • openPositionRead

        public alluxio.PositionReader openPositionRead​(java.lang.String path,
                                                       long fileLength)
      • 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)
      • copyObject

        protected boolean copyObject​(java.lang.String src,
                                     java.lang.String dst)
        Specified by:
        copyObject in class alluxio.underfs.ObjectUnderFileSystem
      • createEmptyObject

        public boolean createEmptyObject​(java.lang.String key)
        Specified by:
        createEmptyObject in class alluxio.underfs.ObjectUnderFileSystem
      • createObject

        protected java.io.OutputStream createObject​(java.lang.String key)
                                             throws java.io.IOException
        Specified by:
        createObject in class alluxio.underfs.ObjectUnderFileSystem
        Throws:
        java.io.IOException
      • deleteObject

        protected boolean deleteObject​(java.lang.String key)
        Specified by:
        deleteObject in class alluxio.underfs.ObjectUnderFileSystem
      • getFolderSuffix

        protected java.lang.String getFolderSuffix()
        Specified by:
        getFolderSuffix in class alluxio.underfs.ObjectUnderFileSystem
      • getObjectListingChunk

        protected alluxio.underfs.ObjectUnderFileSystem.ObjectListingChunk getObjectListingChunk​(java.lang.String key,
                                                                                                 boolean recursive)
                                                                                          throws java.io.IOException
        Specified by:
        getObjectListingChunk in class alluxio.underfs.ObjectUnderFileSystem
        Throws:
        java.io.IOException
      • getObjectStatus

        protected alluxio.underfs.ObjectUnderFileSystem.ObjectStatus getObjectStatus​(java.lang.String key)
                                                                              throws java.io.IOException
        Specified by:
        getObjectStatus in class alluxio.underfs.ObjectUnderFileSystem
        Throws:
        java.io.IOException
      • getPermissions

        protected alluxio.underfs.ObjectUnderFileSystem.ObjectPermissions getPermissions()
        Specified by:
        getPermissions in class alluxio.underfs.ObjectUnderFileSystem
      • getRootKey

        protected java.lang.String getRootKey()
        Specified by:
        getRootKey in class alluxio.underfs.ObjectUnderFileSystem
      • openObject

        protected java.io.InputStream openObject​(java.lang.String key,
                                                 alluxio.underfs.options.OpenOptions options,
                                                 alluxio.retry.RetryPolicy retryPolicy)
                                          throws java.io.IOException
        Specified by:
        openObject in class alluxio.underfs.ObjectUnderFileSystem
        Throws:
        java.io.IOException