You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Ray <ra...@cisco.com> on 2017/10/09 04:34:48 UTC

Ignite started as a server node instead of client node in yarn-client mode

I'm trying to ingest data into using ignite-spark-2.10.
I followed the guide in ScalarSharedRDDExample.scala and started
IgniteContext like this
val igniteContext = new IgniteContext(sparkContext, "example-ignite.xml",
true)

And I started six executors in yarn-client mode, and I expect Ignite will
launch six client on each of the executors to ingest data into Ignite.
But Ignite launch six server nodes instead of client nodes on the executors.
I see these two lines of code in IgniteContext.scala on line number 139.
        // check if called from driver
        if (sparkContext != null) igniteCfg.setClientMode(true)

So it confuses me, I clearly passed the sparkContext into IgniteContext but
Ignite still launches server nodes on executors.
So I wonder is there any configuration that you didn't mention in the docs
and ScalarSharedRDDExample.scala I should change to get Ignite launch as
client mode on the executors or is this a bug?

Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite started as a server node instead of client node in yarn-client mode

Posted by Ray <ra...@cisco.com>.
Solved my own problem by adding
        <property name="clientMode" value="true"/>
in the configuration file.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite started as a server node instead of client node in yarn-client mode

Posted by Ray <ra...@cisco.com>.
Found these code on IgniteContext.scala
        // Start ignite server node on each worker in server mode.
        sparkContext.parallelize(1 to workers, workers).foreachPartition(it
⇒ ignite())

Looks like starting server node on each executor is expected.
But I want to ingest data to an existing Ignite cluster using a spark job,
when the spark job finishes the executor will be revoked.
If server node is launched on each executor the data stored on the server
node will be lost.
Please advise me how I can accomplish my requirement.

Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/