Package org.apache.accumulo.core.file.blockfile.cache

Examples of org.apache.accumulo.core.file.blockfile.cache.CacheEntry


    }
   
    out.close();
    final byte[] data = baos.toByteArray();
   
    CacheEntry ce = new MyCacheEntry(data);

    ABlockReader cacheBlock = new CachableBlockFile.CachedBlockRead(ce, data);
    BlockIndex blockIndex = null;
   
    for (int i = 0; i < 129; i++)
View Full Code Here


    }
   
    out.close();
    final byte[] data = baos.toByteArray();
   
    CacheEntry ce = new MyCacheEntry(data);

    ABlockReader cacheBlock = new CachableBlockFile.CachedBlockRead(ce, data);
    BlockIndex blockIndex = null;
   
    for (int i = 0; i < 257; i++)
View Full Code Here

   
    public BlockRead getCachedMetaBlock(String blockName) throws IOException {
      String _lookup = fileName + "M" + blockName;
     
      if (_iCache != null) {
        CacheEntry cacheEntry = _iCache.getBlock(_lookup);
       
        if (cacheEntry != null) {
          return new CachedBlockRead(cacheEntry, cacheEntry.getBuffer());
        }
       
      }
     
      return null;
View Full Code Here

    private BlockRead getBlock(String _lookup, BlockCache cache, BlockLoader loader) throws IOException {
     
      BlockReader _currBlock;
     
      if (cache != null) {
        CacheEntry cb = null;
        cb = cache.getBlock(_lookup);
       
        if (cb != null) {
          return new CachedBlockRead(cb, cb.getBuffer());
        }
       
      }
      /**
       * grab the currBlock at this point the block is still in the data stream
View Full Code Here

          throw e;
        } finally {
          _currBlock.close();
        }
       
        CacheEntry ce = null;
        try {
          ce = cache.cacheBlock(_lookup, b);
        } catch (Exception e) {
          log.warn("Already cached block: " + _lookup, e);
        }
       
        if (ce == null)
          return new BlockRead(new DataInputStream(new ByteArrayInputStream(b)), b.length);
        else
          return new CachedBlockRead(ce, ce.getBuffer());
       
      }
    }
View Full Code Here

    }
   
    out.close();
    final byte[] data = baos.toByteArray();
   
    CacheEntry ce = new MyCacheEntry(data);

    ABlockReader cacheBlock = new CachableBlockFile.CachedBlockRead(ce, data);
    BlockIndex blockIndex = null;
   
    for (int i = 0; i < 129; i++)
View Full Code Here

    }
   
    out.close();
    final byte[] data = baos.toByteArray();
   
    CacheEntry ce = new MyCacheEntry(data);

    ABlockReader cacheBlock = new CachableBlockFile.CachedBlockRead(ce, data);
    BlockIndex blockIndex = null;
   
    for (int i = 0; i < 257; i++)
View Full Code Here

   
    public BlockRead getCachedMetaBlock(String blockName) throws IOException {
      String _lookup = fileName + "M" + blockName;
     
      if (_iCache != null) {
        CacheEntry cacheEntry = _iCache.getBlock(_lookup);
       
        if (cacheEntry != null) {
          return new CachedBlockRead(cacheEntry, cacheEntry.getBuffer());
        }
       
      }
     
      return null;
View Full Code Here

    private BlockRead getBlock(String _lookup, BlockCache cache, BlockLoader loader) throws IOException {
     
      BlockReader _currBlock;
     
      if (cache != null) {
        CacheEntry cb = null;
        cb = cache.getBlock(_lookup);
       
        if (cb != null) {
          return new CachedBlockRead(cb, cb.getBuffer());
        }
       
      }
      /**
       * grab the currBlock at this point the block is still in the data stream
View Full Code Here

          throw e;
        } finally {
          _currBlock.close();
        }
       
        CacheEntry ce = null;
        try {
          ce = cache.cacheBlock(_lookup, b);
        } catch (Exception e) {
          log.warn("Already cached block: " + _lookup, e);
        }
       
        if (ce == null)
          return new BlockRead(new DataInputStream(new ByteArrayInputStream(b)), b.length);
        else
          return new CachedBlockRead(ce, ce.getBuffer());
       
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.file.blockfile.cache.CacheEntry

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.