0

需要一些有关 cassandra 压力测试的帮助。我已经从 datastax 网站安装了 cassandra-stress 2.1 工具。我想以 10:1 的比例并使用 15 个线程进行读+写压力测试。我不知何故无法让它工作。我能够成功地分别进行读写测试。

我正在使用的命令: ./cassandra-stress mixed ratio(write=1,read=10) n=10000 cl=ONE -port thrift=9160 -schema keyspace="Keyspace1" -mode thrift smart -rate threads>=15 threads \<=15 -节点 192.168.5.10

即使我将端口指定为 9160,但它使用的是本机 9042 端口。

我收到以下错误:

    ERROR 18:03:07 Error creating pool to /192.168.5.11:9042
    com.datastax.driver.core.TransportException: [/192.168.5.11:9042] Cannot connect

    at com.datastax.driver.core.Connection.<init>(Connection.java:106) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:32) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.Connection$Factory.open(Connection.java:521) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.DynamicConnectionPool.<init>(DynamicConnectionPool.java:73) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.HostConnectionPool.newInstance(HostConnectionPool.java:33) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.SessionManager.replacePool(SessionManager.java:239) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.SessionManager.access$400(SessionManager.java:39) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.SessionManager$3.call(SessionManager.java:272) [cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.SessionManager$3.call(SessionManager.java:264) [cassandra-driver-core-2.1.2.jar:na]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_72]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_72]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_72]
    at java.lang.Thread.run(Thread.java:745) [na:1.7.0_72]
    Caused by: org.jboss.netty.channel.ConnectTimeoutException: connection timed out: /192.168.5.11:9042
    at org.jboss.netty.channel.socket.nio.NioClientBoss.processConnectTimeout(NioClientBoss.java:137) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:83) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[netty-3.9.0.Final.jar:na]
    ... 3 common frames omitted
    ERROR 18:03:12 Error creating pool to /192.168.5.13:9042
    com.datastax.driver.core.TransportException: [/192.168.5.13:9042] Cannot connect
    at com.datastax.driver.core.Connection.<init>(Connection.java:106) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:32) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.Connection$Factory.open(Connection.java:521) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.DynamicConnectionPool.<init>(DynamicConnectionPool.java:73) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.HostConnectionPool.newInstance(HostConnectionPool.java:33) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.SessionManager.replacePool(SessionManager.java:239) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.SessionManager.access$400(SessionManager.java:39) ~[cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.SessionManager$3.call(SessionManager.java:272) [cassandra-driver-core-2.1.2.jar:na]
    at com.datastax.driver.core.SessionManager$3.call(SessionManager.java:264) [cassandra-driver-core-2.1.2.jar:na]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_72]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_72]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_72]
    at java.lang.Thread.run(Thread.java:745) [na:1.7.0_72]
    Caused by: org.jboss.netty.channel.ConnectTimeoutException: connection timed out: /192.168.5.13:9042
    at org.jboss.netty.channel.socket.nio.NioClientBoss.processConnectTimeout(NioClientBoss.java:137) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:83) ~[netty-3.9.0.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) ~[netty-3.9.0.Final.jar:na]
    at
    org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[netty-3.9.0.Final.jar:na]
    ... 3 common frames omitted
4

1 回答 1

0

您需要转义 shell元字符(在这种情况下是括号和尖括号)。尝试这个:

./cassandra-stress mixed ratio\(write=1,read=10\) n=10000 cl=ONE -port thrift=9160 -schema keyspace="Keyspace1" -mode thrift smart -rate threads\>=15 threads\<=15 -node 192.168.5.10
于 2015-02-04T17:02:12.027 回答