public Object getFieldValue(_Fields field) { switch (field) { case COMPONENT_ID: return get_componentId(); case STREAM_ID: return get_streamId(); } throw new IllegalStateException(); }
protected IdStreamSpec(String component, String stream) { _id = new GlobalStreamId(component, stream); } }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof GlobalStreamId) return this.equals((GlobalStreamId)that); return false; }
/** * Performs a deep copy on <i>other</i>. */ public GlobalStreamId(GlobalStreamId other) { if (other.is_set_componentId()) { this.componentId = other.componentId; } if (other.is_set_streamId()) { this.streamId = other.streamId; } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case COMPONENT_ID: if (value == null) { unset_componentId(); } else { set_componentId((String)value); } break; case STREAM_ID: if (value == null) { unset_streamId(); } else { set_streamId((String)value); } break; } }
for (int _i27 = 0; _i27 < _map24.size; ++_i27) _key25 = new GlobalStreamId(); _key25.read(iprot); _val26 = new Grouping(); _val26.read(iprot);
@Override public String getComponent() { return stream.get_componentId(); } });
Map<GlobalStreamId, String> fleshOutStreamBatchIds(boolean includeCommitStream) { Map<GlobalStreamId, String> ret = new HashMap<>(_batchIds); Set<String> allBatches = new HashSet(_batchIds.values()); for(String b: allBatches) { ret.put(new GlobalStreamId(masterCoordinator(b), MasterBatchCoordinator.BATCH_STREAM_ID), b); if(includeCommitStream) { ret.put(new GlobalStreamId(masterCoordinator(b), MasterBatchCoordinator.COMMIT_STREAM_ID), b); } // DO NOT include the success stream as part of the batch. it should not trigger coordination tuples, // and is just a metadata tuple to assist in cleanup, should not trigger batch tracking } for(String id: _spouts.keySet()) { TransactionalSpoutComponent c = _spouts.get(id); if(c.batchGroupId!=null) { ret.put(new GlobalStreamId(spoutCoordinator(id), MasterBatchCoordinator.BATCH_STREAM_ID), c.batchGroupId); } } //this takes care of setting up coord streams for spouts and bolts for(GlobalStreamId s: _batchIds.keySet()) { String b = _batchIds.get(s); ret.put(new GlobalStreamId(s.get_componentId(), TridentBoltExecutor.COORD_STREAM(b)), b); } return ret; }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_componentId()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'componentId' is unset! Struct:" + toString()); } if (!is_set_streamId()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'streamId' is unset! Struct:" + toString()); } // check for sub-struct validity }
@Override public String getStream() { return stream.get_streamId(); } });
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); } }
for (int _i39 = 0; _i39 < _map36.size; ++_i39) _key37 = new GlobalStreamId(); _key37.read(iprot); _val38 = new Grouping(); _val38.read(iprot);
/** * Performs a deep copy on <i>other</i>. */ public GlobalStreamId(GlobalStreamId other) { if (other.is_set_componentId()) { this.componentId = other.componentId; } if (other.is_set_streamId()) { this.streamId = other.streamId; } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case COMPONENT_ID: if (value == null) { unset_componentId(); } else { set_componentId((String)value); } break; case STREAM_ID: if (value == null) { unset_streamId(); } else { set_streamId((String)value); } break; } }
@Override public String getComponent() { return stream.get_componentId(); } });
/** * For bolts that has incoming streams from spouts (the root bolts), * add checkpoint stream from checkpoint spout to its input. For other bolts, * add checkpoint stream from the previous bolt to its input. */ private void addCheckPointInputs(ComponentCommon component) { Set<GlobalStreamId> checkPointInputs = new HashSet<>(); for (GlobalStreamId inputStream : component.get_inputs().keySet()) { String sourceId = inputStream.get_componentId(); if (_spouts.containsKey(sourceId)) { checkPointInputs.add(new GlobalStreamId(CheckpointSpout.CHECKPOINT_COMPONENT_ID, CheckpointSpout.CHECKPOINT_STREAM_ID)); } else { checkPointInputs.add(new GlobalStreamId(sourceId, CheckpointSpout.CHECKPOINT_STREAM_ID)); } } for (GlobalStreamId streamId : checkPointInputs) { component.put_to_inputs(streamId, Grouping.all(new NullStruct())); } } private ComponentCommon getComponentCommon(String id, IComponent component) {
public void validate() throws org.apache.thrift7.TException { // check for required fields if (!is_set_componentId()) { throw new org.apache.thrift7.protocol.TProtocolException("Required field 'componentId' is unset! Struct:" + toString()); } if (!is_set_streamId()) { throw new org.apache.thrift7.protocol.TProtocolException("Required field 'streamId' is unset! Struct:" + toString()); } }
private Set<GlobalStreamId> getComponentStreams(TopologyContext context) { Set<GlobalStreamId> streams = new HashSet<>(); for (GlobalStreamId streamId : context.getThisSources().keySet()) { if (!streamId.get_streamId().equals(CheckpointSpout.CHECKPOINT_STREAM_ID)) { streams.add(streamId); } } return streams; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in))); } catch (org.apache.thrift7.TException te) { throw new java.io.IOException(te); } }
public Object getFieldValue(_Fields field) { switch (field) { case COMPONENT_ID: return get_componentId(); case STREAM_ID: return get_streamId(); } throw new IllegalStateException(); }