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
622ca0d51f
commit
d55d76e1e2
@ -1005,13 +1005,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.debug("Unset storage class property {}; falling back to default storage class",
|
||||
STORAGE_CLASS);
|
||||
}
|
||||
|
||||
return RequestFactoryImpl.builder()
|
||||
|
Loading…
Reference in New Issue
Block a user