hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndimi...@apache.org
Subject git commit: HBASE-11307 Deprecate SlabCache
Date Fri, 13 Jun 2014 16:44:52 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 7ffc454cc -> 62fe88a24


HBASE-11307 Deprecate SlabCache


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/62fe88a2
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/62fe88a2
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/62fe88a2

Branch: refs/heads/0.98
Commit: 62fe88a248bb91ed8b662244e87211cbc6ff60db
Parents: 7ffc454
Author: Nick Dimiduk <ndimiduk@apache.org>
Authored: Fri Jun 13 09:44:30 2014 -0700
Committer: Nick Dimiduk <ndimiduk@apache.org>
Committed: Fri Jun 13 09:44:30 2014 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java     | 1 +
 .../org/apache/hadoop/hbase/io/hfile/DoubleBlockCache.java     | 4 +++-
 .../org/apache/hadoop/hbase/io/hfile/slab/SingleSizeCache.java | 2 ++
 .../main/java/org/apache/hadoop/hbase/io/hfile/slab/Slab.java  | 6 ++++--
 .../java/org/apache/hadoop/hbase/io/hfile/slab/SlabCache.java  | 4 +++-
 .../hadoop/hbase/io/hfile/slab/SlabItemActionWatcher.java      | 5 ++++-
 6 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/62fe88a2/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java
index 85ccd8b..9ba71ed 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java
@@ -455,6 +455,7 @@ public class CacheConfig {
         globalBlockCache = lruCache;
       }
     } else {
+      LOG.warn("SlabCache is deprecated. Consider BucketCache as a replacement.");
       globalBlockCache = new DoubleBlockCache(
           lruCacheSize, offHeapCacheSize, blockSize, blockSize, conf);
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/62fe88a2/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/DoubleBlockCache.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/DoubleBlockCache.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/DoubleBlockCache.java
index ef68dab..4d22003 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/DoubleBlockCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/DoubleBlockCache.java
@@ -36,8 +36,10 @@ import org.apache.hadoop.util.StringUtils;
  * cache before looking for the block in the off heap cache. Metrics are the
  * combined size and hits and misses of both caches.
  *
- **/
+ * @deprecated As of 1.0, replaced by {@link org.apache.hadoop.hbase.io.hfile.bucket.BucketCache}.
+ */
 @InterfaceAudience.Private
+@Deprecated
 public class DoubleBlockCache implements BlockCache, HeapSize {
 
   static final Log LOG = LogFactory.getLog(DoubleBlockCache.class.getName());

http://git-wip-us.apache.org/repos/asf/hbase/blob/62fe88a2/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SingleSizeCache.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SingleSizeCache.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SingleSizeCache.java
index 381c5c9..4d209b3 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SingleSizeCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SingleSizeCache.java
@@ -52,8 +52,10 @@ import com.google.common.cache.RemovalNotification;
  * Eviction and LRUness is taken care of by Guava's MapMaker, which creates a
  * ConcurrentLinkedHashMap.
  *
+ * @deprecated As of 1.0, replaced by {@link org.apache.hadoop.hbase.io.hfile.bucket.BucketCache}.
  **/
 @InterfaceAudience.Private
+@Deprecated
 public class SingleSizeCache implements BlockCache, HeapSize {
   private final Slab backingStore;
   private final ConcurrentMap<BlockCacheKey, CacheablePair> backingMap;

http://git-wip-us.apache.org/repos/asf/hbase/blob/62fe88a2/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/Slab.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/Slab.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/Slab.java
index 77bea49..637890f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/Slab.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/Slab.java
@@ -33,9 +33,11 @@ import com.google.common.base.Preconditions;
  * Slab is a class which is designed to allocate blocks of a certain size.
  * Constructor creates a number of DirectByteBuffers and slices them into the
  * requisite size, then puts them all in a buffer.
- **/
-
+ *
+ * @deprecated As of 1.0, replaced by {@link org.apache.hadoop.hbase.io.hfile.bucket.BucketCache}.
+ */
 @InterfaceAudience.Private
+@Deprecated
 class Slab implements org.apache.hadoop.hbase.io.HeapSize {
   static final Log LOG = LogFactory.getLog(Slab.class);
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/62fe88a2/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SlabCache.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SlabCache.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SlabCache.java
index a8cdd55..b0f9465 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SlabCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SlabCache.java
@@ -51,8 +51,10 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
  * order to determine where a given element fits. Redirects gets and puts to the
  * correct SingleSizeCache.
  *
- **/
+ * @deprecated As of 1.0, replaced by {@link org.apache.hadoop.hbase.io.hfile.bucket.BucketCache}.
+ */
 @InterfaceAudience.Private
+@Deprecated
 public class SlabCache implements SlabItemActionWatcher, BlockCache, HeapSize {
 
   private final ConcurrentHashMap<BlockCacheKey, SingleSizeCache> backingStore;

http://git-wip-us.apache.org/repos/asf/hbase/blob/62fe88a2/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SlabItemActionWatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SlabItemActionWatcher.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SlabItemActionWatcher.java
index fe121de..93b35db 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SlabItemActionWatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/slab/SlabItemActionWatcher.java
@@ -24,8 +24,11 @@ import org.apache.hadoop.hbase.io.hfile.BlockCacheKey;
 
 /**
  * Interface for objects that want to know when actions occur in a SingleSizeCache.
- * */
+ *
+ * @deprecated As of 1.0, replaced by {@link org.apache.hadoop.hbase.io.hfile.bucket.BucketCache}.
+ */
 @InterfaceAudience.Private
+@Deprecated
 interface SlabItemActionWatcher {
 
   /**


Mime
View raw message