Hi, You can check if an ignite instance is already available and use it else create a new instance. Please find link for sample implementation below.
https://github.com/apache/ignite/blob/master/modules/flink/src/main/java/org/apache/ignite/sink/flink/IgniteSink.java#L146-L151 Regards, Saikat On Mon, Sep 3, 2018 at 7:47 AM, monstereo <[email protected]> wrote: > Hi, > > I want to integrate Apache Storm with Ignite. > As you know, Storm uses executors(which are Threads) > Here is the pseudo code in my Spout(related to Storm) > > public class MySpout{ > private boolean isIgniteCreated = false > public void open(Map map, TopologyContext topologyContext, > SpoutOutputCollector spoutOutputCollector){ > if (isIgniteCreated){ > create ignite node > isIgniteCreated=true > } > > When i working storm (included ignite), sometimes ignite give an error > ("Ignite instance already started ...") > Then, i thought that this code is useless (and give the error "Ignite > instance already started ..." because of threads) > then, i have changed to variable to "volatile" > > Like this situation, is there anything that i should do carefully when > working Storm? > > Thanks... > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >
