use of com.alibaba.jstorm.cluster.StormZkClusterState in project jstorm by alibaba.
the class ServiceHandler method getSupervisorConf.
@Override
public String getSupervisorConf(String id) throws TException {
Map<Object, Object> ret = new HashMap<>();
ret.putAll(data.getConf());
try {
SupervisorInfo supervisorInfo = (SupervisorInfo) (((StormZkClusterState) this.data.getStormClusterState()).getObject(Cluster.supervisor_path(id), false));
if (supervisorInfo != null && supervisorInfo.getSupervisorConf() != null) {
ret.putAll(supervisorInfo.getSupervisorConf());
} else {
LOG.warn("supervisor conf not found in nimbus cache, supervisor id:{}, so fall back to nimbus conf", id);
}
} catch (Exception ex) {
LOG.error("Error:", ex);
}
return JStormUtils.to_json(ret);
}
Aggregations