List<Stage> stages = new ArrayList<Stage>();
stages.add(new Stage(requestId1, "/a1", clusterName, context));
stages.get(0).setStageId(1);
stages.get(0).addHostRoleExecutionCommand(hostName1, Role.HBASE_MASTER,
RoleCommand.START,
new ServiceComponentHostStartEvent(Role.HBASE_MASTER.toString(),
hostName1, System.currentTimeMillis(),
new HashMap<String, String>()),
clusterName, "HBASE");
stages.add(new Stage(requestId1, "/a2", clusterName, context));
stages.get(1).setStageId(2);
stages.get(1).addHostRoleExecutionCommand(hostName1, Role.HBASE_CLIENT,
RoleCommand.START,
new ServiceComponentHostStartEvent(Role.HBASE_CLIENT.toString(),
hostName1, System.currentTimeMillis(),
new HashMap<String, String>()), clusterName, "HBASE");
stages.add(new Stage(requestId1, "/a3", clusterName, context));
stages.get(2).setStageId(3);
stages.get(2).addHostRoleExecutionCommand(hostName1, Role.HBASE_CLIENT,
RoleCommand.START,
new ServiceComponentHostStartEvent(Role.HBASE_CLIENT.toString(),
hostName1, System.currentTimeMillis(),
new HashMap<String, String>()), clusterName, "HBASE");
stages.add(new Stage(requestId2, "/a4", clusterName, context));
stages.get(3).setStageId(4);
stages.get(3).addHostRoleExecutionCommand(hostName1, Role.HBASE_CLIENT,
RoleCommand.START,
new ServiceComponentHostStartEvent(Role.HBASE_CLIENT.toString(),
hostName1, System.currentTimeMillis(),
new HashMap<String, String>()), clusterName, "HBASE");
stages.add(new Stage(requestId2, "/a5", clusterName, context));
stages.get(4).setStageId(5);
stages.get(4).addHostRoleExecutionCommand(hostName1, Role.HBASE_CLIENT,
RoleCommand.START,
new ServiceComponentHostStartEvent(Role.HBASE_CLIENT.toString(),
hostName1, System.currentTimeMillis(),
new HashMap<String, String>()), clusterName, "HBASE");
actionDB.persistActions(stages);