Eshcar commented on issue #8126: [Proposal] BufferAggregator support for 
growable sketches.
URL: 
https://github.com/apache/incubator-druid/issues/8126#issuecomment-516411997
 
 
   As part of the work we are doing towards integrating Oak (off-heap based 
incremental index) integration into druid #5698, we invested some thought on 
how to bridge the gap between Oak--with its internal memory management, 
off-heap sketches--based on WritableMemory, and druid aggregators.
   I can share our thoughts, they aim to handle the same problems raised in 
this issue however the solution is different, hence it might be better to 
introduce it in a different issue.
   In a nutshell, 
   (1) Oak manages its memory and needs all allocations of buffers to go 
through the internal memory manager and only be exposed through Oak's API.
   (2) Off-heap sketches are based on WritableMemory, and can work with 
external memory manager that can allocate new WritableMemory when the sketch 
needs to grow
   (3) Druid aggregators access sketches through the aggregator API (init, 
aggregate, get) and a mapping from bytebuffer,position -> sketch
   
   What we suggest is to have oak manage the memory, including re-allocation of 
space when needed. Oak will implement its own WritebleMemory and 
MemoryRequestServer that are needed for a correct behaviour of the sketches wrt 
Oak index. Finally, we suggest to have a new Aggregator type - 
WritableMemoryAggregator that maps WritableMemory to sketch and can work the 
same way as buffer aggregators are working, and it does not need to worry about 
growing size of sketches. 
   
   There might be other alternatives for closing this loop; let's discuss them.
   
   Does all this make sense @leventov @himanshug ?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to