如果我igniteRDD
在我的 spark 作业中创建一个包含 10M 条目的缓存,它会将所有 10M 加载到我的 spark 上下文中吗?请在下面找到我的代码以供参考。
SparkConf conf = new SparkConf().setAppName("IgniteSparkIntgr").setMaster("local");
JavaSparkContext context = new JavaSparkContext(conf);
JavaIgniteContext<Integer, Subscriber> igniteCxt = new JavaIgniteContext<Integer,Subscriber>(context,"example-ignite.xml");
JavaIgniteRDD<Integer,Subscriber> cache = igniteCxt.fromCache("subscriberCache");
DataFrame query_res = cache.sql("select id, lastName, company from Subscriber where id between ? and ?", 12, 15);
DataFrame input = loadInput(context);
DataFrame joined_df = input.join(query_res,input.col("id").equalTo(query_res.col("ID")));
System.out.println(joined_df.count());
在上面的代码中,subscriberCache
有超过 10M 的条目。上述代码的任何时候都会将 10M 订阅者对象加载到 JVM 中吗?或者它只加载查询输出?
仅供参考:(Ignite 在单独的 JVM 中运行)