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

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


        lockEntry = offsetLock.getLockEntry(bucketEntry.offset());
        if (bucketEntry.equals(backingMap.get(key))) {
          int len = bucketEntry.getLength();
          ByteBuffer bb = ByteBuffer.allocate(len);
          ioEngine.read(bb, bucketEntry.offset());
          Cacheable cachedBlock = bucketEntry.deserializerReference(
              deserialiserMap).deserialize(bb, true);
          long timeTaken = System.nanoTime() - start;
          cacheStats.hit(caching);
          cacheStats.ioHit(timeTaken);
          bucketEntry.access(accessCount.incrementAndGet());
View Full Code Here


        lockEntry = offsetLock.getLockEntry(bucketEntry.offset());
        if (bucketEntry.equals(backingMap.get(key))) {
          int len = bucketEntry.getLength();
          ByteBuffer bb = ByteBuffer.allocate(len);
          ioEngine.read(bb, bucketEntry.offset());
          Cacheable cachedBlock = bucketEntry.deserializerReference(
              deserialiserMap).deserialize(bb, true);
          long timeTaken = System.nanoTime() - start;
          cacheStats.hit(caching);
          cacheStats.ioHit(timeTaken);
          bucketEntry.access(accessCount.incrementAndGet());
View Full Code Here

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

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

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

        lockEntry = offsetLock.getLockEntry(bucketEntry.offset());
        if (bucketEntry.equals(backingMap.get(key))) {
          int len = bucketEntry.getLength();
          ByteBuffer bb = ByteBuffer.allocate(len);
          ioEngine.read(bb, bucketEntry.offset());
          Cacheable cachedBlock = bucketEntry.deserializerReference(
              deserialiserMap).deserialize(bb, true);
          long timeTaken = System.nanoTime() - start;
          cacheStats.hit(caching);
          cacheStats.ioHit(timeTaken);
          bucketEntry.access(accessCount.incrementAndGet());
View Full Code Here

        lockEntry = offsetLock.getLockEntry(bucketEntry.offset());
        if (bucketEntry.equals(backingMap.get(key))) {
          int len = bucketEntry.getLength();
          ByteBuffer bb = ByteBuffer.allocate(len);
          ioEngine.read(bb, bucketEntry.offset());
          Cacheable cachedBlock = bucketEntry.deserializerReference(
              deserialiserMap).deserialize(bb, true);
          long timeTaken = System.nanoTime() - start;
          cacheStats.hit(caching);
          cacheStats.ioHit(timeTaken);
          bucketEntry.access(accessCount.incrementAndGet());
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

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

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

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

        lockEntry = offsetLock.getLockEntry(bucketEntry.offset());
        if (bucketEntry.equals(backingMap.get(key))) {
          int len = bucketEntry.getLength();
          ByteBuffer bb = ByteBuffer.allocate(len);
          ioEngine.read(bb, bucketEntry.offset());
          Cacheable cachedBlock = bucketEntry.deserializerReference(
              deserialiserMap).deserialize(bb, true);
          long timeTaken = System.nanoTime() - start;
          cacheStats.hit(caching);
          cacheStats.ioHit(timeTaken);
          bucketEntry.access(accessCount.incrementAndGet());
View Full Code Here

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

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

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

    if (contentBlock != null) {
      if (updateCacheMetrics) stats.hit(caching);
    } else if (!repeat) {
      if (updateCacheMetrics) stats.miss(caching);
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.