Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
ALTER TABLE zipkin2.span ADD l_service text;
DROP INDEX IF EXISTS zipkin2.span_l_service_idx;
CREATE CUSTOM INDEX IF NOT EXISTS ON zipkin2.span (l_service) USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = {'mode': 'PREFIX'};
ALTER TABLE zipkin2.span ADD annotation_query text; //-- can't do SASI on set: ░-joined until CASSANDRA-11182
CREATE CUSTOM INDEX IF NOT EXISTS ON zipkin2.span (annotation_query) USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = {
'mode': 'PREFIX',
'analyzed': 'true',
'analyzer_class':'org.apache.cassandra.index.sasi.analyzer.DelimiterAnalyzer',
'delimiter': '░'};
CREATE TABLE IF NOT EXISTS zipkin2.trace_by_service_span (
service text, //-- service name
span text, //-- span name, or blank for queries without span name
bucket int, //-- time bucket, calculated as ts/interval (in microseconds), for some pre-configured interval like 1 day.
ts timeuuid, //-- start timestamp of the span, truncated to millisecond precision
trace_id text, //-- trace ID
duration bigint, //-- span duration, in milliseconds
PRIMARY KEY ((service, span, bucket), ts)
)
WITH CLUSTERING ORDER BY (ts DESC)
AND compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy'}
AND default_time_to_live = 259200
AND gc_grace_seconds = 3600
AND read_repair_chance = 0
AND dclocal_read_repair_chance = 0
AND speculative_retry = '95percentile'
AND comment = 'Secondary table for looking up a trace by a service, or service and span. span column may be blank (when only looking up by service). bucket column adds time bucketing to the partition key, values are microseconds rounded to a pre-configured interval (typically one day). ts column is start timestamp of the span as time-uuid, truncated to millisecond precision. duration column is span duration, rounded up to tens of milliseconds (or hundredths of seconds)';
CREATE CUSTOM INDEX IF NOT EXISTS ON zipkin2.trace_by_service_span (duration) USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = {'mode': 'PREFIX'};
CREATE TABLE IF NOT EXISTS zipkin2.trace_by_service_remote_service (
service text, //-- service name
remote_service text, //-- remote servie name
bucket int, //-- time bucket, calculated as ts/interval (in microseconds), for some pre-configured interval like 1 day.
ts timeuuid, //-- start timestamp of the span, truncated to millisecond precision
trace_id text, //-- trace ID
PRIMARY KEY ((service, remote_service, bucket), ts)
)
WITH CLUSTERING ORDER BY (ts DESC)
AND compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy'}
AND default_time_to_live = 259200
AND gc_grace_seconds = 3600
AND read_repair_chance = 0
AND dclocal_read_repair_chance = 0
AND speculative_retry = '95percentile'
AND comment = 'Secondary table for looking up a trace by a remote service. bucket column adds time bucketing to the partition key, values are microseconds rounded to a pre-configured interval (typically one day). ts column is start timestamp of the span as time-uuid, truncated to millisecond precision.';
CREATE TABLE IF NOT EXISTS zipkin2.span_by_service (
service text,
span text,
PRIMARY KEY (service, span)
)
WITH compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'unchecked_tombstone_compaction': 'true', 'tombstone_threshold': '0.2'}
AND caching = {'rows_per_partition': 'ALL'}
AND default_time_to_live = 259200
AND gc_grace_seconds = 3600
AND read_repair_chance = 0
AND dclocal_read_repair_chance = 0
AND speculative_retry = '95percentile'
AND comment = 'Secondary table for looking up span names by a service name. To compensate for hot partitions, we deduplicate write client side, use LeveledCompactionStrategy with a low threshold and add row caching.';
CREATE TABLE IF NOT EXISTS zipkin2.remote_service_by_service (
service text,
remote_service text,
PRIMARY KEY (service, remote_service)
)
WITH compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'unchecked_tombstone_compaction': 'true', 'tombstone_threshold': '0.2'}
AND caching = {'rows_per_partition': 'ALL'}
AND default_time_to_live = 259200
AND gc_grace_seconds = 3600
AND read_repair_chance = 0
AND dclocal_read_repair_chance = 0
AND speculative_retry = '95percentile'
AND comment = 'Secondary table for looking up remote service names by a service name. To compensate for hot partitions, we deduplicate write client side, use LeveledCompactionStrategy with a low threshold and add row caching.';
CREATE TABLE IF NOT EXISTS zipkin2.autocomplete_tags (
key text,
value text,
PRIMARY KEY (key, value)
)
WITH compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'unchecked_tombstone_compaction': 'true', 'tombstone_threshold': '0.2'}
AND caching = {'rows_per_partition': 'ALL'}
AND default_time_to_live = 259200
AND gc_grace_seconds = 3600
AND read_repair_chance = 0
AND dclocal_read_repair_chance = 0
AND speculative_retry = '95percentile'
AND comment = 'Secondary table for looking up span tag values for auto-complete purposes. To compensate for hot partitions, we deduplicate write client side, use LeveledCompactionStrategy with a low threshold and add row caching.';