我正在运行一个用Scala编写的应用程序,该应用程序使用Spark,Ignite,并从writeThrough缓存持久化到Cassandra。在Ignite基本概念代码中,您应该将CacheStoreFactory设置为:
<property name="cacheStoreFactory">
<bean class="org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory">
<!-- Datasource configuration bean which is responsible for Cassandra connection details -->
<property name="dataSourceBean" value="cassandraDataSource"/>
<!-- Persistent settings bean which is responsible for the details of how objects will be persisted to Cassandra -->
<property name="persistenceSettingsBean" value="cache1_persistence_settings"/>
</bean>
</property>
但是,当我运行该应用程序时,出现错误:
java.lang.IllegalStateException:
无法获取Cassandra数据源,原因是未将Spring应用程序上下文注入到CassandraCacheStoreFactory中
所有Ignite.xml,connection-settings.xml和cassandra-store.xml的编写方式均与在apacheignite Cassandra集成页面上解释的示例相同。指定用于Cassandra DataSource的Spring应用程序上下文的xml文档是否缺少某些内容?