ElementTrackingStore¶
ElementTrackingStore is a KVStore that tracks the number of entities (elements) of specific types in a store and triggers actions once they reach a threshold.
Creating Instance¶
ElementTrackingStore takes the following to be created:
ElementTrackingStore is created when:
AppStatusStoreis requested to createLiveStoreFsHistoryProvideris requested to rebuildAppStore
Writing Value to Store¶
write(
value: Any): Unit
write is part of the KVStore abstraction.
write requests the KVStore to write the value
Writing Value to Store and Checking Triggers¶
write(
value: Any,
checkTriggers: Boolean): WriteQueueResult
write writes the value.
write...FIXME
write is used when:
LiveEntityis requested to writeStreamingQueryStatusListener(Spark Structured Streaming) is requested toonQueryStartedandonQueryTerminated
Creating View of Specific Entities¶
view[T](
klass: Class[T]): KVStoreView[T]
view is part of the KVStore abstraction.
view requests the KVStore for a view of klass entities.
Registering Trigger¶
addTrigger(
klass: Class[_],
threshold: Long)(
action: Long => Unit): Unit
addTrigger...FIXME
addTrigger is used when:
AppStatusListeneris createdHiveThriftServer2Listener(Spark Thrift Server) is createdSQLAppStatusListener(Spark SQL) is createdStreamingQueryStatusListener(Spark Structured Streaming) is created