You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by yh...@apache.org on 2026/05/22 15:16:21 UTC
(beam) branch release-2.74 updated: Suppress log spams in gcsio 3.0 (#38588) (#38593)
This is an automated email from the ASF dual-hosted git repository.
Abacn pushed a commit to branch release-2.74
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/release-2.74 by this push:
new 095f3ea353a Suppress log spams in gcsio 3.0 (#38588) (#38593)
095f3ea353a is described below
commit 095f3ea353ae545753c8c8980867eaef2b7e87fe
Author: Yi Hu <ya...@google.com>
AuthorDate: Fri May 22 11:16:12 2026 -0400
Suppress log spams in gcsio 3.0 (#38588) (#38593)
---
.../java/org/apache/beam/sdk/extensions/gcp/util/GcsUtilV1.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtilV1.java b/sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtilV1.java
index 97778ac4e1d..1ad08f0ba1a 100644
--- a/sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtilV1.java
+++ b/sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtilV1.java
@@ -71,6 +71,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;
import java.util.function.Supplier;
@@ -184,6 +185,7 @@ class GcsUtilV1 {
return RetryDeterminer.SOCKET_ERRORS.shouldRetry(e);
}
};
+ private static final AtomicBoolean overwriteLog = new AtomicBoolean(false);
/////////////////////////////////////////////////////////////////////////////
@@ -726,9 +728,16 @@ class GcsUtilV1 {
}
}
+ @SuppressFBWarnings("LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE")
GoogleCloudStorage createGoogleCloudStorage(
GoogleCloudStorageOptions options, Storage storage, Credentials credentials)
throws IOException {
+ // Suppress log spams in gcsio 3.0
+ if (overwriteLog.compareAndSet(false, true)) {
+ java.util.logging.Logger.getLogger("com.google.cloud.hadoop.gcsio.GoogleCloudStorageImpl")
+ .setLevel(java.util.logging.Level.SEVERE);
+ }
+
return GoogleCloudStorageImpl.builder()
.setOptions(options)
.setHttpTransport(storage.getRequestFactory().getTransport())