我使用的令牌值:
initial_token: 85070591730234615865843651857942052864
尝试启动Cassandra时导致以下Java异常:
Exception (java.lang.IllegalArgumentException) encountered during startup: Invalid token for Murmur3Partitioner. Got 85070591730234615865843651857942052864 but expected a long value (unsigned 8 bytes integer).
java.lang.IllegalArgumentException: Invalid token for Murmur3Partitioner. Got 85070591730234615865843651857942052864 but expected a long value (unsigned 8 bytes integer).
at org.apache.cassandra.dht.Murmur3Partitioner$2.fromString(Murmur3Partitioner.java:333)
at org.apache.cassandra.dht.Murmur3Partitioner$2.validate(Murmur3Partitioner.java:317)
at org.apache.cassandra.config.DatabaseDescriptor.applyInitialTokens(DatabaseDescriptor.java:885)
at org.apache.cassandra.config.DatabaseDescriptor.applyAll(DatabaseDescriptor.java:321)
at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:141)
at org.apache.cassandra.service.CassandraDaemon.applyConfig(CassandraDaemon.java:646)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:581)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:735)
ERROR [main] 2017-03-01 19:57:15,861 CassandraDaemon.java:752 - Exception encountered during startup
java.lang.IllegalArgumentException: Invalid token for Murmur3Partitioner. Got 85070591730234615865843651857942052864 but expected a long value (unsigned 8 bytes integer).
at org.apache.cassandra.dht.Murmur3Partitioner$2.fromString(Murmur3Partitioner.java:333) ~[apache-cassandra-3.10.jar:3.10]
at org.apache.cassandra.dht.Murmur3Partitioner$2.validate(Murmur3Partitioner.java:317) ~[apache-cassandra-3.10.jar:3.10]
at org.apache.cassandra.config.DatabaseDescriptor.applyInitialTokens(DatabaseDescriptor.java:885) ~[apache-cassandra-3.10.jar:3.10]
at org.apache.cassandra.config.DatabaseDescriptor.applyAll(DatabaseDescriptor.java:321) ~[apache-cassandra-3.10.jar:3.10]
at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:141) ~[apache-cassandra-3.10.jar:3.10]
at org.apache.cassandra.service.CassandraDaemon.applyConfig(CassandraDaemon.java:646) [apache-cassandra-3.10.jar:3.10]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:581) [apache-cassandra-3.10.jar:3.10]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:735) [apache-cassandra-3.10.jar:3.10]
Cassandra在initial_token: 0
我做错了什么?
非常感谢任何帮助!
答案 0 :(得分:2)
我的主要问题是你为什么要设置它?
该标记(85070591730234615865843651857942052864
)很可能是随机分区器,而不是杂音分区器。可以检查集群中的其他节点,但可能在cassandra.yaml中设置:
partitioner: org.apache.cassandra.dht.RandomPartitioner
Murmur3分区程序虽然更好,但不确定您获得该令牌的位置或您希望它工作的原因。如果你只是添加节点,最好让它自己分配令牌。只是不要设置它。
# initial_token: