Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cassandra run_queries issue: no keyspace has been specified #124

Closed
seybi87 opened this issue May 11, 2020 · 2 comments
Closed

Cassandra run_queries issue: no keyspace has been specified #124

seybi87 opened this issue May 11, 2020 · 2 comments

Comments

@seybi87
Copy link
Contributor

seybi87 commented May 11, 2020

Hi guys,

I am trying to run the TSBS against a Cassandra instance (version 3.11.2).

The load phase works well and the data is inserted into Cassandra. I am using the following command:

cat /opt/workloads/data/cassandra-data.gz | gunzip | /opt/workloads/tsbs/bin/tsbs_load_cassandra --db-name="benchmark" --workers=2 --reporting-period="10s" --batch-size=10 --hosts 192.168.0.214:9042 --replication-factor 1 --consistency ONE

An exemplary set of queries is generated with the following command:

/opt/workloads/tsbs/bin/tsbs_generate_queries --use-case="cpu-only" --seed=123 --scale=1000 --timestamp-start="2016-01-01T00:00:00Z" --timestamp-end="2016-01-01T02:00:01Z" --queries=1000 --query-type="single-groupby-1-1-1" --format="cassandra" | gzip > /opt/workloads/data/cassandra-queries.gz

Yet, when running these queries with:

cat /opt/workloads/data/cassandra-queries.gz | gunzip | /opt/workloads/tsbs/bin/tsbs_run_queries_cassandra --workers 2 --host 192.168.0.214:9042 --aggregation-plan server

I get the following error: No keyspace has been specified. USE a keyspace, or explicitly specify keyspace.tablename

I checked the Cassandra instance and the benchmark keyspace is created and the data is inserted.

Thanks for any help how to fix this issue!

@seybi87
Copy link
Contributor Author

seybi87 commented May 12, 2020

I have debugged the issue and the default value for the keyspace, via the db-name parameter is never set because the following code snippet is missing the main.go. Yet, this code snippet is required to initialize the config struct.

if err := viper.Unmarshal(&config); err != nil {
		panic(fmt.Errorf("unable to decode config: %s", err))
}

@RobAtticus
Copy link
Member

Merged, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants