代码拉取完成,页面将自动刷新
drop table if exists fx.app_dev_log;
drop table if exists fx.app_dev_log_buffer;
create table if not exists fx.app_dev_log
(
`Time` DateTime64(3, 'Asia/Shanghai'),
`Level` LowCardinality(String),
`Thread` LowCardinality(String),
`AppName` LowCardinality(String),
`TraceID` FixedString(16),
`SpanID` FixedString(16),
`Logger` LowCardinality(String),
`Method` LowCardinality(String),
`_raw_log_` String CODEC (ZSTD),
`ipaddr` LowCardinality(String),
INDEX idx_rawLog `_raw_log_` TYPE tokenbf_v1(32768, 3, 0) GRANULARITY 1,
INDEX idx_trace_id TraceID TYPE bloom_filter GRANULARITY 1,
INDEX idx_span_id SpanID TYPE bloom_filter GRANULARITY 1
)
ENGINE = MergeTree
PARTITION BY toYYYYMMDD(Time)
order by (AppName, Time)
ttl toDateTime(Time) + toIntervalDay(7)
;
-- Buffer(database, table, num_layers, min_time, max_time, min_rows, max_rows, min_bytes, max_bytes)
CREATE TABLE fx.app_dev_log_buffer AS fx.app_dev_log
ENGINE = Buffer(fx, app_dev_log, 16, 60, 900, 8192, 16384, 5000000, 50000000);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。