@Test public void testGetRoleConfigsWithAllHostGroupZeroAttachedVolumes() { HostgroupView master = new HostgroupView("master", 0, InstanceGroupType.GATEWAY, 1); HostgroupView worker = new HostgroupView("worker", 0, InstanceGroupType.CORE, 2); setup("input/clouderamanager.bp", Builder.builder().withHostgroupViews(Set.of(master, worker))); underTest.process(templateProcessor, templatePreparator); Map<String, List<ApiClusterTemplateConfig>> roleConfigs = mapRoleConfigs(); List<ApiClusterTemplateConfig> masterNN = roleConfigs.get("hdfs-NAMENODE-BASE"); List<ApiClusterTemplateConfig> masterSN = roleConfigs.get("hdfs-SECONDARYNAMENODE-BASE"); List<ApiClusterTemplateConfig> workerDN = roleConfigs.get("hdfs-DATANODE-BASE"); List<ApiClusterTemplateConfig> workerNM = roleConfigs.get("yarn-NODEMANAGER-BASE"); assertEquals(1, masterNN.size()); assertEquals(1, masterSN.size()); assertEquals(1, workerDN.size()); assertEquals("dfs_name_dir_list", masterNN.get(0).getName()); assertEquals("/hadoopfs/root1/namenode", masterNN.get(0).getValue()); assertEquals("fs_checkpoint_dir_list", masterSN.get(0).getName()); assertEquals("/hadoopfs/root1/namesecondary", masterSN.get(0).getValue()); assertEquals("dfs_data_dir_list", workerDN.get(0).getName()); assertEquals("/hadoopfs/root1/datanode", workerDN.get(0).getValue()); assertEquals("yarn_nodemanager_local_dirs", workerNM.get(0).getName()); assertEquals("/hadoopfs/root1/nodemanager", workerNM.get(0).getValue()); assertEquals("yarn_nodemanager_log_dirs", workerNM.get(1).getName()); assertEquals("/hadoopfs/root1/nodemanager/log", workerNM.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);  }