我目前正在尝试在我们的生产环境中设置 cassandra 集群(4 个节点和 2 个种子)。当我使用逗号分隔的主机名和端口连接时,它工作正常。
cluster = HFactory.getOrCreateCluster("Test Cluster", "host1:9160,host2:9160,host3:9160,host4:9160");
但是,当我在连接到单个节点的 lb 上配置集群名称并在 Hector thrift 客户端中配置相同名称时。但我得到了以下的感觉,
cluster = HFactory.getOrCreateCluster("Test Cluster", "lbname");
严重:me.prettyprint.hector.api.exceptions.HectorException:所有主机池都标记为已关闭。重试负担推给客户端。
me.prettyprint.hector.api.exceptions.HectorException: All host pools marked down. Retry burden pushed out to client.
at me.prettyprint.cassandra.connection.HConnectionManager.getClientFromLBPolicy(HConnectionManager.java:393)
at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:249)
at me.prettyprint.cassandra.service.AbstractCluster.describeKeyspace(AbstractCluster.java:199)
at com.july.storage.cassandra.util.CassandraDBUtil.getDb(CassandraDBUtil.java:107)
at com.july.storage.cassandra.util.CassandraDBUtil.hasTable(CassandraDBUtil.java:91)
at com.july.storage.cassandra.action.CassandraHandler.getCall(CassandraHandler.java:65)
at com.july.storage.service.StorageService.GET(StorageService.java:58)
at com.july.storage.cassandra.action.CassandraHandler.main(CassandraHandler.java:571)