Skip to content

Commit

Permalink
Add adaptive sampling tables to v4 (#3300)
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Elliott <number101010@gmail.com>
  • Loading branch information
joe-elliott committed Oct 1, 2021
1 parent c1db700 commit 0bdcec8
Showing 1 changed file with 25 additions and 0 deletions.
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)
);

0 comments on commit 0bdcec8

Please sign in to comment.