ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yaoqin <yao...@huawei.com>
Subject 答复: How to get a instance of IgniteContext in spark-shell?
Date Sat, 29 Aug 2015 00:40:28 GMT
[cid:image001.png@01D0E236.535F4BD0]





发件人: Alexey Goncharuk [mailto:alexey.goncharuk@gmail.com]
发送时间: 2015年8月29日 3:13
收件人: user@ignite.apache.org
主题: Re: How to get a instance of IgniteContext in spark-shell?

I assume you are using a 1.3 release, here you can either create an instance of IgniteConfiguration
manually:

val cfg = new IgniteConfiguration()
// configure Ignite
val ic = new IgniteContext[Integer, Integer](sc, () => cfg)

or pass a path to the Ignite configuration directly to the IgniteContext constructor:
val ic = new IgniteContext[Integer, Integer](sc, "path/to/igntie-config.xml")

2015-08-28 1:52 GMT-07:00 endian675 <mike@griggs.org.uk<mailto:mike@griggs.org.uk>>:
You can't pass a file path String to IgniteConfiguration, it has either a
default constructor

IgniteConfiguration()

or a constructor that takes another IgniteConfiguration instance (i.e., a
it's a copy-constructor)

IgniteConfiguration(IgniteConfiguration config)

In Java I call the static method

Ignition.start("path-to-ignite-config.xml")



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-get-a-instance-of-IgniteContext-in-spark-shell-tp1180p1187.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message