protected TridentState addSourcedStateNode(List<Stream> sources, Node newNode) { registerSourcedNode(sources, newNode); return new TridentState(this, newNode); }
protected Stream addNode(Node n) { registerNode(n); return new Stream(this, n.name, n); }
protected Stream addSourcedNode(List<Stream> sources, Node newNode) { registerSourcedNode(sources, newNode); return new Stream(this, newNode.name, newNode); }
/** * Returns a stream consisting of the elements of this stream that match the given filter. * * @param filter the filter to apply to each trident tuple to determine if it should be included. * @return the new stream */ public Stream filter(Filter filter) { return each(getOutputFields(), filter); }
/** * Returns a stream consisting of the elements of this stream that match the given filter. * * @param inputFields the fields of the input trident tuple to be selected. * @param filter the filter to apply to each trident tuple to determine if it should be included. * @return the new stream */ public Stream filter(Fields inputFields, Filter filter) { return each(inputFields, filter); }
@Override public Stream apply(Stream input) { Fields outputFields = input.getOutputFields(); return input.partitionAggregate(outputFields, _agg, outputFields) .global() .partitionAggregate(outputFields, _agg, outputFields); }
public Stream aggregate(Aggregator agg, Fields functionFields) { return aggregate(null, agg, functionFields); }
public Stream partitionAggregate(CombinerAggregator agg, Fields functionFields) { return partitionAggregate(null, agg, functionFields); }
@Override public IAggregatableStream aggPartition(Stream s) { return s.global(); }
@Override public IAggregatableStream aggPartition(Stream s) { return s.batchGlobal(); }
public Stream join(List<Stream> streams, List<Fields> joinFields, Fields outFields) { return join(streams, joinFields, outFields, JoinType.INNER); }
/** * Applies a label to the stream. Naming a stream will append the label to the name of the bolt(s) created by * Trident and will be visible in the Storm UI. * * @param name - The label to apply to the stream * @return */ public Stream name(String name) { return new Stream(_topology, name, _node); }
public TridentState persistentAggregate(StateSpec spec, CombinerAggregator agg, Fields functionFields) { return persistentAggregate(spec, null, agg, functionFields); }
@Override public Fields getOutputFields() { return _stream.getOutputFields(); }
public Stream each(Function function, Fields functionFields) { return each(null, function, functionFields); }
public Stream aggregate(ReducerAggregator agg, Fields functionFields) { return aggregate(null, agg, functionFields); }
public Stream partitionAggregate(ReducerAggregator agg, Fields functionFields) { return partitionAggregate(null, agg, functionFields); }
public Stream newValuesStream() { return new Stream(_topology, _node.name, _node); }
public TridentState persistentAggregate(StateSpec spec, ReducerAggregator agg, Fields functionFields) { return persistentAggregate(spec, null, agg, functionFields); }
public Stream partitionAggregate(Aggregator agg, Fields functionFields) { return partitionAggregate(null, agg, functionFields); }