Skip to content

Instantly share code, notes, and snippets.

@didip
Created December 2, 2016 14:34
Show Gist options
  • Save didip/4fe99538a4acfa9bc31952ac06edcc39 to your computer and use it in GitHub Desktop.
Save didip/4fe99538a4acfa9bc31952ac06edcc39 to your computer and use it in GitHub Desktop.
CREATE TABLE IF NOT EXISTS hosts (
id text,
cluster_id bigint,
access_token_id bigint,
hostname text,
updated bigint,
tags map<text, text>,
master_tags map<text, text>,
data map<text, text>,
lucene text,
PRIMARY KEY (id)
) WITH caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
AND crc_check_chance = 0
AND dclocal_read_repair_chance = 0
AND default_time_to_live = 0
AND gc_grace_seconds = 0
AND memtable_flush_period_in_ms = 0
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';
CREATE CUSTOM INDEX IF NOT EXISTS idx_hosts_lucene ON hosts (lucene) USING 'com.stratio.cassandra.lucene.Index' WITH OPTIONS = {
'schema' : '{
fields : {
id : {type : "string"},
cluster_id: {type : "integer"},
hostname : {type : "string"},
updated: {type : "integer"},
tags : {type : "string"},
master_tags : {type : "string"},
data_string : { type : "string", column: "data"},
data_float : { type : "float", column: "data"}
}
}'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment