static Map<String, Map<String, Double>> getSpoutsResources(StormTopology topology, Map<String, Object> topologyConf) { Map<String, Map<String, Double>> spoutResources = new HashMap<>(); if (topology.get_spouts() != null) { for (Map.Entry<String, SpoutSpec> spout : topology.get_spouts().entrySet()) { Map<String, Double> topologyResources = parseResources(spout.getValue().get_common().get_json_conf()); checkInitialization(topologyResources, spout.getValue().toString(), topologyConf); spoutResources.put(spout.getKey(), topologyResources); } } return spoutResources; }
public void validate() throws org.apache.storm.thrift.TException { // check for required fields if (!is_set_spout_object()) { throw new org.apache.storm.thrift.protocol.TProtocolException("Required field 'spout_object' is unset! Struct:" + toString()); } if (!is_set_common()) { throw new org.apache.storm.thrift.protocol.TProtocolException("Required field 'common' is unset! Struct:" + toString()); } // check for sub-struct validity if (common != null) { common.validate(); } }
public static Map<String, Map<String, Double>> getSpoutsResources(StormTopology topology, Map topologyConf) { Map<String, Map<String, Double>> spoutResources = new HashMap<String, Map<String, Double>>(); if (topology.get_spouts() != null) { for (Map.Entry<String, SpoutSpec> spout : topology.get_spouts().entrySet()) { Map<String, Double> topology_resources = parseResources(spout.getValue().get_common().get_json_conf()); checkIntialization(topology_resources, spout.getValue().toString(), topologyConf); spoutResources.put(spout.getKey(), topology_resources); } } return spoutResources; }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_spout_object()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'spout_object' is unset! Struct:" + toString()); } if (!is_set_common()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'common' is unset! Struct:" + toString()); } // check for sub-struct validity if (common != null) { common.validate(); } }
Map<String, Double> topology_resources = ResourceUtils.parseResources(spout .getValue().get_common().get_json_conf()); ResourceUtils.checkIntialization(topology_resources, spout.getValue().toString(), this.topologyConf); for (Map.Entry<ExecutorDetails, String> anExecutorToComponent : this.executorToComponent.entrySet()) { if (spout.getKey().equals(anExecutorToComponent.getValue())) {