Package org.apache.hadoop.hbase.regionserver.MemStoreLAB

Examples of org.apache.hadoop.hbase.regionserver.MemStoreLAB.Chunk


      int initialCount) {
    this.maxCount = maxCount;
    this.chunkSize = chunkSize;
    this.reclaimedChunks = new LinkedBlockingQueue<Chunk>();
    for (int i = 0; i < initialCount; i++) {
      Chunk chunk = new Chunk(chunkSize);
      chunk.init();
      reclaimedChunks.add(chunk);
    }
    final String n = Thread.currentThread().getName();
    scheduleThreadPool = Executors.newScheduledThreadPool(1,
        new ThreadFactoryBuilder().setNameFormat(n+"-MemStoreChunkPool Statistics")
View Full Code Here


   * Poll a chunk from the pool, reset it if not null, else create a new chunk
   * to return
   * @return a chunk
   */
  Chunk getChunk() {
    Chunk chunk = reclaimedChunks.poll();
    if (chunk == null) {
      chunk = new Chunk(chunkSize);
      createdChunkCount.incrementAndGet();
    } else {
      chunk.reset();
      reusedChunkCount.incrementAndGet();
    }
    return chunk;
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.regionserver.MemStoreLAB.Chunk

Copyright © 2018 www.massapicom. 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.