@InterfaceStability.Unstable public class StreamBuilder extends Object
StormTopology via storm streams api (DSL).| Constructor and Description |
|---|
StreamBuilder()
Creates a new
StreamBuilder. |
| Modifier and Type | Method and Description |
|---|---|
StormTopology |
build()
Builds a new
StormTopology for the computation expressed via the stream api. |
Stream<Tuple> |
newStream(IRichSpout spout)
Creates a new
Stream of tuples from the given IRichSpout. |
Stream<Tuple> |
newStream(IRichSpout spout,
int parallelism)
Creates a new
Stream of tuples from the given IRichSpout with the given parallelism. |
<K,V> PairStream<K,V> |
newStream(IRichSpout spout,
PairValueMapper<K,V> pairValueMapper)
Creates a new
PairStream of key-value pairs from the given IRichSpout by extracting key and value from tuples via the
supplied PairValueMapper. |
<K,V> PairStream<K,V> |
newStream(IRichSpout spout,
PairValueMapper<K,V> pairValueMapper,
int parallelism)
Creates a new
PairStream of key-value pairs from the given IRichSpout by extracting key and value from tuples via the
supplied PairValueMapper and with the given value of parallelism. |
<T> Stream<T> |
newStream(IRichSpout spout,
TupleValueMapper<T> valueMapper)
Creates a new
Stream of values from the given IRichSpout by extracting field(s) from tuples via the supplied TupleValueMapper. |
<T> Stream<T> |
newStream(IRichSpout spout,
TupleValueMapper<T> valueMapper,
int parallelism)
Creates a new
Stream of values from the given IRichSpout by extracting field(s) from tuples via the supplied TupleValueMapper with the given parallelism. |
public StreamBuilder()
StreamBuilder.public Stream<Tuple> newStream(IRichSpout spout)
Stream of tuples from the given IRichSpout.spout - the spoutpublic Stream<Tuple> newStream(IRichSpout spout, int parallelism)
Stream of tuples from the given IRichSpout with the given parallelism.spout - the spoutparallelism - the parallelism of the streampublic <T> Stream<T> newStream(IRichSpout spout, TupleValueMapper<T> valueMapper)
Stream of values from the given IRichSpout by extracting field(s) from tuples via the supplied TupleValueMapper.T - the type of values in the resultant streamspout - the spoutvalueMapper - the value mapperpublic <T> Stream<T> newStream(IRichSpout spout, TupleValueMapper<T> valueMapper, int parallelism)
Stream of values from the given IRichSpout by extracting field(s) from tuples via the supplied TupleValueMapper with the given parallelism.T - the type of values in the resultant streamspout - the spoutvalueMapper - the value mapperparallelism - the parallelism of the streampublic <K,V> PairStream<K,V> newStream(IRichSpout spout, PairValueMapper<K,V> pairValueMapper)
PairStream of key-value pairs from the given IRichSpout by extracting key and value from tuples via the
supplied PairValueMapper.K - the key typeV - the value typespout - the spoutpairValueMapper - the pair value mapperpublic <K,V> PairStream<K,V> newStream(IRichSpout spout, PairValueMapper<K,V> pairValueMapper, int parallelism)
PairStream of key-value pairs from the given IRichSpout by extracting key and value from tuples via the
supplied PairValueMapper and with the given value of parallelism.K - the key typeV - the value typespout - the spoutpairValueMapper - the pair value mapperparallelism - the parallelism of the streampublic StormTopology build()
StormTopology for the computation expressed via the stream api.Copyright © 2023 The Apache Software Foundation. All rights reserved.