if [parameter] is a tuple, no need to construct you bolt with it. Storm
will handle that for you
so the spout should look like
public void nextTuple() {
    ...
    _collector.emit(new Values(The_value, the other value));
}

the bolt will look like

public void execute(Tuple tuple) {
The_value = tuple.getObject(0);
....

        _collector.emit(tuple, new Values(the_transformed_value));
        _collector.ack(tuple);
    }

https://storm.apache.org/documentation/Tutorial.html is a good start...


if [parameter] is something you need to parameterize the bold (I do not
know, jdbc url, imdg endpoint, path on file system, any kind of dependency
injection), then you code is
public main(...
         String jdbcUrl ="jdbc...";
         builder.setBolt("ExecutorBolt", new Bolt(jdbcUrl ),
1).shuffleGrouping("SpoutTuple");


HTH

On Fri, May 22, 2015 at 1:47 AM, Chun Yuen Lim <[email protected]>
wrote:

> Good day,
>
> builder.setSpout("SpoutTuple", new Spout(), 1);
> builder.setBolt("ExecutorBolt", new Bolt(parameter),
> 1).shuffleGrouping("SpoutTuple");
>
> Is it possible to sent tuple as parameter for next bolt?
> How should I implement it in storm topology using Java? I mean how to
> write the code in storm topology refer to above coding.
>
>
>

Reply via email to