Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Nosql Hector测试示例不适用于Cassandra 0.7.4_Nosql_Cassandra_Cassandra 0.7 - Fatal编程技术网

Nosql Hector测试示例不适用于Cassandra 0.7.4

Nosql Hector测试示例不适用于Cassandra 0.7.4,nosql,cassandra,cassandra-0.7,Nosql,Cassandra,Cassandra 0.7,我已经设置了单节点Cassandra 0.7.4,并使用 箱子/卡桑德拉-f。现在我尝试使用Hector API(v.0.7.0)来管理 DB。 Cassandra CLI工作正常,我可以创建键空间等等 我尝试运行测试示例并创建一个键空间: Cluster cluster = HFactory.getOrCreateCluster("TestCluster", new CassandraHostConfigurator("localhost:9160")); K

我已经设置了单节点Cassandra 0.7.4,并使用 箱子/卡桑德拉-f。现在我尝试使用Hector API(v.0.7.0)来管理 DB。 Cassandra CLI工作正常,我可以创建键空间等等

我尝试运行测试示例并创建一个键空间:

Cluster cluster = HFactory.getOrCreateCluster("TestCluster",
                new CassandraHostConfigurator("localhost:9160"));

Keyspace keyspace = HFactory.createKeyspace("Keyspace1", cluster);
但我得到的只是:

2011-04-14 22:20:27,469 [main      ] INFO 
me.prettyprint.cassandra.connection.CassandraHostRetryService  
- Downed Host
Retry service started with queue size -1 and retry delay 10s
2011-04-14 22:20:27,492 [main      ] DEBUG
me.prettyprint.cassandra.connection.HThriftClient  -
 Transport open status false
for client CassandraClient<localhost:9160-1>
....this again about 20 times
me.prettyprint.cassandra.service.JmxMonitor  - Registering JMX
me.prettyprint.cassandra.service_TestCluster:ServiceType=hector,
MonitorType=hector
2011-04-14 22:20:27,636 [Thread-0  ] INFO 
me.prettyprint.cassandra.connection.CassandraHostRetryService  - 
Downed Host
retry shutdown hook called
2011-04-14 22:20:27,646 [Thread-0  ] INFO 
me.prettyprint.cassandra.connection.CassandraHostRetryService  - 
Downed Host
retry shutdown complete
2011-04-1422:20:27469[主要]信息
me.prettyprint.cassandra.connection.CassandraHostRetryService
-被击倒的主机
重试服务已启动,队列大小为-1,重试延迟为10秒
2011-04-14 22:20:27492[主要]调试
me.prettyprint.cassandra.connection.HThriftClient-
传输打开状态错误
对于客户端CassandraClient
……这又是大约20次
me.prettyprint.cassandra.service.JmxMonitor-注册JMX
me.prettyprint.cassandra.service\u TestCluster:ServiceType=hector,
监测类型=赫克托
2011-04-14 22:20:27636[Thread-0]信息
me.prettyprint.cassandra.connection.CassandraHostRetryService-
被击倒的主机
重试调用的关闭挂钩
2011-04-14 22:20:27646[Thread-0]信息
me.prettyprint.cassandra.connection.CassandraHostRetryService-
被击倒的主机
重试关机完成
你能告诉我我做错了什么吗?
谢谢

当您通过CLI连接时,是否指定“-h localhost-p 9160”

你真的能用上面的命令行做一些事情吗

HThriftClient的错误表明它无法连接到Cassandra守护进程


FTR,通过hector你会得到更快的响应-users@googlegroups.com

通过CLI连接时,是否指定“-h localhost-p 9160”

你真的能用上面的命令行做一些事情吗

HThriftClient的错误表明它无法连接到Cassandra守护进程


FTR,通过hector你会得到更快的响应-users@googlegroups.com

如果您在linux机器上,请尝试通过以下命令启动cassandra服务器:

/bin$ ./cassandra start -f 
./cassandra-cli -h {hostname}/9160.
然后,对于cli,使用以下命令:

/bin$ ./cassandra start -f 
./cassandra-cli -h {hostname}/9160.

然后确保配置正常。

如果您在linux机器上,请尝试通过以下命令启动cassandra服务器:

/bin$ ./cassandra start -f 
./cassandra-cli -h {hostname}/9160.
然后,对于cli,使用以下命令:

/bin$ ./cassandra start -f 
./cassandra-cli -h {hostname}/9160.

然后确保配置正常。

我认为错误是因为没有连接到守护进程,这就是为什么我发现它与CLI一起工作很奇怪的原因。是的,我确实在CLI中指定了主机和端口(connect localhost/9160;Connected to:localhost/9160上的“Test Cluster”)。我认为错误是因为没有连接到守护进程,这就是为什么我发现它与CLI一起工作很奇怪的原因。是的,我确实在CLI中指定了主机和端口(connect localhost/9160;Connected to:localhost/9160上的“Test Cluster”)。