Skip to content

Commit 8ce3a11

Browse files
authored
Merge pull request #17 from CDOT-CV/mongo-ttl-updates
Mongo ttl updates
2 parents a51bb97 + b20d47b commit 8ce3a11

File tree

3 files changed

+42
-11
lines changed

3 files changed

+42
-11
lines changed

jikkou/kafka-connectors-values.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ apps:
201201
- topicName: topic.CmTimestampDeltaEvent
202202
collectionName: CmTimestampDeltaEvent
203203
useTimestamp: true
204+
- topicName: topic.CmSpatTransitionEvent
205+
collectionName: CmSpatTransitionEvent
206+
useTimestamp: true
207+
- topicName: topic.CmEventStateProgressionEvent
208+
collectionName: CmEventStateProgressionEvent
209+
useTimestamp: true
204210
timestampField: eventGeneratedAt
205211
- topicName: topic.CmSpatMessageCountProgressionEvents
206212
collectionName: CmSpatMessageCountProgressionEvents
@@ -303,6 +309,13 @@ apps:
303309
collectionName: CmSignalGroupAlignmentNotification
304310
useTimestamp: true
305311
timestampField: notificationGeneratedAt
312+
- topicName: topic.CmIntersectionReferenceAlignmentNotification
313+
collectionName: CmIntersectionReferenceAlignmentNotification
314+
useTimestamp: true
315+
- topicName: topic.CmSpatTransitionNotification
316+
collectionName: CmSpatTransitionNotification
317+
useTimestamp: true
318+
timestampField: notificationGeneratedAt
306319
- topicName: topic.CmNotification
307320
collectionName: CmNotification
308321
useTimestamp: true

jikkou/kafka-topics-values.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ apps:
115115
- topic.CmBsmIntersection
116116
- topic.CmKafkaStateChangeEvents
117117
- topic.CmTimestampDeltaEvent
118+
- topic.CmSpatTransitionEvent
118119
- topic.CmBsmMessageCountProgressionEvents
119120
- topic.CmMapMessageCountProgressionEvents
120121
- topic.CmSpatMessageCountProgressionEvents
@@ -132,7 +133,6 @@ apps:
132133
tableTopics:
133134
- topic.CmLaneDirectionOfTravelNotification
134135
- topic.CmConnectionOfTravelNotification
135-
- topic.CmAppHealthNotification
136136
- topic.CmSpatTimeChangeDetailsNotification
137137
- topic.CmSignalStateConflictNotification
138138
- topic.CmSignalGroupAlignmentNotification
@@ -155,12 +155,14 @@ apps:
155155
- topic.CmSpatRevisionCounterEvents
156156
- topic.CmBsmRevisionCounterEvents
157157
- topic.CmTimestampDeltaNotification
158+
- topic.CmSpatTransitionNotification
159+
- topic.CmEventStateProgressionNotification
158160
- topic.CmIntersectionReferenceAlignmentNotificationAggregation
159161
- topic.CmSignalGroupAlignmentNotificationAggregation
160162
- topic.CmSignalStateConflictNotificationAggregation
161163
- topic.CmSpatTimeChangeDetailsNotificationAggregation
162164
- topic.CmEventStateProgressionNotificationAggregation
163-
- topic.CmEventStateProgressionNotification
165+
164166
customTopics: {}
165167
deduplicator:
166168
name: jpo-deduplicator

mongo/create_indexes.js

+25-9
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ const geoJsonConverterCollections = [
9494

9595
const conflictMonitorCollections = [
9696
// Conflict Monitor Events
97+
//{ name: "CmEvent", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds }, redundant - enable as needed
9798
{ name: "CmStopLineStopEvent", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
9899
{ name: "CmStopLinePassageEvent", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
99100
{ name: "CmIntersectionReferenceAlignmentEvents", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
@@ -107,25 +108,33 @@ const conflictMonitorCollections = [
107108
{ name: "CmMapMinimumDataEvents", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
108109
{ name: "CmSpatBroadcastRateEvents", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
109110
{ name: "CmBsmEvents", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
111+
{ name: "CmTimestampDeltaEvent", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
112+
{ name: "CmSpatTransitionEvent", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
113+
{ name: "CmEventStateProgressionEvent", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
114+
115+
110116

111117

112118
{ name: "CmSpatMessageCountProgressionEvents", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
113119
{ name: "CmMapMessageCountProgressionEvents", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
114120
{ name: "CmBsmMessageCountProgressionEvents", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
115121

116-
{ name: "CmSpatMinimumDataAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
117-
{ name: "CmMapMinimumDataAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
118-
{ name: "CmIntersectionReferenceAlignmentAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
119-
{ name: "CmSignalGroupAlignmentAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
120-
{ name: "CmSignalStateConflictAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
122+
{ name: "CmSpatMinimumDataEventAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
123+
{ name: "CmMapMinimumDataEventAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
124+
{ name: "CmIntersectionReferenceAlignmentEventAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
125+
{ name: "CmSignalGroupAlignmentEventAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
126+
{ name: "CmSignalStateConflictEventAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
121127
{ name: "CmTimeChangeDetailsAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
122-
{ name: "CmEventStateProgressionAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
123-
{ name: "CmBsmMessageCountProgressionAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
124-
{ name: "CmMapMessageCountProgressionAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
125-
{ name: "CmSpatMessageCountProgressionAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
128+
{ name: "CmSpatTimeChangeDetailsEventAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
129+
{ name: "CmEventStateProgressionEventAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
130+
{ name: "CmBsmMessageCountProgressionEventAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
131+
{ name: "CmMapMessageCountProgressionEventAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
132+
{ name: "CmSpatMessageCountProgressionEventAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
126133

127134

128135
// Conflict Monitor Assessments
136+
137+
//{ name: "CmAssessment", ttlField: "assessmentGeneratedAt", timeField: "assessmentGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds }, redundant - enable as needed
129138
{ name: "CmLaneDirectionOfTravelAssessment", ttlField: "assessmentGeneratedAt", timeField: "assessmentGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
130139
{ name: "CmConnectionOfTravelAssessment", ttlField: "assessmentGeneratedAt", timeField: "assessmentGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
131140
{ name: "CmSignalStateEventAssessment", ttlField: "assessmentGeneratedAt", timeField: "assessmentGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
@@ -140,13 +149,20 @@ const conflictMonitorCollections = [
140149
{ name: "CmSignalGroupAlignmentNotification", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
141150
{ name: "CmStopLinePassageNotification", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
142151
{ name: "CmStopLineStopNotification", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
152+
{ name: "CmTimestampDeltaNotification", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
153+
{ name: "CmSpatTransitionNotification", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
154+
{ name: "CmEventStateProgressionNotification", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
143155
{ name: "CmNotification", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
144156

145157
{ name: "CmEventStateProgressionNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
146158
{ name: "CmIntersectionReferenceAlignmentNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
147159
{ name: "CmSignalGroupAlignmentNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
148160
{ name: "CmSignalStateConflictNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
149161
{ name: "CmTimeChangeDetailsNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
162+
{ name: "CmSpatTimeChangeDetailsNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
163+
164+
165+
150166

151167
// Reports
152168
{ name: "CmReport", timeField: "reportGeneratedAt", intersectionField: "intersectionID"},

0 commit comments

Comments
 (0)