Skip to content

Commit 289ef40

Browse files
Remove log if bucket does not exist
1 parent b7bab1e commit 289ef40

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/io/cdap/plugin/gcp/bigquery/util/BigQueryUtil.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,11 @@ public static void deleteTemporaryDirectory(Configuration configuration, String
720720
/**
721721
* Deletes the GCS bucket.
722722
*/
723-
public static void deleteGcsBucket(Storage storage, String bucket) {
723+
public static void deleteGcsBucket(Storage storage, @Nullable String bucket) {
724+
if (Strings.isNullOrEmpty(bucket) || storage.get(bucket) == null) {
725+
return;
726+
}
727+
724728
Page<Blob> blobs = storage.list(bucket, Storage.BlobListOption.versions(true));
725729
List<BlobId> blobIds = new ArrayList<>();
726730
for (Blob blob : blobs.iterateAll()) {

0 commit comments

Comments
 (0)