/** * Gets the set of streams declared for the specified component. */ public Set<String> getComponentStreams(String componentId) { return getComponentCommon(componentId).get_streams().keySet(); }
public IdDictionary(StormTopology topology) { List<String> componentNames = new ArrayList<>(topology.get_spouts().keySet()); componentNames.addAll(topology.get_bolts().keySet()); componentNames.addAll(topology.get_state_spouts().keySet()); for (String name : componentNames) { ComponentCommon common = Utils.getComponentCommon(topology, name); List<String> streams = new ArrayList<>(common.get_streams().keySet()); streamNametoId.put(name, idify(streams)); streamIdToName.put(name, simpleReverseMap(streamNametoId.get(name))); } }
for (String streamName : spoutSpec.get_common().get_streams().keySet()) { if (streamName.contains(".")) { LOG.warn("Metrics for stream name '{}' will be reported as '{}'.", streamName, streamName.replace('.', '_')); for (String streamName : bolt.get_common().get_streams().keySet()) { if (streamName.contains(".")) { LOG.warn("Metrics for stream name '{}' will be reported as '{}'.", streamName, streamName.replace('.', '_'));
public java.lang.Object getFieldValue(_Fields field) { switch (field) { case INPUTS: return get_inputs(); case STREAMS: return get_streams(); case PARALLELISM_HINT: return get_parallelism_hint(); case JSON_CONF: return get_json_conf(); } throw new java.lang.IllegalStateException(); }
for (String stream : workerTopologyContext.getComponentCommon(componentId).get_streams().keySet()) { if (!ret.containsKey(stream)) { ret.put(stream, null);
for (String streamName : spoutSpec.get_common().get_streams().keySet()) { if (streamName.contains(".")) { throw new WrappedInvalidTopologyException(String.format("Stream name '%s' contains illegal character '.'", streamName)); for (String streamName : bolt.get_common().get_streams().keySet()) { if (streamName.contains(".")) { throw new WrappedInvalidTopologyException(String.format("Stream name '%s' contains illegal character '.'", streamName));
private static Set<String> validateIds(Map<String, ? extends Object> componentMap) throws InvalidTopologyException { Set<String> keys = componentMap.keySet(); for (String id : keys) { if (Utils.isSystemId(id)) { throw new WrappedInvalidTopologyException(id + " is not a valid component id."); } } for (Object componentObj : componentMap.values()) { ComponentCommon common = getComponentCommon(componentObj); Set<String> streamIds = common.get_streams().keySet(); for (String id : streamIds) { if (Utils.isSystemId(id)) { throw new WrappedInvalidTopologyException(id + " is not a valid stream id."); } } } return keys; }
if (!sourceComponent.get_streams().containsKey(sourceStreamId)) { throw new WrappedInvalidTopologyException("Component: [" + componentId + "] subscribes from non-existent stream: " if (Thrift.groupingType(grouping) == Grouping._Fields.FIELDS) { List<String> fields = new ArrayList<>(grouping.get_fields()); Map<String, StreamInfo> streams = sourceComponent.get_streams(); Set<String> sourceOutputFields = getStreamOutputFields(streams); fields.removeAll(sourceOutputFields);
Map<String, Fields> streamToFields = new HashMap<>(); for (Map.Entry<String, StreamInfo> stream : ThriftTopologyUtils.getComponentCommon(systemTopology, c).get_streams().entrySet()) { streamToFields.put(stream.getKey(), new Fields(stream.getValue().get_output_fields()));
for (Map.Entry<String, SpoutSpec> spoutEntry : topology.get_spouts().entrySet()) { String id = spoutEntry.getKey(); for (Entry<String, StreamInfo> streamEntry : spoutEntry.getValue().get_common().get_streams().entrySet()) { String stream = streamEntry.getKey(); StreamInfo info = streamEntry.getValue(); for (Entry<String, StreamInfo> streamEntry : boltEntry.getValue().get_common().get_streams().entrySet()) { String stream = streamEntry.getKey(); StreamInfo info = streamEntry.getValue();
Map<String, StreamInfo> outputs = common.get_streams(); if (outputs != null) { for (String name : outputs.keySet()) { ComponentCommon common = spout.get_common(); Map<String, StreamInfo> outputs = common.get_streams(); if (outputs != null) { for (String name : outputs.keySet()) {
/** * Gets the set of streams declared for the specified component. */ public Set<String> getComponentStreams(String componentId) { return getComponentCommon(componentId).get_streams().keySet(); }
public IdDictionary(StormTopology topology) { List<String> componentNames = new ArrayList<>(topology.get_spouts().keySet()); componentNames.addAll(topology.get_bolts().keySet()); componentNames.addAll(topology.get_state_spouts().keySet()); for(String name: componentNames) { ComponentCommon common = Utils.getComponentCommon(topology, name); List<String> streams = new ArrayList<>(common.get_streams().keySet()); streamNametoId.put(name, idify(streams)); streamIdToName.put(name, simpleReverseMap(streamNametoId.get(name))); } }
for(String streamName : spoutSpec.get_common().get_streams().keySet()){ if(streamName.contains(".")){ LOG.warn("Metrics for stream name '{}' will be reported as '{}'.", streamName, streamName.replace('.', '_') ); for(String streamName : bolt.get_common().get_streams().keySet()){ if(streamName.contains(".")){ LOG.warn("Metrics for stream name '{}' will be reported as '{}'.", streamName, streamName.replace('.', '_') );
public Object getFieldValue(_Fields field) { switch (field) { case INPUTS: return get_inputs(); case STREAMS: return get_streams(); case PARALLELISM_HINT: return get_parallelism_hint(); case JSON_CONF: return get_json_conf(); } throw new IllegalStateException(); }
for(String streamName : spoutSpec.get_common().get_streams().keySet()){ if(streamName.contains(".")){ throw new InvalidTopologyException(String.format("Stream name '%s' contains illegal character '.'", streamName)); for(String streamName : bolt.get_common().get_streams().keySet()){ if(streamName.contains(".")){ throw new InvalidTopologyException(String.format("Stream name '%s' contains illegal character '.'", streamName));
for (Entry<String, StreamInfo> outStream : common.get_streams().entrySet()) { outputStreams.put(outStream.getKey(), new Fields(outStream.getValue().get_output_fields()));