Package org.apache.hadoop.hbase.io.hfile

Examples of org.apache.hadoop.hbase.io.hfile.Cacheable


          if (lenRead != len) {
            throw new RuntimeException("Only " + lenRead + " bytes read, " + len + " expected");
          }
          CacheableDeserializer<Cacheable> deserializer =
            bucketEntry.deserializerReference(this.deserialiserMap);
          Cacheable cachedBlock = deserializer.deserialize(bb, true);
          long timeTaken = System.nanoTime() - start;
          if (updateCacheMetrics) {
            cacheStats.hit(caching);
            cacheStats.ioHit(timeTaken);
          }
View Full Code Here


    if (cachedBlock == null) {
      stats.miss(caching);
      return null;
    }

    Cacheable contentBlock = cachedBlock.getBlock(key, caching);

    if (contentBlock != null) {
      stats.hit(caching);
    } else {
      stats.miss(caching);
View Full Code Here

   * Manually run the WriterThread.
   * @throws InterruptedException
   */
  @Test
  public void testTooBigEntry() throws InterruptedException {
    Cacheable tooBigCacheable = Mockito.mock(Cacheable.class);
    Mockito.when(tooBigCacheable.getSerializedLength()).thenReturn(Integer.MAX_VALUE);
    this.bc.cacheBlock(this.plainKey, tooBigCacheable);
    doDrainOfOneEntry(this.bc, this.wt, this.q);
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.io.hfile.Cacheable

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.