public TopologyInfo deepCopy() { return new TopologyInfo(this); }
public Object getFieldValue(_Fields field) { switch (field) { case ID: return get_id(); case NAME: return get_name(); case UPTIME_SECS: return Integer.valueOf(get_uptime_secs()); case TASKS: return get_tasks(); case STATUS: return get_status(); } throw new IllegalStateException(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TopologyInfo) return this.equals((TopologyInfo)that); return false; }
public void validate() throws org.apache.thrift7.TException { // check for required fields if (!is_set_id()) { throw new org.apache.thrift7.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString()); } if (!is_set_name()) { throw new org.apache.thrift7.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString()); } if (!is_set_uptime_secs()) { throw new org.apache.thrift7.protocol.TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString()); } if (!is_set_tasks()) { throw new org.apache.thrift7.protocol.TProtocolException("Required field 'tasks' is unset! Struct:" + toString()); } if (!is_set_status()) { throw new org.apache.thrift7.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString()); } }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_topology()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'topology' is unset! Struct:" + toString()); } if (!is_set_components()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'components' is unset! Struct:" + toString()); } if (!is_set_tasks()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tasks' is unset! Struct:" + toString()); } if (!is_set_metrics()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'metrics' is unset! Struct:" + toString()); } // check for sub-struct validity if (topology != null) { topology.validate(); } if (metrics != null) { metrics.validate(); } }
public Object getFieldValue(_Fields field) { switch (field) { case ID: return get_id(); case NAME: return get_name(); case UPTIME_SECS: return Integer.valueOf(get_uptime_secs()); case EXECUTORS: return get_executors(); case STATUS: return get_status(); case ERRORS: return get_errors(); } throw new IllegalStateException(); }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_id()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString()); } if (!is_set_name()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString()); } if (!is_set_uptime_secs()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString()); } if (!is_set_executors()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'executors' is unset! Struct:" + toString()); } if (!is_set_status()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString()); } if (!is_set_errors()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'errors' is unset! Struct:" + toString()); } }
TopologyInfo topologyInfo = new TopologyInfo(); topologyInfo.set_topology(topologySummary); topologyInfo.set_components(JStormUtils.mk_list(componentSummaryMap.values())); topologyInfo.set_tasks(JStormUtils.mk_list(taskSummaryMap.values())); taskMetric, streamMetric, nettyMetric); topologyMetrics.set_compStreamMetric(compStreamMetric); topologyInfo.set_metrics(topologyMetrics);
case 0: // SUCCESS if (field.type == org.apache.thrift7.protocol.TType.STRUCT) { this.success = new TopologyInfo(); this.success.read(iprot); } else { org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
struct.topology = new TopologySummary(); struct.topology.read(iprot); struct.set_topology_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.set_components_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.set_tasks_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.metrics = new TopologyMetric(); struct.metrics.read(iprot); struct.set_metrics_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
if (field.type == org.apache.thrift7.protocol.TType.I32) { this.uptime_secs = iprot.readI32(); set_uptime_secs_isSet(true); } else { org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type); validate();
int uptime = info.get_uptime_secs(); long acked = 0; long failed = 0; double weightedAvgTotal = 0.0; for (ExecutorSummary exec : info.get_executors()) { if ("spout".equals(exec.get_component_id())) { SpoutStats stats = exec.get_stats().get_specific().get_spout();
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, TopologyInfo struct) throws org.apache.thrift.TException { struct.validate();
topologyInfo.setId(info.get_id()); topologyInfo.setName(info.get_name()); topologyInfo.setStatus(info.get_status()); topologyInfo.setUptimeSecs(info.get_uptime_secs()); topologyInfo.setTopologyConf(topologyConf); : info.get_errors().entrySet()) { List<ErrorInfo> errorInfoList = new ArrayList<>(); for (backtype.storm.generated.ErrorInfo ei : error.getValue()) { for (backtype.storm.generated.ExecutorSummary es : info.get_executors()) { ExecutorSummary executor = new ExecutorSummary(); executor.setComponentId(es.get_component_id());
TopologyInfo topologyInfo = new TopologyInfo(); topologyInfo.set_topology(topologySummary); topologyInfo.set_components(JStormUtils.mk_list(componentSummaryMap.values())); topologyInfo.set_tasks(JStormUtils.mk_list(taskSummaryMap.values())); topologyInfo.set_metrics(topologyMetrics);
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_topology()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'topology' is unset! Struct:" + toString()); } if (!is_set_components()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'components' is unset! Struct:" + toString()); } if (!is_set_tasks()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tasks' is unset! Struct:" + toString()); } if (!is_set_metrics()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'metrics' is unset! Struct:" + toString()); } // check for sub-struct validity if (topology != null) { topology.validate(); } if (metrics != null) { metrics.validate(); } }
case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new TopologyInfo(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
struct.topology = new TopologySummary(); struct.topology.read(iprot); struct.set_topology_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.set_components_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.set_tasks_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.metrics = new TopologyMetric(); struct.metrics.read(iprot); struct.set_metrics_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
if (field.type == org.apache.thrift.protocol.TType.I32) { this.uptime_secs = iprot.readI32(); set_uptime_secs_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); validate();