HADOOP-18371. S3A FS init to log at debug when fs.s3a.create.storage.class is unset (#4730)
Contributed By: Viraj Jasani
This commit is contained in:
parent
3b3bd89084
commit
e8a28dc0d7
|
@ -1005,13 +1005,17 @@ public class S3AFileSystem extends FileSystem implements StreamCapabilities,
|
||||||
String storageClassConf = getConf()
|
String storageClassConf = getConf()
|
||||||
.getTrimmed(STORAGE_CLASS, "")
|
.getTrimmed(STORAGE_CLASS, "")
|
||||||
.toUpperCase(Locale.US);
|
.toUpperCase(Locale.US);
|
||||||
StorageClass storageClass;
|
StorageClass storageClass = null;
|
||||||
try {
|
if (!storageClassConf.isEmpty()) {
|
||||||
storageClass = StorageClass.fromValue(storageClassConf);
|
try {
|
||||||
} catch (IllegalArgumentException e) {
|
storageClass = StorageClass.fromValue(storageClassConf);
|
||||||
LOG.warn("Unknown storage class property {}: {}; falling back to default storage class",
|
} catch (IllegalArgumentException e) {
|
||||||
STORAGE_CLASS, storageClassConf);
|
LOG.warn("Unknown storage class property {}: {}; falling back to default storage class",
|
||||||
storageClass = null;
|
STORAGE_CLASS, storageClassConf);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LOG.debug("Unset storage class property {}; falling back to default storage class",
|
||||||
|
STORAGE_CLASS);
|
||||||
}
|
}
|
||||||
|
|
||||||
return RequestFactoryImpl.builder()
|
return RequestFactoryImpl.builder()
|
||||||
|
|
Loading…
Reference in New Issue