From 2d415a1a6284e5f974c77e8e51c87adffae2e987 Mon Sep 17 00:00:00 2001
From: Pavol Loffay
Date: Tue, 27 Jul 2021 12:54:40 +0200
Subject: [PATCH] Fix formatting
Signed-off-by: Pavol Loffay
---
sharding-and-replication.md | 20 ++++++++++----------
sqlscripts/0001-jaeger-index.sql | 16 ++++++++--------
sqlscripts/0002-jaeger-spans.sql | 6 +++---
sqlscripts/0003-jaeger-operations.sql | 12 ++++++------
sqlscripts/0004-jaeger-spans-archive.sql | 6 +++---
5 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/sharding-and-replication.md b/sharding-and-replication.md
index 2d373e0c..8c404529 100644
--- a/sharding-and-replication.md
+++ b/sharding-and-replication.md
@@ -73,16 +73,16 @@ Therefore the following command can be run only on a single Clickhouse node:
```sql
CREATE TABLE IF NOT EXISTS jaeger_spans_local ON CLUSTER '{cluster}' (
- timestamp DateTime CODEC(Delta, ZSTD(1)),
+ timestamp DateTime CODEC(Delta, ZSTD(1)),
traceID String CODEC(ZSTD(1)),
model String CODEC(ZSTD(3))
- ) ENGINE ReplicatedMergeTree('/clickhouse/tables/{shard}/jaeger_spans', '{replica}')
- PARTITION BY toDate(timestamp)
- ORDER BY traceID
- SETTINGS index_granularity=1024;
+) ENGINE ReplicatedMergeTree('/clickhouse/tables/{shard}/jaeger_spans', '{replica}')
+PARTITION BY toDate(timestamp)
+ORDER BY traceID
+SETTINGS index_granularity=1024;
CREATE TABLE IF NOT EXISTS jaeger_index_local ON CLUSTER '{cluster}' (
- timestamp DateTime CODEC(Delta, ZSTD(1)),
+ timestamp DateTime CODEC(Delta, ZSTD(1)),
traceID String CODEC(ZSTD(1)),
service LowCardinality(String) CODEC(ZSTD(1)),
operation LowCardinality(String) CODEC(ZSTD(1)),
@@ -90,10 +90,10 @@ CREATE TABLE IF NOT EXISTS jaeger_index_local ON CLUSTER '{cluster}' (
tags Array(String) CODEC(ZSTD(1)),
INDEX idx_tags tags TYPE bloom_filter(0.01) GRANULARITY 64,
INDEX idx_duration durationUs TYPE minmax GRANULARITY 1
- ) ENGINE ReplicatedMergeTree('/clickhouse/tables/{shard}/jaeger_index', '{replica}')
- PARTITION BY toDate(timestamp)
- ORDER BY (service, -toUnixTimestamp(timestamp))
- SETTINGS index_granularity=1024;
+) ENGINE ReplicatedMergeTree('/clickhouse/tables/{shard}/jaeger_index', '{replica}')
+PARTITION BY toDate(timestamp)
+ORDER BY (service, -toUnixTimestamp(timestamp))
+SETTINGS index_granularity=1024;
CREATE MATERIALIZED VIEW IF NOT EXISTS jaeger_operations_local ON CLUSTER '{cluster}'
ENGINE ReplicatedMergeTree('/clickhouse/tables/{shard}/jaeger_operations', '{replica}')
diff --git a/sqlscripts/0001-jaeger-index.sql b/sqlscripts/0001-jaeger-index.sql
index 4b21a89e..f201573f 100644
--- a/sqlscripts/0001-jaeger-index.sql
+++ b/sqlscripts/0001-jaeger-index.sql
@@ -1,12 +1,12 @@
CREATE TABLE IF NOT EXISTS jaeger_index_local (
- timestamp DateTime CODEC(Delta, ZSTD(1)),
- traceID String CODEC(ZSTD(1)),
- service LowCardinality(String) CODEC(ZSTD(1)),
- operation LowCardinality(String) CODEC(ZSTD(1)),
- durationUs UInt64 CODEC(ZSTD(1)),
- tags Array(String) CODEC(ZSTD(1)),
- INDEX idx_tags tags TYPE bloom_filter(0.01) GRANULARITY 64,
- INDEX idx_duration durationUs TYPE minmax GRANULARITY 1
+ timestamp DateTime CODEC(Delta, ZSTD(1)),
+ traceID String CODEC(ZSTD(1)),
+ service LowCardinality(String) CODEC(ZSTD(1)),
+ operation LowCardinality(String) CODEC(ZSTD(1)),
+ durationUs UInt64 CODEC(ZSTD(1)),
+ tags Array(String) CODEC(ZSTD(1)),
+ INDEX idx_tags tags TYPE bloom_filter(0.01) GRANULARITY 64,
+ INDEX idx_duration durationUs TYPE minmax GRANULARITY 1
) ENGINE MergeTree()
PARTITION BY toDate(timestamp)
ORDER BY (service, -toUnixTimestamp(timestamp))
diff --git a/sqlscripts/0002-jaeger-spans.sql b/sqlscripts/0002-jaeger-spans.sql
index 13d3399e..deebcf76 100644
--- a/sqlscripts/0002-jaeger-spans.sql
+++ b/sqlscripts/0002-jaeger-spans.sql
@@ -1,7 +1,7 @@
CREATE TABLE IF NOT EXISTS jaeger_spans_local (
- timestamp DateTime CODEC(Delta, ZSTD(1)),
- traceID String CODEC(ZSTD(1)),
- model String CODEC(ZSTD(3))
+ timestamp DateTime CODEC(Delta, ZSTD(1)),
+ traceID String CODEC(ZSTD(1)),
+ model String CODEC(ZSTD(3))
) ENGINE MergeTree()
PARTITION BY toDate(timestamp)
ORDER BY traceID
diff --git a/sqlscripts/0003-jaeger-operations.sql b/sqlscripts/0003-jaeger-operations.sql
index 6263f563..9f8cac2e 100644
--- a/sqlscripts/0003-jaeger-operations.sql
+++ b/sqlscripts/0003-jaeger-operations.sql
@@ -4,9 +4,9 @@ PARTITION BY toYYYYMM(date) ORDER BY (date, service, operation)
SETTINGS index_granularity=32
POPULATE
AS SELECT
- toDate(timestamp) AS date,
- service,
- operation,
- count() as count
- FROM jaeger_index
- GROUP BY date, service, operation
+ toDate(timestamp) AS date,
+ service,
+ operation,
+ count() as count
+FROM jaeger_index
+GROUP BY date, service, operation
diff --git a/sqlscripts/0004-jaeger-spans-archive.sql b/sqlscripts/0004-jaeger-spans-archive.sql
index 7b6515ff..e50924ce 100644
--- a/sqlscripts/0004-jaeger-spans-archive.sql
+++ b/sqlscripts/0004-jaeger-spans-archive.sql
@@ -1,7 +1,7 @@
CREATE TABLE IF NOT EXISTS jaeger_archive_spans_local (
- timestamp DateTime CODEC(Delta, ZSTD(1)),
- traceID String CODEC(ZSTD(1)),
- model String CODEC(ZSTD(3))
+ timestamp DateTime CODEC(Delta, ZSTD(1)),
+ traceID String CODEC(ZSTD(1)),
+ model String CODEC(ZSTD(3))
) ENGINE MergeTree()
PARTITION BY toYYYYMM(timestamp)
ORDER BY traceID