【发布时间】:2020-07-30 11:08:29
【问题描述】:
我有一个 Java Spring 应用程序,我正在使用 Amazon Keyspaces (for Apache Cassandra)。我正在使用sigv4 plugin(4.0.2 版)、cassandra java-driver-core(4.4.0 版),并遵循了有关如何将我的 java 应用程序与 MCS 连接的官方文档。该应用程序连接得很好,但我在启动时收到了一个奇怪的警告:
WARN 1 --- [ s0-admin-0] .o.d.i.c.m.t.DefaultTokenFactoryRegistry : [s0] Unsupported partitioner 'com.amazonaws.cassandra.DefaultPartitioner', token map will be empty.
一切看起来都不错,但几分钟后,警告又回来了,我的查询开始失败。这是几分钟后日志的样子:
WARN 1 --- [ s0-admin-0] .o.d.i.c.m.t.DefaultTokenFactoryRegistry : [s0] Unsupported partitioner 'com.amazonaws.cassandra.DefaultPartitioner', token map will be empty.
WARN 1 --- [ s0-io-1] c.d.o.d.i.c.m.SchemaAgreementChecker : [s0] Unknown peer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, excluding from schema agreement check
WARN 1 --- [ s0-io-0] c.d.o.d.i.c.control.ControlConnection : [s0] Unexpected error while refreshing schema after a successful reconnection, keeping previous version (CompletionException: com.datastax.oss.driver.api.core.connection.ClosedConnectionException: Channel was force-closed)
WARN 1 --- [ s0-io-1] c.d.o.d.i.c.m.DefaultTopologyMonitor : [s0] Control node ec2-x-xx-xxx-xx.us-east-2.compute.amazonaws.com/x.xx.xxx.xxx:xxxx has an entry for itself in system.peers: this entry will be ignored. This is likely due to a misconfiguration; please verify your rpc_address configuration in cassandra.yaml on all nodes in your cluster.
我调试了一下,看起来分区器来自实际的节点元数据,所以我真的不知道是否有实际的方法来修复它。
我看到最近here 有人问过类似的问题,但尚未发布任何解决方案。有任何想法吗?提前非常感谢
【问题讨论】:
-
亚马逊没有向官方驱动程序提供所需的实现,所以不存在这样的解决方案......也许他们在他们网站的某个地方发布了驱动程序?
-
@AlexOtt 感谢您的回复。连接到 AWS MCS(现为 AWS Keyspaces)uses the datastax java plugin 所需的 aws 插件。所以不幸的是,我认为现在没有其他选择。
标签: java amazon-web-services cassandra