Reputation: 819
I am new to JMeter and Cassandra and trying to use Apache Jmeter Cassandra Plugin for Testing Purpose
https://github.com/Netflix/CassJMeter/wiki
By following the steps given there i was able to configure JMeter Cassandra Plugin.
In the JMeter Console I created a New ThreadGroup->CassandraProperties and specified all the Cassandra related properties in there.
Added SchemaProperties as below.
Added a Cassandra Get Range Slice
But when i start testing i get a success response in the sample result but my response data is empty
My Users table is not empty using cql i can query data, its schema is as follows:
CREATE TABLE users (
user_name text,
gender text,
password text,
PRIMARY KEY ((user_name))
) WITH
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.100000 AND
gc_grace_seconds=864000 AND
index_interval=128 AND
read_repair_chance=0.000000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
default_time_to_live=0 AND
speculative_retry='99.0PERCENTILE' AND
memtable_flush_period_in_ms=0 AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'LZ4Compressor'};
So when i execute the Jmeter console i should get the 100 count result and some response data too right? I am stucked here and unable to understand ...any help will be appreciated.
Upvotes: 5
Views: 663
Reputation: 58862
You can check blazemeter tutorial on scripting Cassandra in JMeter:
download the driver jar file. After that you can add the downloaded jar file to JMeter’s classpath
add Cassandra dependencies and add them to the JMeter classpath as well
Add -> Sampler -> JSR223 Sampler
Submit your request
for example:
import com.datastax.driver.core.Session;
import com.datastax.driver.core.Cluster;
Cluster cluster = Cluster.builder().addContactPoint("127.0.0.1").build();
Session session = cluster.connect("test_keyspace");
def results = session.execute("SELECT * FROM users");
session.close();
cluster.close();`
you can achieve Cassandra load testing via JMeter, independently of the Cassandra version you have. By using Groovy scripting language you don’t need to care about which Cassandra functionality is supported by JMeter, because you can implement the operations yourself
Upvotes: 0