You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by mm...@apache.org on 2022/05/13 16:16:37 UTC

[beam] branch master updated: [BEAM-14465] Reduce DefaultS3ClientBuilderFactory logging to debug level (#17645)

This is an automated email from the ASF dual-hosted git repository.

mmack pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 2b7aab0ea72 [BEAM-14465] Reduce DefaultS3ClientBuilderFactory logging to debug level (#17645)
2b7aab0ea72 is described below

commit 2b7aab0ea7236265840f6c3795deb5eea6188ba9
Author: Jack McCluskey <34...@users.noreply.github.com>
AuthorDate: Fri May 13 12:16:31 2022 -0400

    [BEAM-14465] Reduce DefaultS3ClientBuilderFactory logging to debug level (#17645)
---
 .../apache/beam/sdk/io/aws/s3/DefaultS3ClientBuilderFactory.java | 8 --------
 .../beam/sdk/io/aws2/s3/DefaultS3ClientBuilderFactory.java       | 9 ---------
 2 files changed, 17 deletions(-)

diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/DefaultS3ClientBuilderFactory.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/DefaultS3ClientBuilderFactory.java
index 7ed6f6b4cf4..a00cfc5fea0 100644
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/DefaultS3ClientBuilderFactory.java
+++ b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/DefaultS3ClientBuilderFactory.java
@@ -22,8 +22,6 @@ import com.amazonaws.services.s3.AmazonS3ClientBuilder;
 import org.apache.beam.sdk.io.aws.options.S3ClientBuilderFactory;
 import org.apache.beam.sdk.io.aws.options.S3Options;
 import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Strings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Construct AmazonS3ClientBuilder with default values of S3 client properties like path style
@@ -31,8 +29,6 @@ import org.slf4j.LoggerFactory;
  */
 public class DefaultS3ClientBuilderFactory implements S3ClientBuilderFactory {
 
-  private static final Logger LOG = LoggerFactory.getLogger(DefaultS3ClientBuilderFactory.class);
-
   @Override
   public AmazonS3ClientBuilder createBuilder(S3Options s3Options) {
     AmazonS3ClientBuilder builder =
@@ -49,10 +45,6 @@ public class DefaultS3ClientBuilderFactory implements S3ClientBuilderFactory {
                   s3Options.getAwsServiceEndpoint(), s3Options.getAwsRegion()));
     } else if (!Strings.isNullOrEmpty(s3Options.getAwsRegion())) {
       builder = builder.withRegion(s3Options.getAwsRegion());
-    } else {
-      LOG.info(
-          "The AWS S3 Beam extension was included in this build, but the awsRegion flag "
-              + "was not specified. If you don't plan to use S3, then ignore this message.");
     }
     return builder;
   }
diff --git a/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/s3/DefaultS3ClientBuilderFactory.java b/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/s3/DefaultS3ClientBuilderFactory.java
index acb04d913c1..4d4209a22bb 100644
--- a/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/s3/DefaultS3ClientBuilderFactory.java
+++ b/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/s3/DefaultS3ClientBuilderFactory.java
@@ -21,8 +21,6 @@ import org.apache.beam.sdk.io.aws2.common.ClientBuilderFactory;
 import org.apache.beam.sdk.io.aws2.options.S3ClientBuilderFactory;
 import org.apache.beam.sdk.io.aws2.options.S3Options;
 import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import software.amazon.awssdk.services.s3.S3Client;
 import software.amazon.awssdk.services.s3.S3ClientBuilder;
 
@@ -32,8 +30,6 @@ import software.amazon.awssdk.services.s3.S3ClientBuilder;
  */
 public class DefaultS3ClientBuilderFactory implements S3ClientBuilderFactory {
 
-  private static final Logger LOG = LoggerFactory.getLogger(DefaultS3ClientBuilderFactory.class);
-
   @Override
   public S3ClientBuilder createBuilder(S3Options s3Options) {
     return createBuilder(S3Client.builder(), s3Options);
@@ -41,11 +37,6 @@ public class DefaultS3ClientBuilderFactory implements S3ClientBuilderFactory {
 
   @VisibleForTesting
   static S3ClientBuilder createBuilder(S3ClientBuilder builder, S3Options s3Options) {
-    if (s3Options.getAwsRegion() == null) {
-      LOG.info(
-          "The AWS S3 Beam extension was included in this build, but the awsRegion flag "
-              + "was not specified. If you don't plan to use S3, then ignore this message.");
-    }
     return ClientBuilderFactory.getFactory(s3Options).create(builder, s3Options);
   }
 }