YARN-9791. Queue Mutation API does not allow to remove a config. Contributed by Prabhu Joseph.
(cherry picked from commit 751b5a1ac8
)
This commit is contained in:
parent
b04f152876
commit
31591bb296
|
@ -337,12 +337,14 @@ public class MutableCSConfigurationProvider implements CSConfigurationProvider,
|
|||
String keyPrefix = CapacitySchedulerConfiguration.PREFIX
|
||||
+ queuePath + CapacitySchedulerConfiguration.DOT;
|
||||
for (Map.Entry<String, String> kv : updateInfo.getParams().entrySet()) {
|
||||
if (kv.getValue() == null) {
|
||||
String keyValue = kv.getValue();
|
||||
if (keyValue == null || keyValue.isEmpty()) {
|
||||
keyValue = null;
|
||||
proposedConf.unset(keyPrefix + kv.getKey());
|
||||
} else {
|
||||
proposedConf.set(keyPrefix + kv.getKey(), kv.getValue());
|
||||
proposedConf.set(keyPrefix + kv.getKey(), keyValue);
|
||||
}
|
||||
confUpdate.put(keyPrefix + kv.getKey(), kv.getValue());
|
||||
confUpdate.put(keyPrefix + kv.getKey(), keyValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue