}
@SuppressWarnings("rawtypes")
private void init() throws TException, NotAliveException {
NimbusClient client = null;
try {
Map conf = UIUtils.readUiConfig();
if(clusterName != null && !(clusterName.equals(""))) {
UIUtils.getClusterInfoByName(conf, clusterName);
}
client = NimbusClient.getConfiguredClient(conf);
TopologyInfo summ = client.getClient().getTopologyInfo(topologyid);
StormTopology topology = client.getClient().getTopology(topologyid);
TopologyMetricInfo topologyMetricInfo = client.getClient().getTopologyMetric(topologyid);
String type = UIUtils.componentType(topology, componentid);
List<TaskSummary> ts = UIUtils.getTaskList(summ.get_tasks(),
componentid);
coms = getComponentSummaries(summ, ts);
cts = getComponentTasks(ts, window);
comstats = getWinComponentStats(ts, window);
getOutputSummary(ts, window);
List<TaskMetricData> totoaltaskmetrics = topologyMetricInfo.get_task_metric_list();
taskmetrics = getTaskMetricsList(totoaltaskmetrics);
} catch (TException e) {
LOG.error(e.getCause(), e);
throw e;
} catch (NotAliveException e) {
LOG.error(e.getCause(), e);
throw e;
} finally {
if (client != null) {
client.close();
}
}
}