Skip to content

Commit

Permalink
Remove v2 suffix from table names (#33)
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay authored Jul 26, 2021
1 parent 6b89a50 commit eceb1d2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sqlscripts/0001-jaeger-index.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE IF NOT EXISTS jaeger_index_v2 (
CREATE TABLE IF NOT EXISTS jaeger_index (
timestamp DateTime CODEC(Delta, ZSTD(1)),
traceID String CODEC(ZSTD(1)),
service LowCardinality(String) CODEC(ZSTD(1)),
Expand Down
2 changes: 1 addition & 1 deletion sqlscripts/0002-jaeger-spans.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE IF NOT EXISTS jaeger_spans_v2 (
CREATE TABLE IF NOT EXISTS jaeger_spans (
timestamp DateTime CODEC(Delta, ZSTD(1)),
traceID String CODEC(ZSTD(1)),
model String CODEC(ZSTD(3))
Expand Down
4 changes: 2 additions & 2 deletions sqlscripts/0003-jaeger-operations.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE MATERIALIZED VIEW IF NOT EXISTS jaeger_operations_v2
CREATE MATERIALIZED VIEW IF NOT EXISTS jaeger_operations
ENGINE SummingMergeTree
PARTITION BY toYYYYMM(date) ORDER BY (date, service, operation)
SETTINGS index_granularity=32
Expand All @@ -8,5 +8,5 @@ AS SELECT
service,
operation,
count() as count
FROM jaeger_index_v2
FROM jaeger_index
GROUP BY date, service, operation
2 changes: 1 addition & 1 deletion sqlscripts/0004-jaeger-spans-archive.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE IF NOT EXISTS jaeger_archive_spans_v2 (
CREATE TABLE IF NOT EXISTS jaeger_archive_spans (
timestamp DateTime CODEC(Delta, ZSTD(1)),
traceID String CODEC(ZSTD(1)),
model String CODEC(ZSTD(3))
Expand Down
8 changes: 4 additions & 4 deletions storage/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ func NewStore(logger hclog.Logger, cfg Configuration, embeddedSQLScripts embed.F
}
return &Store{
db: db,
writer: clickhousespanstore.NewSpanWriter(logger, db, "jaeger_index_v2", "jaeger_spans_v2", clickhousespanstore.Encoding(cfg.Encoding), cfg.BatchFlushInterval, cfg.BatchWriteSize),
reader: clickhousespanstore.NewTraceReader(db, "jaeger_operations_v2", "jaeger_index_v2", "jaeger_spans_v2"),
archiveWriter: clickhousespanstore.NewSpanWriter(logger, db, "", "jaeger_archive_spans_v2", clickhousespanstore.Encoding(cfg.Encoding), cfg.BatchFlushInterval, cfg.BatchWriteSize),
archiveReader: clickhousespanstore.NewTraceReader(db, "", "", "jaeger_archive_spans_v2"),
writer: clickhousespanstore.NewSpanWriter(logger, db, "jaeger_index", "jaeger_spans", clickhousespanstore.Encoding(cfg.Encoding), cfg.BatchFlushInterval, cfg.BatchWriteSize),
reader: clickhousespanstore.NewTraceReader(db, "jaeger_operations", "jaeger_index", "jaeger_spans"),
archiveWriter: clickhousespanstore.NewSpanWriter(logger, db, "", "jaeger_archive_spans", clickhousespanstore.Encoding(cfg.Encoding), cfg.BatchFlushInterval, cfg.BatchWriteSize),
archiveReader: clickhousespanstore.NewTraceReader(db, "", "", "jaeger_archive_spans"),
}, nil
}

Expand Down

0 comments on commit eceb1d2

Please sign in to comment.