From a23df56b25c84cbed2e15a9727079834eeb6fef7 Mon Sep 17 00:00:00 2001 From: Norm Traxler Date: Tue, 24 Aug 2021 09:57:11 -0400 Subject: [PATCH] [WIFI-3472] Change metric TTL to 8 days. --- .../src/main/resources/schema-cassandra.cql | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/service-metric-datastore-cassandra/src/main/resources/schema-cassandra.cql b/service-metric-datastore-cassandra/src/main/resources/schema-cassandra.cql index b666f596..4a1efb9c 100644 --- a/service-metric-datastore-cassandra/src/main/resources/schema-cassandra.cql +++ b/service-metric-datastore-cassandra/src/main/resources/schema-cassandra.cql @@ -14,10 +14,10 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric ( locationId bigint, details blob, - + PRIMARY KEY ((customerId, equipmentId, dayOfYear), clientMac, dataType, createdTimestamp) ) WITH comment='Wlan service metrics for Equipment and Network generated by the TIP WLAN CloudSDK. Records automatically expire after 30 days' - AND default_time_to_live = 2592000; + AND default_time_to_live = 691200; --- -- Tables to support filtering by customer, equipment and macAddress @@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_customer ( PRIMARY KEY ((customerId), createdTimestamp, equipmentId, clientMac, dataType) ) WITH comment='Look up Wlan service metrics by customer. Records automatically expire after 30 days' - AND default_time_to_live = 2592000; + AND default_time_to_live = 691200; CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_equipment ( customerId int, @@ -47,7 +47,7 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_equipment ( PRIMARY KEY ((customerId, equipmentId), createdTimestamp, clientMac, dataType) ) WITH comment='Look up Wlan service metrics by equipment. Records automatically expire after 30 days' - AND default_time_to_live = 2592000; + AND default_time_to_live = 691200; CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_mac ( customerId int, @@ -60,8 +60,8 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_equipment ( PRIMARY KEY ((customerId, clientMac), createdTimestamp, equipmentId, dataType) ) WITH comment='Look up Wlan service metrics by client Mac address. Records automatically expire after 30 days' - AND default_time_to_live = 2592000; - + AND default_time_to_live = 691200; + CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_mac_and_equipment ( customerId int, equipmentId bigint, @@ -73,7 +73,7 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_equipment ( PRIMARY KEY ((customerId, clientMac), equipmentId, createdTimestamp, dataType) ) WITH comment='Look up Wlan service metrics by client Mac address and equipment. Records automatically expire after 30 days' - AND default_time_to_live = 2592000; + AND default_time_to_live = 691200; --- -- Tables to support filtering by the datatype @@ -90,7 +90,7 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_customer_datatype PRIMARY KEY ((customerId), dataType, createdTimestamp, equipmentId, clientMac) ) WITH comment='Look up Wlan service metrics by customer and data type. Records automatically expire after 30 days' - AND default_time_to_live = 2592000; + AND default_time_to_live = 691200; CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_equipment_datatype ( customerId int, @@ -103,7 +103,7 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_equipment_datatyp PRIMARY KEY ((customerId, equipmentId), dataType, createdTimestamp, clientMac) ) WITH comment='Look up Wlan service metrics by equipment and datatype. Records automatically expire after 30 days' - AND default_time_to_live = 2592000; + AND default_time_to_live = 691200; CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_mac_datatype ( customerId int, @@ -116,8 +116,8 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_equipment_datatyp PRIMARY KEY ((customerId, clientMac), dataType, createdTimestamp, equipmentId) ) WITH comment='Look up Wlan service metrics by client Mac address and datatype. Records automatically expire after 30 days' - AND default_time_to_live = 2592000; - + AND default_time_to_live = 691200; + CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_mac_and_equipment_datatype ( customerId int, equipmentId bigint, @@ -129,8 +129,8 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_equipment_datatyp PRIMARY KEY ((customerId, clientMac), equipmentId, dataType, createdTimestamp) ) WITH comment='Look up Wlan service metrics by client Mac address and equipment and datatype. Records automatically expire after 30 days' - AND default_time_to_live = 2592000; - + AND default_time_to_live = 691200; + CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_location ( customerId int, equipmentId bigint, @@ -139,11 +139,11 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_equipment_datatyp dataType int, createdTimestamp bigint, - locationId bigint, + locationId bigint, PRIMARY KEY ((customerId, locationId), createdTimestamp, equipmentId, clientMac, dataType) ) WITH comment='Look up Wlan service metrics by location. Records automatically expire after 30 days' - AND default_time_to_live = 2592000; + AND default_time_to_live = 691200; CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_location_all_filters ( customerId int, @@ -153,9 +153,8 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.service_metric_by_equipment_datatyp dataType int, createdTimestamp bigint, - locationId bigint, + locationId bigint, PRIMARY KEY ((customerId, locationId), equipmentId, clientMac, dataType, createdTimestamp) ) WITH comment='Look up Wlan service metrics by location. Records automatically expire after 30 days' - AND default_time_to_live = 2592000; - \ No newline at end of file + AND default_time_to_live = 691200;