Class GSBlobStorageImpl

  • All Implemented Interfaces:
    GSBlobStorage

    public class GSBlobStorageImpl
    extends Object
    implements GSBlobStorage
    BlobStorage implementation for Google storage.
    • Constructor Detail

      • GSBlobStorageImpl

        public GSBlobStorageImpl​(com.google.cloud.storage.Storage storage)
        Constructs a GSBlobStorage instance.
        Parameters:
        storage - The wrapped Google Storage instance.
    • Method Detail

      • writeBlob

        public GSBlobStorage.WriteChannel writeBlob​(GSBlobIdentifier blobIdentifier,
                                                    org.apache.flink.configuration.MemorySize chunkSize)
        Description copied from interface: GSBlobStorage
        Creates a write channel with the specified chunk size.
        Specified by:
        writeBlob in interface GSBlobStorage
        Parameters:
        blobIdentifier - The blob identifier to which to write
        chunkSize - The chunk size, must be > 0
        Returns:
        The WriteChannel helper
      • list

        public List<GSBlobIdentifier> list​(String bucketName,
                                           String objectPrefix)
        Description copied from interface: GSBlobStorage
        Lists all the blobs in a bucket matching a given prefix.
        Specified by:
        list in interface GSBlobStorage
        Parameters:
        bucketName - The bucket name
        objectPrefix - The object prefix
        Returns:
        The found blobs ids
      • copy

        public void copy​(GSBlobIdentifier sourceBlobIdentifier,
                         GSBlobIdentifier targetBlobIdentifier)
        Description copied from interface: GSBlobStorage
        Copies from a source blob id to a target blob id. Does not delete the source blob.
        Specified by:
        copy in interface GSBlobStorage
        Parameters:
        sourceBlobIdentifier - The source blob identifier
        targetBlobIdentifier - The target glob identifier
      • compose

        public void compose​(List<GSBlobIdentifier> sourceBlobIdentifiers,
                            GSBlobIdentifier targetBlobIdentifier)
        Description copied from interface: GSBlobStorage
        Composes multiple blobs into one. Does not delete any of the source blobs.
        Specified by:
        compose in interface GSBlobStorage
        Parameters:
        sourceBlobIdentifiers - The source blob identifiers to combine, max of 32
        targetBlobIdentifier - The target blob identifier
      • delete

        public List<Boolean> delete​(Iterable<GSBlobIdentifier> blobIdentifiers)
        Description copied from interface: GSBlobStorage
        Deletes blobs. Note that this does not fail if blobs don't exist.
        Specified by:
        delete in interface GSBlobStorage
        Parameters:
        blobIdentifiers - The blob identifiers to delete
        Returns:
        The results of each delete operation.