You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2021/09/22 19:27:27 UTC

[hbase] branch branch-2.3 updated (d6baf8b -> 8c4ae33)

This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a change to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git.


    from d6baf8b  HBASE-26274 Create an option to reintroduce BlockCache to mapreduce job (#3684)
     new e70d766  HBASE-25588 Excessive logging of "hbase.zookeeper.useMulti is deprecated. Default to true always." (#3640)
     new 8c4ae33  Amend HBASE-26274 Create an option to reintroduce BlockCache to mapreduce job

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../hadoop/hbase/io/hfile/CombinedBlockCache.java      |  2 +-
 .../hbase/client/TestClientSideRegionScanner.java      |  4 ++--
 .../java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java | 18 +++++++++++++-----
 3 files changed, 16 insertions(+), 8 deletions(-)

[hbase] 02/02: Amend HBASE-26274 Create an option to reintroduce BlockCache to mapreduce job

Posted by ap...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 8c4ae33faafaaeb0306fcb1e7d7951c363b77a6d
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Wed Sep 22 12:17:36 2021 -0700

    Amend HBASE-26274 Create an option to reintroduce BlockCache to mapreduce job
    
    Compliation fixes for CombinedBlockCache and TestClientSideRegionScanner.
    
    Signed-off-by: Andrew Purtell <ap...@apache.org>
---
 .../java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java     | 2 +-
 .../org/apache/hadoop/hbase/client/TestClientSideRegionScanner.java   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
index 7c9fdb1..c01d8bb 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
@@ -60,7 +60,7 @@ public class CombinedBlockCache implements ResizableBlockCache, HeapSize {
 
   @Override
   public void cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) {
-    boolean metaBlock = buf.getBlockType().getCategory() != BlockCategory.DATA;
+    boolean metaBlock = buf.getBlockType().getCategory() != BlockType.BlockCategory.DATA;
     if (metaBlock) {
       l1Cache.cacheBlock(cacheKey, buf, inMemory);
     } else {
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientSideRegionScanner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientSideRegionScanner.java
index 859e36f..8757e7d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientSideRegionScanner.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientSideRegionScanner.java
@@ -25,7 +25,7 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HBaseClassTestRule;
-import org.apache.hadoop.hbase.HBaseTestingUtil;
+import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.io.hfile.BlockCache;
@@ -45,7 +45,7 @@ public class TestClientSideRegionScanner {
   public static final HBaseClassTestRule CLASS_RULE =
     HBaseClassTestRule.forClass(TestClientSideRegionScanner.class);
 
-  private final static HBaseTestingUtil TEST_UTIL = new HBaseTestingUtil();
+  private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
 
   private Configuration conf;
   private Path rootDir;

[hbase] 01/02: HBASE-25588 Excessive logging of "hbase.zookeeper.useMulti is deprecated. Default to true always." (#3640)

Posted by ap...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit e70d766d397c4970acb96b4e0ca2dde1798d978d
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Tue Aug 31 09:39:21 2021 -0700

    HBASE-25588 Excessive logging of "hbase.zookeeper.useMulti is deprecated. Default to true always." (#3640)
    
    Signed-off-by: Viraj Jasani <vj...@apache.org>
    Reviewed-by: Duo Zhang <zh...@apache.org>
---
 .../java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
index 80d9f41..c82e6cb 100644
--- a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
+++ b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
@@ -1761,6 +1761,12 @@ public final class ZKUtil {
     }
   }
 
+  // Static boolean for warning about useMulti because ideally there will be one warning per
+  // process instance. It is fine if two threads end up racing on this for a bit. We do not
+  // need to use an atomic type for this, that is overkill. The goal of reducing the number of
+  // warnings from many to one or a few at startup is still achieved.
+  private static boolean useMultiWarn = true;
+
   /**
    * Use ZooKeeper's multi-update functionality.
    *
@@ -1781,14 +1787,16 @@ public final class ZKUtil {
    * @throws KeeperException if a ZooKeeper operation fails
    */
   public static void multiOrSequential(ZKWatcher zkw, List<ZKUtilOp> ops,
-                                       boolean runSequentialOnMultiFailure) throws KeeperException {
-    if (zkw.getConfiguration().get("hbase.zookeeper.useMulti") != null) {
-      LOG.warn("hbase.zookeeper.useMulti is deprecated. Default to true always.");
-    }
+      boolean runSequentialOnMultiFailure) throws KeeperException {
     if (ops == null) {
       return;
     }
-
+    if (useMultiWarn) { // Only check and warn at first use
+      if (zkw.getConfiguration().get("hbase.zookeeper.useMulti") != null) {
+        LOG.warn("hbase.zookeeper.useMulti is deprecated. Default to true always.");
+      }
+      useMultiWarn = false;
+    }
     List<Op> zkOps = new LinkedList<>();
     for (ZKUtilOp op : ops) {
       zkOps.add(toZooKeeperOp(zkw, op));