|
@@ -1903,10 +1903,11 @@ public class ResourceManager extends CompositeService
|
|
|
}
|
|
|
|
|
|
if (scheduler instanceof MutableConfScheduler && isConfigurationMutable) {
|
|
|
- YarnConfigurationStore confStore = YarnConfigurationStoreFactory
|
|
|
- .getStore(conf);
|
|
|
- confStore.initialize(conf, conf, rmContext);
|
|
|
- confStore.format();
|
|
|
+ try (YarnConfigurationStore confStore = YarnConfigurationStoreFactory
|
|
|
+ .getStore(conf)) {
|
|
|
+ confStore.initialize(conf, conf, rmContext);
|
|
|
+ confStore.format();
|
|
|
+ }
|
|
|
} else {
|
|
|
System.out.println(String.format("Scheduler Configuration format only " +
|
|
|
"supported by %s.", MutableConfScheduler.class.getSimpleName()));
|