如何在 Apache Ignite 中按需缓存 Postgres table 作为第 3 方持久性?

How to cache a Posgres table as a 3rd Party Persistence on demand in Apache Ignite?

我一直在阅读有关 Apache Ignite 的第 3 方商店的文档:https://apacheignite.readme.io/v2.7/docs/3rd-party-store#section-manual

但我还有几点疑惑:

  1. 能否将 Postgresql table 缓存到已启动的 Ignite 实例中?是否可以使用 Ignite 客户端?
  2. 如果向 Postgresql 中插入新行 table,Ignite 缓存会自动刷新吗?
  3. 一旦 Postgresql table 缓存在 Ignite 中,是否可以使用带有 Ignite 数据源的 Spark Dataframes 读取此缓存数据?
  1. 假设您有一个 运行 Ignite 服务器节点。您可以使用 cacheStoreFactory specified, and run IgniteCache#loadCache(...) 启动一个新的缓存。它可以从客户端节点完成,但所有节点都应该在其 class 路径上具有工厂 class。

  2. 从底层数据库插入新数据不会自动发生。但是,如果您启用 read-through 模式,那么 Ignite 缓存中不存在的数据将按需从数据库中请求。

  3. 为了Spark DataFrames读取数据,需要在Ignite中创建相应的SQL表。 QueryEntities or indexed types should be configured in Ignite for the cached data. See https://apacheignite-sql.readme.io/docs/schema-and-indexes and https://apacheignite-fs.readme.io/docs/ignite-data-frame#section-reading-dataframes