public static String generateClusterName(Configuration conf) { String hosts = HiveConf.getTrimmedVar(conf, ConfVars.LLAP_DAEMON_SERVICE_HOSTS); return hostsRe.matcher(hosts.startsWith("@") ? hosts.substring(1) : hosts).replaceAll("_"); }
@Override public void serviceInit(Configuration conf) { String hosts = HiveConf.getTrimmedVar(conf, ConfVars.LLAP_DAEMON_SERVICE_HOSTS); if (hosts.startsWith("@")) { registry = new LlapZookeeperRegistryImpl(hosts.substring(1), conf); this.isDynamic=true; } else { registry = new LlapFixedRegistryImpl(hosts, conf); this.isDynamic=false; } LOG.info("Using LLAP registry type " + registry); }
public static LlapClusterStateForCompile getClusterInfo(final Configuration conf) { final String nodes = HiveConf.getTrimmedVar(conf, HiveConf.ConfVars.LLAP_DAEMON_SERVICE_HOSTS); final String userName = HiveConf.getVar( conf, ConfVars.LLAP_ZK_REGISTRY_USER, LlapRegistryService.currentUser()); Callable<LlapClusterStateForCompile> generator = new Callable<LlapClusterStateForCompile>() { @Override public LlapClusterStateForCompile call() throws Exception { LOG.info("Creating cluster info for " + userName + ":" + nodes); return new LlapClusterStateForCompile(conf, CLUSTER_UPDATE_INTERVAL_MS); } }; try { return CACHE.get(userName + ":" + nodes, generator); } catch (ExecutionException e) { throw new RuntimeException(e); // Should never happen... ctor is just assignments. } }
@VisibleForTesting protected int getExecutorCount(boolean allowUpdate) { if (allowUpdate && !clusterState.initClusterInfo()) { LOG.warn("Failed to get LLAP cluster information for " + HiveConf.getTrimmedVar(this.conf, ConfVars.LLAP_DAEMON_SERVICE_HOSTS) + "; we may rely on outdated cluster status"); } if (!clusterState.hasClusterInfo()) { LOG.error("No cluster information available to allocate; no guaranteed tasks will be used"); return 0; } int unknownNodes = clusterState.getNodeCountWithUnknownExecutors(); if (unknownNodes > 0) { LOG.error("There are " + unknownNodes + " nodes with unknown executor count; only " + clusterState.getKnownExecutorCount() + " guaranteed tasks will be allocated"); } return clusterState.getKnownExecutorCount(); }
String hosts = HiveConf.getTrimmedVar(conf, HiveConf.ConfVars.LLAP_DAEMON_SERVICE_HOSTS); Preconditions.checkNotNull(hosts, ConfVars.LLAP_DAEMON_SERVICE_HOSTS.toString() + " must be defined"); LlapRegistryService registry;
.build()); String instanceId = HiveConf.getTrimmedVar(conf, ConfVars.LLAP_DAEMON_SERVICE_HOSTS);
|| (outputFormatServicePort > 1024 && outputFormatServicePort < 65536), "OutputFormatService Port must be between 1024 and 65535, or 0 for automatic selection"); String hosts = HiveConf.getTrimmedVar(daemonConf, ConfVars.LLAP_DAEMON_SERVICE_HOSTS); if (hosts.startsWith("@")) { String zkHosts = HiveConf.getTrimmedVar(daemonConf, ConfVars.HIVE_ZOOKEEPER_QUORUM); LOG.info("Zookeeper Quorum: {}", zkHosts); Preconditions.checkArgument(zkHosts != null && !zkHosts.trim().isEmpty(),
@Override public void serviceInit(Configuration conf) { String hosts = HiveConf.getTrimmedVar(conf, ConfVars.LLAP_DAEMON_SERVICE_HOSTS); if (hosts.startsWith("@")) { registry = new LlapZookeeperRegistryImpl(hosts.substring(1), conf); this.isDynamic=true; } else { registry = new LlapFixedRegistryImpl(hosts, conf); this.isDynamic=false; } LOG.info("Using LLAP registry type " + registry); }
String hosts = HiveConf.getTrimmedVar(conf, HiveConf.ConfVars.LLAP_DAEMON_SERVICE_HOSTS); Preconditions.checkNotNull(hosts, ConfVars.LLAP_DAEMON_SERVICE_HOSTS.toString() + " must be defined"); LlapRegistryService registry;
.build()); String instanceId = HiveConf.getTrimmedVar(conf, ConfVars.LLAP_DAEMON_SERVICE_HOSTS);
|| (outputFormatServicePort > 1024 && outputFormatServicePort < 65536), "OutputFormatService Port must be between 1024 and 65535, or 0 for automatic selection"); String hosts = HiveConf.getTrimmedVar(daemonConf, ConfVars.LLAP_DAEMON_SERVICE_HOSTS); if (hosts.startsWith("@")) { String zkHosts = HiveConf.getTrimmedVar(daemonConf, ConfVars.HIVE_ZOOKEEPER_QUORUM); LOG.info("Zookeeper Quorum: {}", zkHosts); Preconditions.checkArgument(zkHosts != null && !zkHosts.trim().isEmpty(),