@Test public void testGetRoleConfigsWithDifferentDataNodeRoleForMultipleGroupsNoComputeDisks() { HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, 1); HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 2); HostgroupView compute = new HostgroupView("compute", 0, InstanceGroupType.CORE, 2); setup("input/clouderamanager-3hg-different-DN-role.bp", Builder.builder().withHostgroupViews(Set.of(master, worker, compute))); underTest.process(templateProcessor, templatePreparator); Map<String, List<ApiClusterTemplateConfig>> roleConfigs = mapRoleConfigs(); List<ApiClusterTemplateConfig> masterNN = roleConfigs.get("hdfs-NAMENODE-BASE"); List<ApiClusterTemplateConfig> workerDN = roleConfigs.get("hdfs-DATANODE-BASE"); List<ApiClusterTemplateConfig> computeDN = roleConfigs.get("hdfs-DATANODE-compute"); assertEquals(1, workerDN.size()); assertEquals("dfs_data_dir_list", workerDN.get(0).getName()); assertEquals("/hadoopfs/fs1/datanode,/hadoopfs/fs2/datanode", workerDN.get(0).getValue()); assertEquals(1, masterNN.size()); assertEquals("dfs_name_dir_list", masterNN.get(0).getName()); assertEquals(1, computeDN.size()); assertEquals("dfs_data_dir_list", computeDN.get(0).getName()); assertEquals("/hadoopfs/root1/datanode", computeDN.get(0).getValue()); }
public void process(CmTemplateProcessor templateProcessor, TemplatePreparationObject source) { if (!getHostTemplates(templateProcessor).isEmpty()) { updateConfigsInTemplate(templateProcessor, generateConfigs(templateProcessor, source)); } }
CmHostGroupRoleConfigProviderProcessor { public void process(CmTemplateProcessor templateProcessor, TemplatePreparationObject source) { if (!getHostTemplates(templateProcessor).isEmpty()) { updateConfigsInTemplate(templateProcessor, generateConfigs(templateProcessor, source)); } } }
CmHostGroupRoleConfigProviderProcessor { public void process(CmTemplateProcessor templateProcessor, TemplatePreparationObject source) { if (!getHostTemplates(templateProcessor).isEmpty()) { updateConfigsInTemplate(templateProcessor, generateConfigs(templateProcessor, source)); } }  }
CmHostGroupRoleConfigProviderProcessor { public void process(CmTemplateProcessor templateProcessor, TemplatePreparationObject source) { if (!getHostTemplates(templateProcessor).isEmpty()) { updateConfigsInTemplate(templateProcessor, generateConfigs(templateProcessor, source)); } }  void process(CmTemplateProcessor templateProcessor, TemplatePreparationObject source); }
CmHostGroupRoleConfigProviderProcessor { public void process(CmTemplateProcessor templateProcessor, TemplatePreparationObject source) { if (!getHostTemplates(templateProcessor).isEmpty()) { updateConfigsInTemplate(templateProcessor, generateConfigs(templateProcessor, source)); } }  void process(CmTemplateProcessor templateProcessor, TemplatePreparationObject source);  }