对DCAwareRoundRobinPolicy使用数据中心名称“datacenter1”(如果这不正确,请提供正确的数据中心

时间:2017-05-20 01:14:59

标签: cassandra

我在本地计算机上备份了一个生产数据库(在许多节点上运行)(带有采样数据)。

当我在本地开发盒上重新创建数据库时,我使用简单的策略和1个副本创建了它。

我的应用程序使用cassandra jdbc驱动程序使用简单的JDBC代码。当我启动我的应用程序时,我会看到100条消息,如

{
"msg":"Using data-center name 'datacenter1' for 
DCAwareRoundRobinPolicy (if this is incorrect, please provide the
 correct datacenter name with DCAwareRoundRobinPolicy
constructor)
"},
"category":"com.datastax.driver.core.policies.DCAwareRoundRobinPolicy",
"host":"foo.local",
"logger":"com.datastax.driver.core.policies.DCAwareRoundRobinPolicy",
"thread":"main","level":"info"}

{
"msg":"New Cassandra host devbox/XX.XX.XX.XX:9042 added"},
"category":"com.datastax.driver.core.Cluster",
"host":"foo.local",
"logger":"com.datastax.driver.core.Cluster",
"thread":"main","level":"info"
}

我可以轻松连接到我的数据库,查询它。所有测试运行良好。然后我不明白为什么我在启动时会得到这样的两条消息。

编辑:这是nodetool status

的输出
objc[4506]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java (0x105ad84c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x105ba04e0). One of the two will be used. Which one is undefined.
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Tokens       Owns (effective)  Host ID                               Rack
UN  127.0.0.1  2.46 MiB   256          100.0%            1bf6cbd8-22c1-42e5-afdd-c1846be9e322  rack1

0 个答案:

没有答案