You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2017/02/24 01:09:05 UTC
[33/50] [abbrv] hive git commit: HIVE-15570. Improved messaging when
llap is down, ignore consistent splits config in non llap mode. (Zhiyuan Yang,
reviewed by Sergey Shelukhin, Siddharth Seth)
HIVE-15570. Improved messaging when llap is down, ignore consistent splits config in non llap mode. (Zhiyuan Yang, reviewed by Sergey Shelukhin, Siddharth Seth)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/dc0938c4
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/dc0938c4
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/dc0938c4
Branch: refs/heads/hive-14535
Commit: dc0938c42f6c9a42adb3fcbb391fb759a3bb0072
Parents: 78e4bb7
Author: Siddharth Seth <ss...@apache.org>
Authored: Tue Feb 21 22:52:54 2017 -0800
Committer: Siddharth Seth <ss...@apache.org>
Committed: Tue Feb 21 22:52:54 2017 -0800
----------------------------------------------------------------------
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java | 9 +++++----
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/Utils.java | 6 +++++-
2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/dc0938c4/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
----------------------------------------------------------------------
diff --git a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
index 4faaa8b..7c88f4f 100644
--- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -3162,10 +3162,11 @@ public class HiveConf extends Configuration {
"llap.daemon.service.port"),
LLAP_DAEMON_WEB_SSL("hive.llap.daemon.web.ssl", false,
"Whether LLAP daemon web UI should use SSL.", "llap.daemon.service.ssl"),
- LLAP_CLIENT_CONSISTENT_SPLITS("hive.llap.client.consistent.splits",
- false,
- "Whether to setup split locations to match nodes on which llap daemons are running," +
- " instead of using the locations provided by the split itself"),
+ LLAP_CLIENT_CONSISTENT_SPLITS("hive.llap.client.consistent.splits", false,
+ "Whether to setup split locations to match nodes on which llap daemons are running, " +
+ "instead of using the locations provided by the split itself. If there is no llap daemon " +
+ "running, fall back to locations provided by the split. This is effective only if " +
+ "hive.execution.mode is llap"),
LLAP_VALIDATE_ACLS("hive.llap.validate.acls", true,
"Whether LLAP should reject permissive ACLs in some cases (e.g. its own management\n" +
"protocol or ZK paths), similar to how ssh refuses a key with bad access permissions."),
http://git-wip-us.apache.org/repos/asf/hive/blob/dc0938c4/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/Utils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/Utils.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/Utils.java
index d691e18..2b57d90 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/Utils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/Utils.java
@@ -21,6 +21,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
+import com.google.common.base.Preconditions;
import org.apache.commons.lang.ArrayUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hive.conf.HiveConf;
@@ -34,7 +35,8 @@ public class Utils {
public static SplitLocationProvider getSplitLocationProvider(Configuration conf, Logger LOG) throws
IOException {
boolean useCustomLocations =
- HiveConf.getBoolVar(conf, HiveConf.ConfVars.LLAP_CLIENT_CONSISTENT_SPLITS);
+ HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_EXECUTION_MODE).equals("llap")
+ && HiveConf.getBoolVar(conf, HiveConf.ConfVars.LLAP_CLIENT_CONSISTENT_SPLITS);
SplitLocationProvider splitLocationProvider;
LOG.info("SplitGenerator using llap affinitized locations: " + useCustomLocations);
if (useCustomLocations) {
@@ -43,6 +45,8 @@ public class Utils {
Collection<ServiceInstance> serviceInstances =
serviceRegistry.getInstances().getAllInstancesOrdered(true);
+ Preconditions.checkArgument(!serviceInstances.isEmpty(),
+ "No running LLAP daemons! Please check LLAP service status and zookeeper configuration");
ArrayList<String> locations = new ArrayList<>(serviceInstances.size());
for (ServiceInstance serviceInstance : serviceInstances) {
if (LOG.isDebugEnabled()) {