Package io.trino.filesystem.gcs
Class GcsUtils
java.lang.Object
io.trino.filesystem.gcs.GcsUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<com.google.cloud.storage.Blob> getBlob(com.google.cloud.storage.Storage storage, io.trino.filesystem.gcs.GcsLocation location, com.google.cloud.storage.Storage.BlobGetOption... blobGetOptions) static com.google.cloud.storage.BlobgetBlobOrThrow(com.google.cloud.storage.Storage storage, io.trino.filesystem.gcs.GcsLocation location, com.google.cloud.storage.Storage.BlobGetOption... blobGetOptions) static com.google.cloud.ReadChannelgetReadChannel(com.google.cloud.storage.Blob blob, io.trino.filesystem.gcs.GcsLocation location, long position, int readBlockSize, OptionalLong limit) static IOExceptionhandleGcsException(RuntimeException exception, String action, io.trino.filesystem.gcs.GcsLocation location) static IOExceptionhandleGcsException(RuntimeException exception, String action, Collection<Location> locations)
-
Method Details
-
handleGcsException
public static IOException handleGcsException(RuntimeException exception, String action, io.trino.filesystem.gcs.GcsLocation location) throws IOException - Throws:
IOException
-
handleGcsException
public static IOException handleGcsException(RuntimeException exception, String action, Collection<Location> locations) throws IOException - Throws:
IOException
-
getReadChannel
public static com.google.cloud.ReadChannel getReadChannel(com.google.cloud.storage.Blob blob, io.trino.filesystem.gcs.GcsLocation location, long position, int readBlockSize, OptionalLong limit) throws IOException - Throws:
IOException
-
getBlob
public static Optional<com.google.cloud.storage.Blob> getBlob(com.google.cloud.storage.Storage storage, io.trino.filesystem.gcs.GcsLocation location, com.google.cloud.storage.Storage.BlobGetOption... blobGetOptions) -
getBlobOrThrow
public static com.google.cloud.storage.Blob getBlobOrThrow(com.google.cloud.storage.Storage storage, io.trino.filesystem.gcs.GcsLocation location, com.google.cloud.storage.Storage.BlobGetOption... blobGetOptions) throws IOException - Throws:
IOException
-