我有一个蜂巢表(“人”),它缓存在 Spark 中。
sqlContext.sql("create table person (name string, age int)") //Create a new table
//Add some values to the table
...
...
//Cache the table in Spark
sqlContext.cacheTable("person")
sqlContext.isCached("person") //Returns true
sqlContext.sql("insert into table person values ("Foo", 25)") // Insert some other value in the table
//Check caching status again
sqlContext.isCached("person") //Returns true
sqlContext 是HiveContext。
在cacheTable("person")语句之后插入的条目会被缓存吗?换句话说, ("Foo", 25) 条目是否缓存在 Spark 中?
如果没有,我怎样才能只缓存以后插入的条目?我不想先取消缓存,然后再缓存整个表。