Skip to content

Commit

Permalink
redo migrations for histos as drop/creates
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeshanlakhani committed Jun 23, 2024
1 parent d794edd commit 917c7a0
Show file tree
Hide file tree
Showing 63 changed files with 761 additions and 418 deletions.
279 changes: 0 additions & 279 deletions oximeter/db/schema/replicated/5/up.sql

This file was deleted.

1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up01.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogrami8_local ON CLUSTER oximeter_cluster SYNC;
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up02.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogrami8 ON CLUSTER oximeter_cluster SYNC;
25 changes: 25 additions & 0 deletions oximeter/db/schema/replicated/5/up03.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogrami8_local ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(Int8),
counts Array(UInt64),
min Int8,
max Int8,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/measurements_histogrami8_local', '{replica}')
ORDER BY (timeseries_name, timeseries_key, start_time, timestamp)
TTL toDateTime(timestamp) + INTERVAL 30 DAY;
23 changes: 23 additions & 0 deletions oximeter/db/schema/replicated/5/up04.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogrami8 ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(Int8),
counts Array(UInt64),
min Int8,
max Int8,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = Distributed('oximeter_cluster', 'oximeter', 'measurements_histogrami8_local', xxHash64(splitByChar(':', timeseries_name)[1]));
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up05.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogramu8_local ON CLUSTER oximeter_cluster SYNC;
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up06.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogramu8 ON CLUSTER oximeter_cluster SYNC;
25 changes: 25 additions & 0 deletions oximeter/db/schema/replicated/5/up07.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogramu8_local ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(UInt8),
counts Array(UInt64),
min UInt8,
max UInt8,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/measurements_histogramu8_local', '{replica}')
ORDER BY (timeseries_name, timeseries_key, start_time, timestamp)
TTL toDateTime(timestamp) + INTERVAL 30 DAY;
23 changes: 23 additions & 0 deletions oximeter/db/schema/replicated/5/up08.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogramu8 ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(UInt8),
counts Array(UInt64),
min UInt8,
max UInt8,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = Distributed('oximeter_cluster', 'oximeter', 'measurements_histogramu8_local', xxHash64(splitByChar(':', timeseries_name)[1]));
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up09.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogrami16_local ON CLUSTER oximeter_cluster SYNC;
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up10.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogrami16 ON CLUSTER oximeter_cluster SYNC;
25 changes: 25 additions & 0 deletions oximeter/db/schema/replicated/5/up11.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogrami16_local ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(Int16),
counts Array(UInt64),
min Int16,
max Int16,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/measurements_histogrami16_local', '{replica}')
ORDER BY (timeseries_name, timeseries_key, start_time, timestamp)
TTL toDateTime(timestamp) + INTERVAL 30 DAY;
23 changes: 23 additions & 0 deletions oximeter/db/schema/replicated/5/up12.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogrami16 ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(Int16),
counts Array(UInt64),
min Int16,
max Int16,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = Distributed('oximeter_cluster', 'oximeter', 'measurements_histogrami16_local', xxHash64(splitByChar(':', timeseries_name)[1]));
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up13.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogramu16_local ON CLUSTER oximeter_cluster SYNC;
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up14.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogramu16 ON CLUSTER oximeter_cluster SYNC;
25 changes: 25 additions & 0 deletions oximeter/db/schema/replicated/5/up15.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogramu16_local ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(UInt16),
counts Array(UInt64),
min UInt16,
max UInt16,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/measurements_histogramu16_local', '{replica}')
ORDER BY (timeseries_name, timeseries_key, start_time, timestamp)
TTL toDateTime(timestamp) + INTERVAL 30 DAY;
23 changes: 23 additions & 0 deletions oximeter/db/schema/replicated/5/up16.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogramu16 ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(UInt16),
counts Array(UInt64),
min UInt16,
max UInt16,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = Distributed('oximeter_cluster', 'oximeter', 'measurements_histogramu16_local', xxHash64(splitByChar(':', timeseries_name)[1]));
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up17.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogrami32_local ON CLUSTER oximeter_cluster SYNC;
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up18.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogrami32 ON CLUSTER oximeter_cluster SYNC;
25 changes: 25 additions & 0 deletions oximeter/db/schema/replicated/5/up19.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogrami32_local ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(Int32),
counts Array(UInt64),
min Int32,
max Int32,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/measurements_histogrami32_local', '{replica}')
ORDER BY (timeseries_name, timeseries_key, start_time, timestamp)
TTL toDateTime(timestamp) + INTERVAL 30 DAY;
23 changes: 23 additions & 0 deletions oximeter/db/schema/replicated/5/up20.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogrami32 ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(Int32),
counts Array(UInt64),
min Int32,
max Int32,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = Distributed('oximeter_cluster', 'oximeter', 'measurements_histogrami32_local', xxHash64(splitByChar(':', timeseries_name)[1]));
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up21.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogramu32_local ON CLUSTER oximeter_cluster SYNC;
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up22.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogramu32 ON CLUSTER oximeter_cluster SYNC;
25 changes: 25 additions & 0 deletions oximeter/db/schema/replicated/5/up23.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogramu32_local ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(UInt32),
counts Array(UInt64),
min UInt32,
max UInt32,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/measurements_histogramu32_local', '{replica}')
ORDER BY (timeseries_name, timeseries_key, start_time, timestamp)
TTL toDateTime(timestamp) + INTERVAL 30 DAY;
23 changes: 23 additions & 0 deletions oximeter/db/schema/replicated/5/up24.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogramu32 ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(UInt32),
counts Array(UInt64),
min UInt32,
max UInt32,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = Distributed('oximeter_cluster', 'oximeter', 'measurements_histogramu32_local', xxHash64(splitByChar(':', timeseries_name)[1]));
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up25.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogrami64_local ON CLUSTER oximeter_cluster SYNC;
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up26.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogrami64 ON CLUSTER oximeter_cluster SYNC;
25 changes: 25 additions & 0 deletions oximeter/db/schema/replicated/5/up27.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogrami64_local ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(Int64),
counts Array(UInt64),
min Int64,
max Int64,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/measurements_histogrami64_local', '{replica}')
ORDER BY (timeseries_name, timeseries_key, start_time, timestamp)
TTL toDateTime(timestamp) + INTERVAL 30 DAY;
23 changes: 23 additions & 0 deletions oximeter/db/schema/replicated/5/up28.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CREATE TABLE IF NOT EXISTS oximeter.measurements_histogrami64 ON CLUSTER oximeter_cluster
(
timeseries_name String,
timeseries_key UInt64,
start_time DateTime64(9, 'UTC'),
timestamp DateTime64(9, 'UTC'),
bins Array(Int64),
counts Array(UInt64),
min Int64,
max Int64,
sum_of_samples Int64,
squared_mean Float64,
p50_marker_heights Array(Float64),
p50_marker_positions Array(UInt64),
p50_desired_marker_positions Array(Float64),
p90_marker_heights Array(Float64),
p90_marker_positions Array(UInt64),
p90_desired_marker_positions Array(Float64),
p99_marker_heights Array(Float64),
p99_marker_positions Array(UInt64),
p99_desired_marker_positions Array(Float64)
)
ENGINE = Distributed('oximeter_cluster', 'oximeter', 'measurements_histogrami64_local', xxHash64(splitByChar(':', timeseries_name)[1]));
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up29.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogramu64_local ON CLUSTER oximeter_cluster SYNC;
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/5/up30.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS oximeter.measurements_histogramu64 ON CLUSTER oximeter_cluster SYNC;
Loading

0 comments on commit 917c7a0

Please sign in to comment.