Description
The critical code is shown below:
IPCUtil.java
// We should put the ByteBuffer into pool before return null public ByteBuffer buildCellBlock(final Codec codec, final CompressionCodec compressor, final CellScanner cellScanner, final BoundedByteBufferPool pool) { ... if (pool != null) { ByteBuffer bb = pool.getBuffer(); bufferSize = bb.capacity(); baos = new ByteBufferOutputStream(bb); } ... int count = 0; while (cellScanner.advance()) { encoder.write(cellScanner.current()); count++; } encoder.flush(); if (count == 0) return null; }