Class GcsUtil
java.lang.Object
org.apache.beam.sdk.extensions.gcp.util.GcsUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionbooleanbucketAccessible(GcsPath path) longbucketOwner(GcsPath path) voidvoidcopy(Iterable<GcsPath> srcPaths, Iterable<GcsPath> dstPaths, org.apache.beam.sdk.extensions.gcp.util.GcsUtilV2.OverwriteStrategy strategy) experimental api.voidexperimental api.Deprecated.Deprecated.Usecreate(GcsPath, CreateOptions)instead.create(GcsPath path, GcsUtil.CreateOptions options) voidcreateBucket(com.google.cloud.storage.BucketInfo bucketInfo) voidcreateBucket(String projectId, Bucket bucket) Deprecated.longcom.google.cloud.storage.BlobList<org.apache.beam.sdk.extensions.gcp.util.GcsUtilV2.BlobResult> Deprecated.@Nullable com.google.cloud.storage.BucketgetBucketWithOptions(GcsPath path, com.google.cloud.storage.Storage.BucketGetOption... options) static StringgetNonWildcardPrefix(String globExp) Deprecated.use.invalid reference
#getBlob(GcsPath)getObjects(List<GcsPath> gcsPaths) Deprecated.static booleanisWildcard(GcsPath spec) com.google.api.gax.paging.Page<com.google.cloud.storage.Blob> listBlobs(String bucket, String prefix, @Nullable String pageToken, com.google.cloud.storage.Storage.BlobListOption... options) com.google.api.gax.paging.Page<com.google.cloud.storage.Blob> listBlobs(String bucket, String prefix, @Nullable String pageToken, @Nullable String delimiter, com.google.cloud.storage.Storage.BlobListOption... options) listObjects(String bucket, String prefix, @Nullable String pageToken) Deprecated.Deprecated.voidremove(Iterable<GcsPath> paths, org.apache.beam.sdk.extensions.gcp.util.GcsUtilV2.MissingStrategy strategy) experimental api.voidremove(Collection<String> filenames) voidremoveBucket(Bucket bucket) Deprecated.voidremoveBucket(com.google.cloud.storage.BucketInfo bucketInfo) voidexperimental api.voidvoidrename(Iterable<GcsPath> srcPaths, Iterable<GcsPath> dstPaths, org.apache.beam.sdk.extensions.gcp.util.GcsUtilV2.MissingStrategy srcMissing, org.apache.beam.sdk.extensions.gcp.util.GcsUtilV2.OverwriteStrategy dstOverwrite) experimental api.voidexperimental api.protected voidsetBatchRequestSupplier(Supplier<org.apache.beam.sdk.extensions.gcp.util.GcsUtilV1.BatchInterface> supplier) protected voidsetStorageClient(Storage storageClient) void
-
Method Details
-
getNonWildcardPrefix
-
isWildcard
-
setStorageClient
-
setBatchRequestSupplier
protected void setBatchRequestSupplier(Supplier<org.apache.beam.sdk.extensions.gcp.util.GcsUtilV1.BatchInterface> supplier) -
expand
- Throws:
IOException
-
fileSize
- Throws:
IOException
-
getObject
Deprecated.use.invalid reference
#getBlob(GcsPath)- Throws:
IOException
-
getBlob
public com.google.cloud.storage.Blob getBlob(GcsPath gcsPath, com.google.cloud.storage.Storage.BlobGetOption... options) throws IOException - Throws:
IOException
-
getObjects
@Deprecated public List<GcsUtil.StorageObjectOrIOException> getObjects(List<GcsPath> gcsPaths) throws IOException Deprecated.- Throws:
IOException
-
getBlobs
public List<org.apache.beam.sdk.extensions.gcp.util.GcsUtilV2.BlobResult> getBlobs(Iterable<GcsPath> gcsPaths, com.google.cloud.storage.Storage.BlobGetOption... options) throws IOException - Throws:
IOException
-
listObjects
@Deprecated public Objects listObjects(String bucket, String prefix, @Nullable String pageToken) throws IOException Deprecated.- Throws:
IOException
-
listObjects
@Deprecated public Objects listObjects(String bucket, String prefix, @Nullable String pageToken, @Nullable String delimiter) throws IOException Deprecated.- Throws:
IOException
-
listBlobs
public com.google.api.gax.paging.Page<com.google.cloud.storage.Blob> listBlobs(String bucket, String prefix, @Nullable String pageToken, com.google.cloud.storage.Storage.BlobListOption... options) throws IOException - Throws:
IOException
-
listBlobs
public com.google.api.gax.paging.Page<com.google.cloud.storage.Blob> listBlobs(String bucket, String prefix, @Nullable String pageToken, @Nullable String delimiter, com.google.cloud.storage.Storage.BlobListOption... options) throws IOException - Throws:
IOException
-
open
- Throws:
IOException
-
create
Deprecated.Usecreate(GcsPath, CreateOptions)instead.- Throws:
IOException
-
create
@Deprecated public WritableByteChannel create(GcsPath path, String type, Integer uploadBufferSizeBytes) throws IOException Deprecated.Usecreate(GcsPath, CreateOptions)instead.- Throws:
IOException
-
create
- Throws:
IOException
-
verifyBucketAccessible
- Throws:
IOException
-
bucketAccessible
- Throws:
IOException
-
bucketOwner
- Throws:
IOException
-
createBucket
Deprecated.- Throws:
IOException
-
createBucket
- Throws:
IOException
-
getBucket
Deprecated.- Throws:
IOException
-
getBucketWithOptions
public @Nullable com.google.cloud.storage.Bucket getBucketWithOptions(GcsPath path, com.google.cloud.storage.Storage.BucketGetOption... options) throws IOException - Throws:
IOException
-
removeBucket
Deprecated.- Throws:
IOException
-
removeBucket
- Throws:
IOException
-
copy
- Throws:
IOException
-
copyV2
experimental api.- Throws:
IOException
-
copy
public void copy(Iterable<GcsPath> srcPaths, Iterable<GcsPath> dstPaths, org.apache.beam.sdk.extensions.gcp.util.GcsUtilV2.OverwriteStrategy strategy) throws IOException experimental api.- Throws:
IOException
-
rename
public void rename(Iterable<String> srcFilenames, Iterable<String> destFilenames, MoveOptions... moveOptions) throws IOException - Throws:
IOException
-
renameV2
public void renameV2(Iterable<GcsPath> srcPaths, Iterable<GcsPath> dstPaths, MoveOptions... moveOptions) throws IOException experimental api.- Throws:
IOException
-
rename
public void rename(Iterable<GcsPath> srcPaths, Iterable<GcsPath> dstPaths, org.apache.beam.sdk.extensions.gcp.util.GcsUtilV2.MissingStrategy srcMissing, org.apache.beam.sdk.extensions.gcp.util.GcsUtilV2.OverwriteStrategy dstOverwrite) throws IOException experimental api.- Throws:
IOException
-
remove
- Throws:
IOException
-
removeV2
experimental api.- Throws:
IOException
-
remove
public void remove(Iterable<GcsPath> paths, org.apache.beam.sdk.extensions.gcp.util.GcsUtilV2.MissingStrategy strategy) throws IOException experimental api.- Throws:
IOException
-
create(GcsPath, CreateOptions)instead.