I'm trying to run cassandra-strees with defined own .yaml file but I'm still gettin an error :
java.io.IOError: java.io.FileNotFoundException: /home/kenik/Documents/stress.yaml (No such file or directory)
Which is very troublesome for me. Let's me explain why.
First of all my stress.yaml file :
# Keyspace name and create CQL
#
CREATE KEYSPACE weatherteller
WITH REPLICATION = {
'class' : 'SimpleStrategy',
'datacenter1' : 1
};
#
# Table name and create CQL
#
table: weather
table_definition:
CREATE TABLE weatherteller.weather (
weatherid bigint,
measurementdate timestamp,
summary varchar,
preciptype varchar,
temperature double,
apparenttemperature double,
humidity double,
windspeed double,
windbearing double,
visibility double,
pressure double,
dailysummary varchar,
city varchar,
PRIMARY KEY (weatherid, measurementdate, city)
)
#
columnspec:
- name: weatherid
size: uniform(1..64)
- name: measurementdate
cluster: uniform(20...40)
- name: summary
size: gaussian(100...500)
- name: preciptype
size: uniform(1..32)
- name: temperature
size: uniform(1..32)
- name: apparenttemperature
size: uniform(1..32)
- name: humidity
size: uniform(1..10)
- name: windspeed
size: uniform(1..10)
- name: windbearing
size: uniform(1..10)
- name: visibility
size: uniform(1..10)
- name: pressure
size: uniform(1..10)
- name: dailysummary
size: uniform(1..100)
- name: city
size: uniform(1..100)
insert:
partitions: fixed(1)
select: fixed(1)/500
batchtype: UNLOGGED
queries:
weather:
cql: select * from weather where weatherid = ? and measurementdate = ? and city = ?
fields: samerow
Command run by me :
docker exec -it cassandra cassandra-stress user profile=file:///home/kenik/Documents/stress.yaml no-warmup ops\(insert=1,weather=1\) n=10000 -graph file=./stress.html
'cassandra' is my container which is currently running.
Absolute path to stress.yaml
file is /home/kenik/Documents/stress.yaml
I've checked that using command : readlink -f stress.yaml
. I'm at directory where stress.yaml is placed.
As you can see path seems to be fine but cassandra-stress cannot find it anyway.
Do you know any way to run this cassandra-stress test?
// UPDATE When start the container I use command :
docker run -e DS_LICENSE=accept -e CASSANDRA_CLUSTER_NAME=MyCluster -e CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch -e CASSANDRA_DC=datacenter1 -v /home/kenik/Documents/dir -p 9042:9042 --name cassandra -m 2g -d modified-cassandra
or
docker run -e DS_LICENSE=accept -e CASSANDRA_CLUSTER_NAME=MyCluster -e CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch -e CASSANDRA_DC=datacenter1 -v /home/kenik/Documents/:/dir -p 9042:9042 --name cassandra -m 2g -d modified-cassandra
And trying to execute test:
docker exec -it cassandra cassandra-stress user profile=file:///dir/stress.yaml ops\(insert=1\) n=10000 -graph file=stress.html
Result is the same : file not found exception. I've updated the post because I maght make some type or didn't understand answer properly.