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

Add adaptive sampling tables to v4 #3300

Merged
merged 1 commit into from
Oct 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions plugin/storage/cassandra/schema/v004.cql.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,28 @@ CREATE TABLE IF NOT EXISTS ${keyspace}.dependencies_v2 (
'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
}
AND default_time_to_live = ${dependencies_ttl};

-- adaptive sampling tables
-- ./plugin/storage/cassandra/samplingstore/storage.go
CREATE TABLE IF NOT EXISTS ${keyspace}.operation_throughput (
bucket int,
ts timeuuid,
throughput text,
PRIMARY KEY(bucket, ts)
) WITH CLUSTERING ORDER BY (ts desc);

CREATE TABLE IF NOT EXISTS ${keyspace}.sampling_probabilities (
bucket int,
ts timeuuid,
hostname text,
probabilities text,
PRIMARY KEY(bucket, ts)
) WITH CLUSTERING ORDER BY (ts desc);

-- distributed lock
-- ./plugin/pkg/distributedlock/cassandra/lock.go
CREATE TABLE IF NOT EXISTS ${keyspace}.leases (
name text,
owner text,
PRIMARY KEY (name)
);