You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ng...@apache.org on 2020/08/05 20:03:35 UTC

[hive] branch master updated: HIVE-23989: Read isMetastoreRemote flag from system var in StartMiniHS2Cluster (Sumeet Gajjar, Naveen Gangam)"

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

ngangam pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 544e827  HIVE-23989: Read isMetastoreRemote flag from system var in StartMiniHS2Cluster (Sumeet Gajjar, Naveen Gangam)"
544e827 is described below

commit 544e827387283de20171d66a50bf9e409462e386
Author: Sumeet Gajjar <su...@cloudera.com>
AuthorDate: Tue Aug 4 15:28:49 2020 -0400

    HIVE-23989: Read isMetastoreRemote flag from system var in StartMiniHS2Cluster (Sumeet Gajjar, Naveen Gangam)"
---
 .../test/java/org/apache/hive/jdbc/miniHS2/StartMiniHS2Cluster.java | 3 ++-
 itests/util/src/main/java/org/apache/hive/jdbc/miniHS2/MiniHS2.java | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/miniHS2/StartMiniHS2Cluster.java b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/miniHS2/StartMiniHS2Cluster.java
index f304225..675cc2a 100644
--- a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/miniHS2/StartMiniHS2Cluster.java
+++ b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/miniHS2/StartMiniHS2Cluster.java
@@ -48,6 +48,7 @@ public class StartMiniHS2Cluster {
     MiniClusterType clusterType = MiniClusterType.valueOf(System.getProperty("miniHS2.clusterType", "MR").toUpperCase());
     String confFilesProperty = System.getProperty("miniHS2.conf", "../../data/conf/hive-site.xml");
     boolean usePortsFromConf = Boolean.parseBoolean(System.getProperty("miniHS2.usePortsFromConf", "false"));
+    boolean isMetastoreRemote = Boolean.getBoolean("miniHS2.isMetastoreRemote");
 
     // Load conf files
     String[] confFiles = confFilesProperty.split(",");
@@ -72,7 +73,7 @@ public class StartMiniHS2Cluster {
       conf.addResource(new URL("file://" + new File(confFile).toURI().getPath()));
     }
 
-    miniHS2 = new MiniHS2(conf, clusterType, usePortsFromConf);
+    miniHS2 = new MiniHS2(conf, clusterType, usePortsFromConf, isMetastoreRemote);
     Map<String, String> confOverlay = new HashMap<String, String>();
     miniHS2.start(confOverlay);
     miniHS2.getDFS().getFileSystem().mkdirs(new Path("/apps_staging_dir/anonymous"));
diff --git a/itests/util/src/main/java/org/apache/hive/jdbc/miniHS2/MiniHS2.java b/itests/util/src/main/java/org/apache/hive/jdbc/miniHS2/MiniHS2.java
index d37afed..7a40b3b 100644
--- a/itests/util/src/main/java/org/apache/hive/jdbc/miniHS2/MiniHS2.java
+++ b/itests/util/src/main/java/org/apache/hive/jdbc/miniHS2/MiniHS2.java
@@ -358,13 +358,13 @@ public class MiniHS2 extends AbstractHiveService {
   }
 
   public MiniHS2(HiveConf hiveConf, MiniClusterType clusterType) throws Exception {
-    this(hiveConf, clusterType, false);
+    this(hiveConf, clusterType, false, false);
   }
 
-  public MiniHS2(HiveConf hiveConf, MiniClusterType clusterType, boolean usePortsFromConf)
+  public MiniHS2(HiveConf hiveConf, MiniClusterType clusterType, boolean usePortsFromConf, boolean isMetastoreRemote)
       throws Exception {
     this(hiveConf, clusterType, false, null, null,
-        false, true, usePortsFromConf, "KERBEROS", false, true,
+        isMetastoreRemote, true, usePortsFromConf, "KERBEROS", false, true,
         false, null, null, DEFAULT_DATANODE_COUNT);
   }