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() {
1005
1005
String storageClassConf = getConf ()
1006
1006
.getTrimmed (STORAGE_CLASS , "" )
1007
1007
.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 );
1015
1019
}
1016
1020
1017
1021
return RequestFactoryImpl .builder ()
You can’t perform that action at this time.
0 commit comments