ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Morozov <int.2...@gmail.com>
Subject Sharing Spark RDDs with Ignite
Date Tue, 02 Feb 2016 13:48:26 GMT
Hello everyone!

I'm new to Ignite and currently assessing Ignite's ability to share Spark
What I'm trying to test if Ignite can cache Spark RDD and make it available
to multiple applications until this cache gets invalidated.

Following is a very limited test that I used to see what happens when I
save IgniteRDD.

public class SharedRddExample {
    public static void main(String[] args) {
        final SparkConf sparkConf = new SparkConf()

        final JavaSparkContext sparkContext = new JavaSparkContext(sparkConf);

        final IgniteContext igniteContext = new
IgniteContext(sparkContext.sc(), "ignite/client-default-config.xml",
        final IgniteRDD igniteRDD =

        final JavaRDD javaRDD = igniteRDD.toJavaRDD();
        if (javaRDD.isEmpty()) {
            final JavaRDD<String> rdd =
sparkContext.parallelize(Collections.singletonList("Hello World"));
        } else {

Ignite configuration for client node:

<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
    <property name="clientMode" value="true"/>
    <property name="peerClassLoadingEnabled" value="true"/>
    <property name="discoverySpi">
        <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
            <property name="ipFinder">
                    <property name="addresses">
                            <!-- In distributed environment, replace
with actual host IP address. -->

Server node uses the same configuration as above but with clientMode set to

The code above creates IgniteRDD with 1024 partitions which results in
Spark creating 1024 tasks just to execute *javaRDD.isEmpty()*.

My question is how do I make it faster?

Why does Ignite use 1024 for IgniteRDD by default?

Do I need a special Ignite config?

I'm using Ignite 1.5.0-final.


View raw message