Package io.netty.buffer

Examples of io.netty.buffer.DrillBuf.release()


    reader.setPosition(lastRecordCount - 1);
    assertEquals("red", reader.reader("c").readText().toString());
    assertEquals((repeatSize+1) * 2, total);

    writer.clear();
    buffer.release();
  }

}
View Full Code Here


        throw new IOException(new OutOfMemoryException());
      }
      buf.writeBytes(input, dataLength);
      ValueVector vector = TypeHelper.getNewVector(field, allocator);
      vector.load(metaData, buf);
      buf.release();
      vectorList.add(vector);
    }
    container.addCollection(vectorList);
    container.buildSchema(svMode);
    container.setRecordCount(recordCount);
View Full Code Here

            /* If we have a selection vector, dump it to file first */
      if (svBuf != null)
      {
        svBuf.getBytes(0, output, svBuf.readableBytes());
        sv2.setBuffer(svBuf);
        svBuf.release(); // sv2 now owns the buffer
        sv2.setRecordCount(svCount);
      }

            /* Dump the array of ByteBuf's associated with the value vectors */
      for (DrillBuf buf : incomingBuffers)
View Full Code Here

        }
        DrillBuf intermediate = data.getAllocator().buffer(intermediateBytes.length);
        intermediate.setBytes(0, intermediateBytes);

        BigDecimal ret = getBigDecimalFromIntermediate(intermediate, 0, nDecimalDigits + 1, scale);
        intermediate.release();
        return ret;
    }

    /*
     * Function converts the BigDecimal and stores it in out internal sparse representation
View Full Code Here

        SerializedField fmd = fields.get(vectorIndex);
        ValueVector v = vv.getValueVector();
        DrillBuf bb = newBuf.slice(bufferOffset, fmd.getBufferLength());
//        v.load(fmd, cbb.slice(bufferOffset, fmd.getBufferLength()));
        v.load(fmd, bb);
        bb.release();
        vectorIndex++;
        bufferOffset += fmd.getBufferLength();
      }
    }
View Full Code Here

      watch.start();
      BitData.FragmentRecordBatch header = BitData.FragmentRecordBatch.parseDelimitedFrom(stream);
      DrillBuf buf = allocator.buffer(bodyLength);
      buf.writeBytes(stream, bodyLength);
      batch = new RawFragmentBatch(null, header, buf, null);
      buf.release();
      available = true;
      latch.countDown();
      long t = watch.elapsed(TimeUnit.MICROSECONDS);
      logger.debug("Took {} us to read {} from disk. Rate {} mb/s", t, bodyLength, bodyLength / t);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.