You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by "Peter Bacsko (Jira)" <ji...@apache.org> on 2023/04/27 10:45:00 UTC

[jira] [Created] (YUNIKORN-1709) Store events separately for event streaming

Peter Bacsko created YUNIKORN-1709:
--------------------------------------

             Summary: Store events separately for event streaming
                 Key: YUNIKORN-1709
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-1709
             Project: Apache YuniKorn
          Issue Type: Sub-task
          Components: core - scheduler
            Reporter: Peter Bacsko


In order to send events to listeners, we need to store EventRecord types in a different data structure.
When a client connects, it might require us that we send the last "x" amount of events or the events that occurred in the last 30 seconds, etc.

But we cannot store events without limits. The data structure that suits our needs is a  slightly modified ring buffer:
* two pointers: head, tail (oldest)
* don't block when we overwrite the oldest entry, just update tail
* entries are not removed when retrieved by a consumer
* background goroutine performs the cleanup

Requirement for storage:
* last "n" events
* events from the last "n" seconds (duration)

Scope of this JIRA: 
* new data structure
* integration with existing code
* configuration entries
* cleanup logic



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: dev-help@yunikorn.apache.org