-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partition by intersection #50
Conversation
…undefined region to ProcessedMap and ProcessedSpat keys
…ased on intersection id
…tionEventTopology
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Conflict Monitor has been using -1 to indicate an unknown intersectionId and Region. Do we want to be using -1 instead of null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to use -1 for null intersection / region ID?
Changes the partitioning scheme to use intersection ID (and region) instead of RSU ID.
Uses the
IntersectionIdKey
interface defined in the Geojson Converter to perform partitioning for MAPs, SPATs, BSMs, and output events. See: Geoson Converter PR #37.The logic that produces intersection events (in
IntersectionEventTopology
and related analytics classes) is all updated to perform join operations based on intersection ID instead of RSU IP.The
region
is treated as optional. If it is present, it is used in joins, but if it is absent (value -1), or set to the 'test' value of 0, it is ignored in comparisons and joins.BSM partitioning is performed in several steps:
RepartitionTopology
ingests keyless BSMs fromtopic.OdeBsmJson
and writes them totopic.CmBsmJsonRepartition
partitioned by RSU IP address, because they have not been joined with an intersection at this point. The Vehicle ID is also included in the key here.BsmEventTopology
reads the RSU-partitioned BSMs fromtopic.CmBsmJsonRepartition
, and categorizes them geographically using the spatial index of MAP bounding boxes to constructBSMEvent
paths that are also grouped by vehicle ID and RSU IP address. TheBsmEventTopology
then outputs theBSMEvent
s totopic.CMBsmEvents
, and also writes the raw BSMs that are within intersection bounding boxes to a new topic,topic.CmBsmIntersection
. Both outputs are partitioned by Intersection ID.MessageIngestTopology
reads the Intersection ID-partitioned BSMs fromtopic.CmBsmIntersection
, and stores them in a time-windowed, queryable state store. This state store now only includes BSMs that are within MAP bounding boxes.IntersectionEventTopology
reads in the Intersection ID-partionedBSMEvents
and removes duplicates (which are duplicate BSM paths seen by multiple RSUs) before passing them along to join with MAPs and SPATs.The unit tests were updated, and integration testing was performed using a test script with UTDOT data running with 3 partitions on 3 brokers.