use of com.yahoo.memory.MemoryRegion in project druid by druid-io.
the class SketchBufferAggregator method getUnion.
//Note that this is not threadsafe and I don't think it needs to be
private Union getUnion(ByteBuffer buf, int position) {
Union union = unions.get(position);
if (union == null) {
Memory mem = new MemoryRegion(nm, position, maxIntermediateSize);
union = (Union) SetOperation.wrap(mem);
unions.put(position, union);
}
return union;
}
use of com.yahoo.memory.MemoryRegion in project druid by druid-io.
the class SketchBufferAggregator method init.
@Override
public void init(ByteBuffer buf, int position) {
if (nm == null) {
nm = new NativeMemory(buf);
}
Memory mem = new MemoryRegion(nm, position, maxIntermediateSize);
unions.put(position, (Union) SetOperation.builder().initMemory(mem).build(size, Family.UNION));
}
Aggregations