@Test public void testProcessWhenSharedConfigThenAddVolumeConfig() { HostgroupView master1 = new HostgroupView("master1", 1, InstanceGroupType.GATEWAY, 1); HostgroupView master2 = new HostgroupView("master2", 1, InstanceGroupType.GATEWAY, 1); HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 2); HostgroupView compute = new HostgroupView("compute", 3, InstanceGroupType.CORE, 2); HostgroupView quorum = new HostgroupView("quorum", 3, InstanceGroupType.CORE, 2); setup("input/cb5660.bp", Builder.builder().withHostgroupViews(Set.of(master1, master2, worker, compute, quorum))); underTest.process(templateProcessor, templatePreparator); Map<String, List<ApiClusterTemplateConfig>> roleConfigs = mapRoleConfigs(); List<ApiClusterTemplateConfig> journalNodeBase = roleConfigs.get("hdfs-JOURNALNODE-BASE"); assertEquals(1, journalNodeBase.size()); assertEquals("dfs_journalnode_edits_dir", journalNodeBase.get(0).getName()); assertEquals("/hadoopfs/fs1/journalnode", journalNodeBase.get(0).getValue()); List<ApiClusterTemplateConfig> zkServerBase = roleConfigs.get("zookeeper-SERVER-BASE"); assertEquals("dataDir", zkServerBase.get(0).getName()); assertEquals("/hadoopfs/fs1/zookeeper", zkServerBase.get(0).getValue()); assertEquals("dataLogDir", zkServerBase.get(1).getName()); assertEquals("/hadoopfs/fs1/zookeeper", zkServerBase.get(1).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);  }