You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to insert data into cassandra table using jmeter with cassandra put sampler.This is my table schema in cassandra crated by cql-3 .
CREATE TABLE sensor3 (
sensor_id int,
time timestamp,
sensor_value text,
PRIMARY KEY (sensor_id, time)
) WITH COMPACT STORAGE AND
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'SnappyCompressor'};
While using cassandra put sampler i define the following inputs.
Client Type : com.netflix.jmeter.connections.a6x.AstyanaxConnection
i have tried two ways to do the same but find different errors.
In First case i have used the Inbuilt time function to get the current timstamp which is below
Cassandra Put Properties --
Column family : sensor3
Row Key : 1
Column Name : ${__time(yyyyMMdd-HHmmss,YMDHMS)}
Column value : ${__Random(1,1000)}
Column Serializer : DateSerializer
Value Serializer : StringSerializer
Key Serializer : IntegerSerialzer
Vishal - have you tried using a Unix time (Epoch time) format instead of the human time stamp :"Sat, 12 Aug 1995 13:30:00 GMT"? That time in milliseconds would be "808234200000"
I am trying to insert data into cassandra table using jmeter with cassandra put sampler.This is my table schema in cassandra crated by cql-3 .
CREATE TABLE sensor3 (
sensor_id int,
time timestamp,
sensor_value text,
PRIMARY KEY (sensor_id, time)
) WITH COMPACT STORAGE AND
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'SnappyCompressor'};
While using cassandra put sampler i define the following inputs.
Client Type : com.netflix.jmeter.connections.a6x.AstyanaxConnection
i have tried two ways to do the same but find different errors.
Cassandra Put Properties --
Column family : sensor3
Row Key : 1
Column Name : ${__time(yyyyMMdd-HHmmss,YMDHMS)}
Column value : ${__Random(1,1000)}
Column Serializer : DateSerializer
Value Serializer : StringSerializer
Key Serializer : IntegerSerialzer
Attaching Stack trace of problem :
ERROR: java.lang.IllegalArgumentException
java.util.Date.parse(Date.java:615)
com.netflix.jmeter.sampler.AbstractSampler.convert(AbstractSampler.java:88)
com.netflix.jmeter.sampler.AbstractSampler.getColumnName(AbstractSampler.java:130)
com.netflix.jmeter.sampler.PutSampler.execute(PutSampler.java:14)
com.netflix.jmeter.sampler.AbstractSampler.sample(AbstractSampler.java:205)
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
java.lang.Thread.run(Thread.java:679)
Cassandra Put Properties --
Column family : sensor3
Row Key : 1
Column Name : Sat, 12 Aug 1995 13:30:00 GMT
Column value : ${__Random(1,1000)}
Column Serializer : DateSerializer
Value Serializer : StringSerializer
Key Serializer : IntegerSerialzer
Attaching Stack trace of problem :
ERROR: java.lang.IllegalArgumentException
java.util.Date.parse(Date.java:615)
com.netflix.jmeter.sampler.AbstractSampler.convert(AbstractSampler.java:88)
com.netflix.jmeter.sampler.AbstractSampler.getColumnName(AbstractSampler.java:130)
com.netflix.jmeter.sampler.PutSampler.execute(PutSampler.java:14)
com.netflix.jmeter.sampler.AbstractSampler.sample(AbstractSampler.java:205)
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
java.lang.Thread.run(Thread.java:679)
please tell me ,What i'm doing wrong or is there other way to do the same ?
The text was updated successfully, but these errors were encountered: