You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2014/05/22 00:39:39 UTC

[jira] [Updated] (HBASE-10291) Schema aware L2 BucketCache metrics

     [ https://issues.apache.org/jira/browse/HBASE-10291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-10291:
--------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

This was committed to 0.89-fb a while back.  Not pertinent to trunk. Resolving.

------------------------------------------------------------------------
r1556609 | liyin | 2014-01-08 11:18:24 -0800 (Wed, 08 Jan 2014) | 24 lines

[0.89-fb] [HBASE-10291] Per-column family L2 cache metrics

Author: arjen

Summary:
This diff adds per-column family L2 cache metrics. In order to make this happen the following needed to change:

The L2 cache deals with raw block data. However, in order to keep the size metrics for different CF's and block types valid the cache needs to know about the block type. In the BlockCache this is achieved by making the HFileBlock implement SchemaAware and augment the HFileBlock with the appropriate data before adding it to the cache. In order to do the same with the L2 cache RawHFileBlocks were added, and the BucketEntry was made to implement SchemaAware.

This led to an interesting problem, as the L2 cache is possibly used by readers and writers who do not have the SchemaAware data. In order to work around this a lightweight facade wrapping CacheConfig and the L2 cache can be instantiated and passed down instead of the actual L2 cahce. This L2CacheAgent is SchemaAware and can add the schema data to the RawHFileBlock's before handing them over to the cache. I feel the L2CacheAgent is still a work in progress as it could potentially centralize the cache policy and allow all cache decisions to be removed from HFile- and block readers and writers.

Depends on D1112436

Test Plan: Added and ran the unit tests, deployed a jar to one of the shadow clusters and observed the stats for a while.

Reviewers: liyintang, aaiyer, manukranthk

Reviewed By: liyintang

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D1112816

> Schema aware L2 BucketCache metrics
> -----------------------------------
>
>                 Key: HBASE-10291
>                 URL: https://issues.apache.org/jira/browse/HBASE-10291
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver
>    Affects Versions: 0.89-fb
>            Reporter: Arjen Roodselaar
>            Assignee: Arjen Roodselaar
>            Priority: Minor
>             Fix For: 0.89-fb
>
>         Attachments: per-cf-L2-stats.patch
>
>
> This patch adds per-column family L2 cache metrics. In order to make this happen the following needed to change:
> The L2 cache deals with raw block data. However, in order to keep the size metrics for different CF's and block types valid the cache needs to know about the block type. In the BlockCache this is achieved by making the HFileBlock implement SchemaAware and augment the HFileBlock with the appropriate data before adding it to the cache. In order to do the same for the L2 cache RawHFileBlock were added, and the BucketEntry was made to implement SchemaAware.
> This led to an interesting problem, as the L2 cache is possibly used by readers and writers who do not have the SchemaAware data. In order to work around this a lightweight facade wrapping CacheConfig and the L2 cache can be instantiated and passed down instead of the actual L2 cache object. This L2CacheAgent is SchemaAware and can add the schema data to the RawHFileBlock's before handing them over to the cache. I feel the L2CacheAgent is still a work in progress as it could potentially centralize the cache policy and allow all cache decisions to be removed from HFile- and block readers and writers.



--
This message was sent by Atlassian JIRA
(v6.2#6252)