I need to use multiple IgniteRDD's in my project. As far as I found in the
documentation the standard way of using IgniteRDD is by creating
IgniteContext and CacheConfiguration like this:
val igContext1 = new IgniteContext[Int, List[MyObject1]](sc,
"default-config.xml")
val igCacheCfg1 = new CacheConfiguration[Int,
List[MyObject1]]("mycache1")
val cacheIgRDD1 = igContext.fromCache(igCacheCfg1)
cacheIgRDD1.savePairs(myRDD1, true)
where [Int, List[MyObject1]] is the structure of the first RDD - RDD[(Int,
List[MyObject1])]
However the structure of the second RDD can be different - RDD[(Int,
List[MyObject2])].
How can I reuse the same context and configuration for the second RDD
instead of repeating the same code again like:
val igContext2 = new IgniteContext[Int, List[MyObject2]](sc,
"default-config.xml")
val igCacheCfg2 = new CacheConfiguration[Int,
List[MyObject2]]("mycache2")
val cacheIgRDD2 = igContext.fromCache(igCacheCfg2)
cacheIgRDD2.savePairs(myRDD2, true)
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/IgniteContext-for-multiple-IgniteRDD-s-tp4997.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.