[COMMON] Add and run pre-commit linters via tox
[oom.git] / kubernetes / portal / components / portal-cassandra / resources / config / cassandra / docker-entrypoint-initdb.d / portal_single.cql
1 // Copyright © 2018 Amdocs, Bell Canada, AT&T\r
2 //\r
3 // Licensed under the Apache License, Version 2.0 (the "License");\r
4 // you may not use this file except in compliance with the License.\r
5 // You may obtain a copy of the License at\r
6 //\r
7 //       http://www.apache.org/licenses/LICENSE-2.0\r
8 //\r
9 // Unless required by applicable law or agreed to in writing, software\r
10 // distributed under the License is distributed on an "AS IS" BASIS,\r
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
12 // See the License for the specific language governing permissions and\r
13 // limitations under the License.\r
14 \r
15 \r
16 CREATE KEYSPACE IF NOT EXISTS admin\r
17     WITH REPLICATION = {\r
18         'class' : 'SimpleStrategy',\r
19         'replication_factor': 1\r
20     }\r
21     AND DURABLE_WRITES = true;\r
22 \r
23 CREATE TABLE IF NOT EXISTS admin.keyspace_master (\r
24     uuid uuid,\r
25     keyspace_name text,\r
26     application_name text,\r
27     is_api boolean,\r
28     password text,\r
29     username text,\r
30     is_aaf boolean,\r
31     PRIMARY KEY (uuid)\r
32 );\r
33 \r
34 \r
35 CREATE KEYSPACE IF NOT EXISTS portal\r
36     WITH REPLICATION = {\r
37         'class' : 'SimpleStrategy',\r
38         'replication_factor': 1\r
39     }\r
40     AND DURABLE_WRITES = true;\r
41 \r
42 \r
43 CREATE TABLE portal.spring_session (\r
44     primary_id text PRIMARY KEY,\r
45     creation_time text,\r
46     expiry_time text,\r
47     last_access_time text,\r
48     max_inactive_interval text,\r
49     principal_name text,\r
50     session_id text,\r
51     vector_ts text\r
52 ) WITH bloom_filter_fp_chance = 0.01\r
53     AND caching = {'keys': 'ALL', 'rows_per_partition': '10'}\r
54     AND comment = ''\r
55     AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}\r
56     AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}\r
57     AND crc_check_chance = 1.0\r
58     AND dclocal_read_repair_chance = 0.1\r
59     AND default_time_to_live = 0\r
60     AND gc_grace_seconds = 864000\r
61     AND max_index_interval = 2048\r
62     AND memtable_flush_period_in_ms = 0\r
63     AND min_index_interval = 128\r
64     AND read_repair_chance = 0.0\r
65     AND speculative_retry = '99PERCENTILE';\r
66 \r
67 \r
68 CREATE TABLE portal.spring_session_attributes (\r
69     primary_id text,\r
70     attribute_name text,\r
71     attribute_bytes blob,\r
72     vector_ts text,\r
73     PRIMARY KEY (primary_id, attribute_name)\r
74 ) WITH CLUSTERING ORDER BY (attribute_name ASC)\r
75     AND bloom_filter_fp_chance = 0.01\r
76     AND caching = {'keys': 'ALL', 'rows_per_partition': '1'}\r
77     AND comment = ''\r
78     AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}\r
79     AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}\r
80     AND crc_check_chance = 1.0\r
81     AND dclocal_read_repair_chance = 0.1\r
82     AND default_time_to_live = 0\r
83     AND gc_grace_seconds = 864000\r
84     AND max_index_interval = 2048\r
85     AND memtable_flush_period_in_ms = 0\r
86     AND min_index_interval = 128\r
87     AND read_repair_chance = 0.0\r
88     AND speculative_retry = '99PERCENTILE';\r
89 \r
90 \r
91 \r
92 CREATE KEYSPACE IF NOT EXISTS portalsdk\r
93     WITH REPLICATION = {\r
94         'class' : 'SimpleStrategy',\r
95         'replication_factor': 1\r
96     }\r
97     AND DURABLE_WRITES = true;\r
98 \r
99 \r
100 CREATE TABLE portalsdk.spring_session (\r
101     primary_id text PRIMARY KEY,\r
102     creation_time text,\r
103     expiry_time text,\r
104     last_access_time text,\r
105     max_inactive_interval text,\r
106     principal_name text,\r
107     session_id text,\r
108     vector_ts text\r
109 ) WITH bloom_filter_fp_chance = 0.01\r
110     AND caching = {'keys': 'ALL', 'rows_per_partition': '10'}\r
111     AND comment = ''\r
112     AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}\r
113     AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}\r
114     AND crc_check_chance = 1.0\r
115     AND dclocal_read_repair_chance = 0.1\r
116     AND default_time_to_live = 0\r
117     AND gc_grace_seconds = 864000\r
118     AND max_index_interval = 2048\r
119     AND memtable_flush_period_in_ms = 0\r
120     AND min_index_interval = 128\r
121     AND read_repair_chance = 0.0\r
122     AND speculative_retry = '99PERCENTILE';\r
123 \r
124 \r
125 CREATE TABLE portalsdk.spring_session_attributes (\r
126     primary_id text,\r
127     attribute_name text,\r
128     attribute_bytes blob,\r
129     vector_ts text,\r
130     PRIMARY KEY (primary_id, attribute_name)\r
131 ) WITH CLUSTERING ORDER BY (attribute_name ASC)\r
132     AND bloom_filter_fp_chance = 0.01\r
133     AND caching = {'keys': 'ALL', 'rows_per_partition': '1'}\r
134     AND comment = ''\r
135     AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}\r
136     AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}\r
137     AND crc_check_chance = 1.0\r
138     AND dclocal_read_repair_chance = 0.1\r
139     AND default_time_to_live = 0\r
140     AND gc_grace_seconds = 864000\r
141     AND max_index_interval = 2048\r
142     AND memtable_flush_period_in_ms = 0\r
143     AND min_index_interval = 128\r
144     AND read_repair_chance = 0.0\r
145     AND speculative_retry = '99PERCENTILE';