Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -123,6 +123,7 @@
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;
Expand DownExpand Up@@ -2908,6 +2909,14 @@ private void startMiniMapReduceCluster(final int servers) throws IOException {
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,
Expand Down