[ 
https://issues.apache.org/jira/browse/HADOOP-18371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17579880#comment-17579880
 ] 

ASF GitHub Bot commented on HADOOP-18371:
-----------------------------------------

steveloughran commented on code in PR #4730:
URL: https://github.com/apache/hadoop/pull/4730#discussion_r946072098


##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java:
##########
@@ -997,13 +997,17 @@ protected RequestFactory createRequestFactory() {
     String storageClassConf = getConf()
         .getTrimmed(STORAGE_CLASS, "")
         .toUpperCase(Locale.US);
-    StorageClass storageClass;
-    try {
-      storageClass = StorageClass.fromValue(storageClassConf);
-    } catch (IllegalArgumentException e) {
-      LOG.warn("Unknown storage class property {}: {}; falling back to default 
storage class",
-          STORAGE_CLASS, storageClassConf);
-      storageClass = null;
+    StorageClass storageClass = null;
+    if (!storageClassConf.isEmpty()) {
+      try {
+        storageClass = StorageClass.fromValue(storageClassConf);
+      } catch (IllegalArgumentException e) {
+        LOG.warn("Unknown storage class property {}: {}; falling back to 
default storage class",
+            STORAGE_CLASS, storageClassConf);
+      }
+    } else {
+      LOG.info("Empty storage class property {}; falling back to default 
storage class",

Review Comment:
   yes, debug only, apart from some special cases where there's a risk of 
incompatibility across versions (dir marker policy). even there i think it is 
time to retire it.





> s3a FS init logs at warn if fs.s3a.create.storage.class is unset
> ----------------------------------------------------------------
>
>                 Key: HADOOP-18371
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18371
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: 3.3.9
>            Reporter: Steve Loughran
>            Assignee: Viraj Jasani
>            Priority: Blocker
>              Labels: pull-request-available
>
> if you don't have an s3a storage class set in 
> {{fs.s3a.create.storage.class}}, then whenever you create an S3A FS instance, 
> it logs at warn
> {code}
> bin/hadoop s3guard bucket-info $BUCKET
> 2022-07-27 11:53:11,239 [main] INFO  Configuration.deprecation 
> (Configuration.java:logDeprecation(1459)) - fs.s3a.server-side-encryption.key 
> is deprecated. Instead, use fs.s3a.encryption.key
> 2022-07-27 11:53:11,240 [main] INFO  Configuration.deprecation 
> (Configuration.java:logDeprecation(1459)) - 
> fs.s3a.server-side-encryption-algorithm is deprecated. Instead, use 
> fs.s3a.encryption.algorithm
> 2022-07-27 11:53:11,396 [main] WARN  s3a.S3AFileSystem 
> (S3AFileSystem.java:createRequestFactory(1004)) - Unknown storage class 
> property fs.s3a.create.storage.class: ; falling back to default storage class
> 2022-07-27 11:53:11,839 [main] INFO  impl.DirectoryPolicyImpl 
> (DirectoryPolicyImpl.java:getDirectoryPolicy(189)) - Directory markers will 
> be kept
> Filesystem s3a://stevel-london
> Location: eu-west-2
> {code}
> note, this is why part of quaifying an sdk update involves looking at the 
> logs and running the CLI commands by hand...you see if new messages have 
> crept in



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to