hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: LruBlockCache synchronization in HBase
Date Wed, 27 Feb 2013 19:02:27 GMT
>From the javadoc:

   * Cache the block with the specified name and buffer.

   * <p>

   * It is assumed this will NEVER be called on an already cached block.  If

   * that is done, an exception will be thrown.
The underlying map is a ConcurrentHashMap, providing concurrency support.

Cheers

On Wed, Feb 27, 2013 at 10:57 AM, Bharath Ravi <bharathravi1@gmail.com>wrote:

> Hi all,
>
> I'm working on a research project in improving caching in HBase and similar
> stores.
>
> Going over the HFileReader and LruBlockCache code, I couldn't figure out if
> updates to the Block cache are synchronized.
>
> If I gather correctly, there is no locking at work, and concurrent
> "cacheBlock" calls simply throw an "already cached" exception which (I
> assume) is safely ignored.
>
> Is my understanding correct?
>
> Thanks for the help!
> --
> Bharath Ravi
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message