use of com.yahoo.memory.NativeMemory in project Gaffer by gchq.
the class UnionSerialiser method deserialise.
@Override
public Union deserialise(final byte[] bytes) throws SerialisationException {
final Union union = Sketches.setOperationBuilder().buildUnion();
union.update(Sketch.heapify(new NativeMemory(bytes)));
return union;
}
use of com.yahoo.memory.NativeMemory 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));
}
use of com.yahoo.memory.NativeMemory in project Gaffer by gchq.
the class DoublesUnionSerialiser method deserialise.
@Override
public DoublesUnion deserialise(final byte[] bytes) throws SerialisationException {
final DoublesUnion union = DoublesUnion.builder().build();
union.update(new NativeMemory(bytes));
return union;
}
Aggregations