class StateMgmt extends Serializable
State Management, for object tracking over a period of time, used for metadata in protobuf
//init state management val stateMgmt = new StateMgmt (config) //usage for dataset of Message dataset .groupByKey (msg => msg.key) .mapGroupsWithState (processingTimeTimeout () ) (stateMgmt.updateBehavior)
- Alphabetic
- By Inheritance
- StateMgmt
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new StateMgmt(config: Map[String, String])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
groupByObjectId(id: String, inputs: Iterator[Message]): (String, List[Message])
used with simple map group for Message with objectID, relevant for doing object ID specific processing, example get the sequence of Message to form the behavior
used with simple map group for Message with objectID, relevant for doing object ID specific processing, example get the sequence of Message to form the behavior
dataset //Message dataset .groupByKey { message => val objectID = extract objectID from Message objectID }.mapGroups(stateMgmt.groupByObjectId)
-
def
groupBySensorId(id: String, inputs: Iterator[Behavior]): (String, List[Behavior])
used with simple map group for behavior with sensorID, relevant for doing sensor specific processing, example inference with respect to sensor model to find traffic pattern
used with simple map group for behavior with sensorID, relevant for doing sensor specific processing, example inference with respect to sensor model to find traffic pattern
dataset //Behavior dataset .groupByKey { behavior => val sensorId = extract sensorId from behavior sensorId }.mapGroups(stateMgmt.groupBySensorId)
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
updateBehaviorE(objectId: String, inputs: Iterator[Message], groupState: GroupState[ObjectState]): Option[Behavior]
tracks and maintains state for a given object Euclidean space , internally named ObjectState, the ID is uniquely identified using sensorId + ObjectId
tracks and maintains state for a given object Euclidean space , internally named ObjectState, the ID is uniquely identified using sensorId + ObjectId
it does the following functions
- remove any ObjectState which is timed out.
- create new ObjectState, if no similar objectId was seen before or existing ObjectId was last seen long time back
- update existing ObjectState if the new data event timestamp is within configurable time span
- prune ObjectState as needed, when the object is seen for long period of times, say parked car, the number of points are pruned to reduce the memory footprint
- generate List of embeddings representing different variantions in an object
ObjectState state management saves/stores least amount of information to reduce the storage,
- sensorId + objectId
- start and end timestamp
- sequence of real world coordinates
- List of embedddings representing a object, thousands of embeddings can get generated for an given object, which are clusered using com.nvidia.mdx.core.util.CRP
- other attributes like Pose, Gaze, Gesture
The internal state is translated to Object nv.schema.ext.Behavior before sending it to any sink for consumption
this function is used in conjuction to "apache spark Stateful transformations with mapGroupsWithState" The mapGroupsWithState(timeoutConf: GroupStateTimeout)(func: (K, Iterator[V], GroupState[S]) => U) is a transformation applied on a group of data.
- def updateBehaviorEwithTripwire(objectId: String, inputsIter: Iterator[Message], groupState: GroupState[ObjectState]): Option[(Behavior, Behavior)]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated