File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -1005,13 +1005,17 @@ protected RequestFactory createRequestFactory() {
10051005 String storageClassConf = getConf ()
10061006 .getTrimmed (STORAGE_CLASS , "" )
10071007 .toUpperCase (Locale .US );
1008- StorageClass storageClass ;
1009- try {
1010- storageClass = StorageClass .fromValue (storageClassConf );
1011- } catch (IllegalArgumentException e ) {
1012- LOG .warn ("Unknown storage class property {}: {}; falling back to default storage class" ,
1013- STORAGE_CLASS , storageClassConf );
1014- storageClass = null ;
1008+ StorageClass storageClass = null ;
1009+ if (!storageClassConf .isEmpty ()) {
1010+ try {
1011+ storageClass = StorageClass .fromValue (storageClassConf );
1012+ } catch (IllegalArgumentException e ) {
1013+ LOG .warn ("Unknown storage class property {}: {}; falling back to default storage class" ,
1014+ STORAGE_CLASS , storageClassConf );
1015+ }
1016+ } else {
1017+ LOG .debug ("Unset storage class property {}; falling back to default storage class" ,
1018+ STORAGE_CLASS );
10151019 }
10161020
10171021 return RequestFactoryImpl .builder ()
You can’t perform that action at this time.
0 commit comments