/** * Gets the declared output fields for the specified global stream id. */ public Fields getComponentOutputFields(GlobalStreamId id) { return getComponentOutputFields(id.get_componentId(), id.get_streamId()); }
@Override public Fields getFields() { return context.getComponentOutputFields(getSourceComponent(), getSourceStreamId()); }
public TupleImpl(GeneralTopologyContext context, List<Object> values, String srcComponent, int taskId, String streamId, MessageId id) { this.values = context.doSanityCheck() ? Collections.unmodifiableList(values) : values; this.taskId = taskId; this.streamId = streamId; this.id = id; this.context = context; this.srcComponent = srcComponent; if (context.doSanityCheck()) { String componentId = context.getComponentId(taskId); Fields schema = context.getComponentOutputFields(componentId, streamId); if (values.size() != schema.size()) { throw new IllegalArgumentException("Tuple created with wrong number of fields. Expected " + schema.size() + " fields but got " + values.size() + " fields"); } } }
/** * Gets the declared output fields for the specified global stream id. */ public Fields getComponentOutputFields(GlobalStreamId id) { return getComponentOutputFields(id.get_componentId(), id.get_streamId()); }
public Fields getFields() { return context.getComponentOutputFields(getSourceComponent(), getSourceStreamId()); }
public TupleImpl(GeneralTopologyContext context, List<Object> values, int taskId, String streamId, MessageId id) { this.values = values; this.taskId = taskId; this.streamId = streamId; this.id = id; this.context = context; String componentId = context.getComponentId(taskId); Fields schema = context.getComponentOutputFields(componentId, streamId); if(values.size()!=schema.size()) { throw new IllegalArgumentException( "Tuple created with wrong number of fields. " + "Expected " + schema.size() + " fields but got " + values.size() + " fields"); } }