【发布时间】:2017-10-30 10:43:31
【问题描述】:
我正在尝试将 Ignite 与 Cassandra 集成。我正在使用持久性策略作为 BLOB。当我运行程序时,它显示一个错误,如“com.datastax.driver.core.exceptions.CodecNotFoundException:未找到请求操作的编解码器:com.datastax.driver.core 的 [varchar java.nio.HeapByteBuffer]。 CodecRegistry.notFound(CodecRegistry.java:679) "
这是我的持久化 xml 文件
<persistence keyspace="sam" table="key">
<keyPersistence class="java.lang.String" strategy="BLOB" column="key"/>
<valuePersistence class="java.lang.String" strategy="BLOB" column="value"/>
</persistence>
main.cpp
int main()
{
IgniteConfiguration cfg;
cfg.springCfgPath = "apache-ignite-fabric-2.0.0-bin/cassandra-config.xml";
Ignite grid = Ignition::Start(cfg);
Cache<Test, Test> cache = grid.GetCache<Test, Test>("cache1");
Test obj;
cache.LoadCache ();
Test key;
key.key = "123dfsdfs";
obj.value = "sdfsf";
cache.Put (key,obj);
return 0;
}
【问题讨论】: