YARN-10605. Add queue-mappings-override.enable property in FS2CS conversions. Contributed by Andras Gyori

This commit is contained in:
Szilard Nemeth 2021-02-02 09:13:46 +01:00
parent 7d88953768
commit 9bf2ac07bb
2 changed files with 3 additions and 0 deletions

View File

@ -339,6 +339,7 @@ private void performRuleConversion(FairScheduler fs)
capacitySchedulerConfig.set(MAPPING_RULE_FORMAT, capacitySchedulerConfig.set(MAPPING_RULE_FORMAT,
MAPPING_RULE_FORMAT_JSON); MAPPING_RULE_FORMAT_JSON);
capacitySchedulerConfig.setOverrideWithQueueMappings(true);
if (!rulesToFile) { if (!rulesToFile) {
String json = String json =
((ByteArrayOutputStream)mappingRulesOutputStream) ((ByteArrayOutputStream)mappingRulesOutputStream)

View File

@ -668,6 +668,8 @@ public void testPlacementRulesConversionEnabled() throws Exception {
any(FSConfigToCSConfigRuleHandler.class), any(FSConfigToCSConfigRuleHandler.class),
any(CapacitySchedulerConfiguration.class), any(CapacitySchedulerConfiguration.class),
anyBoolean()); anyBoolean());
assertTrue(converter.getCapacitySchedulerConfig().getBoolean(
CapacitySchedulerConfiguration.ENABLE_QUEUE_MAPPING_OVERRIDE, false));
} }
@Test @Test