taskid = ctx.getExternalContext().getRequestParameterMap()
.get("taskid");
}
if (topologyid == null) {
throw new NotAliveException("Input topologyId is null ");
}
if (taskid == null) {
throw new NotAliveException("Input taskId is null ");
}
NimbusClient client = null;
try {
if(clusterName != null && !(clusterName.equals(""))) {
UIUtils.getClusterInfoByName(conf, clusterName);
}
client = NimbusClient.getConfiguredClient(conf);
TopologyInfo summ = client.getClient().getTopologyInfo(topologyid);
// find the specified task entity
TaskSummary taskSummary = null;
for (TaskSummary _taskSummary : summ.get_tasks()) {
if (taskid.equals(String.valueOf(_taskSummary.get_task_id()))) {
taskSummary = _taskSummary;
break;
}
}
if (taskSummary == null) {
throw new NotAliveException("topologyid=" + topologyid
+ ", taskid=" + taskid);
}
ComponentTask componentTask = UIUtils.getComponentTask(taskSummary,
topologyid);