timothy65535 commented on issue #981: URL: https://github.com/apache/incubator-kyuubi/issues/981#issuecomment-908874132
> So just for speed? No, it also can support two more important feature, index and firing triggers when elements reach a certain threshold. They will very useful when clearing data. <br /> > I will bring a huge maintenance burden to Kyuubi? How about we provide another way faster? Actually, it's very simple. `ElementTrackingStore` is designed for a live UI or an event log. https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/status/ElementTrackingStore.scala ``` /** * A KVStore wrapper that allows tracking the number of elements of specific types, and triggering * actions once they reach a threshold. This allows writers, for example, to control how much data * is stored by potentially deleting old data as new data is added. * * This store is used when populating data either from a live UI or an event log. On top of firing * triggers when elements reach a certain threshold, it provides two extra bits of functionality: * * - a generic worker thread that can be used to run expensive tasks asynchronously; the tasks can * be configured to run on the calling thread when more determinism is desired (e.g. unit tests). * - a generic flush mechanism so that listeners can be notified about when they should flush * internal state to the store (e.g. after the SHS finishes parsing an event log). * * The configured triggers are run on a separate thread by default; they can be forced to run on * the calling thread by setting the `ASYNC_TRACKING_ENABLED` configuration to `false`. */ ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
