You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2021/11/25 08:28:19 UTC

[hbase] branch branch-2 updated (ccf1504 -> 6aa2daa)

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

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


    from ccf1504  Backport HBASE-26477 Fix MiniMapReduceCluster failure under Java17 to branch-2 (#3878)
     new fa34cfc  Revert "Backport HBASE-26477 Fix MiniMapReduceCluster failure under Java17 to branch-2 (#3878)"
     new 6aa2daa  HBASE-26477 Fix MiniMapReduceCluster failure under Java17 (#3878)

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:

[hbase] 02/02: HBASE-26477 Fix MiniMapReduceCluster failure under Java17 (#3878)

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

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

commit 6aa2daa2c220869a89298a10a171d0f83360d820
Author: Yutong Xiao <yu...@gmail.com>
AuthorDate: Thu Nov 25 16:25:44 2021 +0800

    HBASE-26477 Fix MiniMapReduceCluster failure under Java17 (#3878)
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
---
 .../test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java   | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index 353a48d..72e1204 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -123,6 +123,7 @@ import org.apache.hadoop.hbase.util.CommonFSUtils;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.hbase.util.FSTableDescriptors;
 import org.apache.hadoop.hbase.util.FSUtils;
+import org.apache.hadoop.hbase.util.JVM;
 import org.apache.hadoop.hbase.util.JVMClusterUtil;
 import org.apache.hadoop.hbase.util.JVMClusterUtil.MasterThread;
 import org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread;
@@ -2908,6 +2909,14 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
     conf.setBoolean("mapreduce.reduce.speculative", false);
     ////
 
+    // Yarn container runs in independent JVM. We need to pass the argument manually here if the
+    // JDK version >= 17. Otherwise, the MiniMRCluster will fail.
+    if (JVM.getJVMSpecVersion() >= 17) {
+      String jvmOpts = conf.get("yarn.app.mapreduce.am.command-opts", "");
+      conf.set("yarn.app.mapreduce.am.command-opts",
+        jvmOpts + " --add-opens java.base/java.lang=ALL-UNNAMED");
+    }
+
     // Allow the user to override FS URI for this map-reduce cluster to use.
     mrCluster = new MiniMRCluster(servers,
       FS_URI != null ? FS_URI : FileSystem.get(conf).getUri().toString(), 1,

[hbase] 01/02: Revert "Backport HBASE-26477 Fix MiniMapReduceCluster failure under Java17 to branch-2 (#3878)"

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

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

commit fa34cfc7d13526904a0d9e69faaf9659100b6e46
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Thu Nov 25 16:27:11 2021 +0800

    Revert "Backport HBASE-26477 Fix MiniMapReduceCluster failure under Java17 to branch-2 (#3878)"
    
    This reverts commit ccf150434d90673a56f90142a4ba127194d3bf9a.
---
 .../test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java   | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index 72e1204..353a48d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -123,7 +123,6 @@ import org.apache.hadoop.hbase.util.CommonFSUtils;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.hbase.util.FSTableDescriptors;
 import org.apache.hadoop.hbase.util.FSUtils;
-import org.apache.hadoop.hbase.util.JVM;
 import org.apache.hadoop.hbase.util.JVMClusterUtil;
 import org.apache.hadoop.hbase.util.JVMClusterUtil.MasterThread;
 import org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread;
@@ -2909,14 +2908,6 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
     conf.setBoolean("mapreduce.reduce.speculative", false);
     ////
 
-    // Yarn container runs in independent JVM. We need to pass the argument manually here if the
-    // JDK version >= 17. Otherwise, the MiniMRCluster will fail.
-    if (JVM.getJVMSpecVersion() >= 17) {
-      String jvmOpts = conf.get("yarn.app.mapreduce.am.command-opts", "");
-      conf.set("yarn.app.mapreduce.am.command-opts",
-        jvmOpts + " --add-opens java.base/java.lang=ALL-UNNAMED");
-    }
-
     // Allow the user to override FS URI for this map-reduce cluster to use.
     mrCluster = new MiniMRCluster(servers,
       FS_URI != null ? FS_URI : FileSystem.get(conf).getUri().toString(), 1,