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()
|
String storageClassConf = getConf()
|
||||||
.getTrimmed(STORAGE_CLASS, "")
|
.getTrimmed(STORAGE_CLASS, "")
|
||||||
.toUpperCase(Locale.US);
|
.toUpperCase(Locale.US);
|
||||||
StorageClass storageClass;
|
StorageClass storageClass = null;
|
||||||
|
if (!storageClassConf.isEmpty()) {
|
||||||
try {
|
try {
|
||||||
storageClass = StorageClass.fromValue(storageClassConf);
|
storageClass = StorageClass.fromValue(storageClassConf);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
LOG.warn("Unknown storage class property {}: {}; falling back to default storage class",
|
LOG.warn("Unknown storage class property {}: {}; falling back to default storage class",
|
||||||
STORAGE_CLASS, storageClassConf);
|
STORAGE_CLASS, storageClassConf);
|
||||||
storageClass = null;
|
}
|
||||||
|
} 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
Block a user