Merge "[DMAAP] DMaaP ServiceMesh compatibility"
[oom.git] / kubernetes / portal / components / portal-cassandra / resources / config / cassandra / docker-entrypoint-initdb.d / portal.cql
1 // Copyright (c) 2018 Amdocs, Bell Canada, AT&T
2 // Modifications Copyright (c) 2020 Nokia
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //       http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15
16 CREATE KEYSPACE IF NOT EXISTS portal
17     WITH REPLICATION = {
18         'class' : 'SimpleStrategy',
19         'replication_factor': 1
20     }
21     AND DURABLE_WRITES = true;
22
23
24 CREATE TABLE portal.spring_session (
25     primary_id text PRIMARY KEY,
26     creation_time text,
27     expiry_time text,
28     last_access_time text,
29     max_inactive_interval text,
30     principal_name text,
31     session_id text,
32     vector_ts text
33 ) WITH bloom_filter_fp_chance = 0.01
34     AND caching = {'keys': 'ALL', 'rows_per_partition': '10'}
35     AND comment = ''
36     AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
37     AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
38     AND crc_check_chance = 1.0
39     AND dclocal_read_repair_chance = 0.1
40     AND default_time_to_live = 0
41     AND gc_grace_seconds = 864000
42     AND max_index_interval = 2048
43     AND memtable_flush_period_in_ms = 0
44     AND min_index_interval = 128
45     AND read_repair_chance = 0.0
46     AND speculative_retry = '99PERCENTILE';
47
48
49 CREATE TABLE portal.spring_session_attributes (
50     primary_id text,
51     attribute_name text,
52     attribute_bytes blob,
53     vector_ts text,
54     PRIMARY KEY (primary_id, attribute_name)
55 ) WITH CLUSTERING ORDER BY (attribute_name ASC)
56     AND bloom_filter_fp_chance = 0.01
57     AND caching = {'keys': 'ALL', 'rows_per_partition': '1'}
58     AND comment = ''
59     AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
60     AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
61     AND crc_check_chance = 1.0
62     AND dclocal_read_repair_chance = 0.1
63     AND default_time_to_live = 0
64     AND gc_grace_seconds = 864000
65     AND max_index_interval = 2048
66     AND memtable_flush_period_in_ms = 0
67     AND min_index_interval = 128
68     AND read_repair_chance = 0.0
69     AND speculative_retry = '99PERCENTILE';
70
71 CREATE TABLE portal.health_check (primary_id text PRIMARY KEY, creation_time text);
72 insert into portal.health_check (primary_id,creation_time) values ('ECOMPPortal-25927','2018-05-25T20:14:39.408Z');