Map<String, String> snnConfig = new HashMap<String, String>();
snnConfig.put("secondary_namenode_java_heapsize", "1024");
configs.put("HDFS_SECONDARY_NAMENODE", snnConfig);
group01.setConfiguration(configs);
NodeInfo node01 = new NodeInfo();
node01.setRack("/rack01");
List<NodeInfo> nodes01 = new ArrayList<>();
nodes01.add(node01);
group01.setNodes(nodes01);
NodeGroupInfo group02 = new NodeGroupInfo();
group02.setName("worker");
List<String> roles02 = new ArrayList<>();
roles02.add("HDFS_DATANODE");
roles02.add("YARN_NODE_MANAGER");
group02.setRoles(roles02);
Map<String, Object> configs02 = new HashMap<String, Object>();
Map<String, String> dnConfig = new HashMap<String, String>();
dnConfig.put("dfs_datanode_failed_volumes_tolerated", "2");
configs02.put("HDFS_DATANODE", dnConfig);
group02.setConfiguration(configs02);
NodeInfo node02 = new NodeInfo();
node02.setRack("/rack02");
List<NodeInfo> nodes02 = new ArrayList<>();
nodes02.add(node02);
group02.setNodes(nodes02);
group02.setInstanceNum(3);