How to update segments in realtime kafka indexing service?

Hi All,

I have a using case in which I am trying to show current status of certain entity in realtime / count of entities in some status.

Use Case :

Event 1

Entity : Status

1 : Open

Ingested in druid.

Count of Entities in Open status = 1

Event 2

Entity : Status

1 : Closed

If we don’t update the segment result would be :

Count of Entities in Open status = 1

Count of Entities in Closed status = 1

But actual output should be :

Count of Entities in Open status = 0

Count of Entities in Closed status = 1

But If once segment is handed of it can not be modified.

Above is the git issue which was created long back.

I was last updated long back.So do we have a way to solve the same.

Any update ?

You can not really keep the logical state of something in Druid.

You can record each “open” and “close” event in Druid and count them, but you can not keep a state machine for each entity.