【发布时间】:2020-12-15 09:50:44
【问题描述】:
我目前正在将 java Cassandra 驱动程序从 3.x 版迁移到 4.x 版,并且难以在新驱动程序上设置我们想要的配置。
我知道Cluster 类已经消失并替换为CqlSession,只是不知道如何迁移这些:
Cluster cluster = Cluster.builder()
...
// how can i migrate these to be used in CqlSession ???
.withLoadBalancingPolicy(loadBalancingPolicy)
.withCompression(ProtocolOptions.Compression.LZ4)
.withQueryOptions(new QueryOptions().setConsistencyLevel(LOCAL_QUORUM))
.build();
知道如何将其移至新驱动程序吗?这些可以以某种方式设置在CqlSessionBuilder 上还是我必须使用完全不同的东西?
【问题讨论】: