This is an automated email from the ASF dual-hosted git repository.
abstractdog 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 5da5b8f9676 HIVE-30045: K8s operator: missing LLAP scheduler config
breaks task affinity and caps cache hits (#6779)
5da5b8f9676 is described below
commit 5da5b8f967659232ceeaca172c7bc93a1bca951a
Author: Denys Kuzmenko <[email protected]>
AuthorDate: Wed Sep 16 10:43:39 2026 +0200
HIVE-30045: K8s operator: missing LLAP scheduler config breaks task
affinity and caps cache hits (#6779)
---
.../hive/kubernetes/operator/util/ConfigUtils.java | 12 +++++++++---
.../kubernetes/operator/util/HiveConfigBuilder.java | 18 +++++++++++++-----
2 files changed, 22 insertions(+), 8 deletions(-)
diff --git
a/packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/util/ConfigUtils.java
b/packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/util/ConfigUtils.java
index 640b7d3abf7..5aebfadc979 100644
---
a/packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/util/ConfigUtils.java
+++
b/packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/util/ConfigUtils.java
@@ -19,6 +19,7 @@
package org.apache.hive.kubernetes.operator.util;
+import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -143,11 +144,16 @@ public static String tezAmComponentKey(String llapName) {
public static final String HIVE_LLAP_DAEMON_OUTPUT_SERVICE_PORT_KEY =
"hive.llap.daemon.output.service.port";
public static final int HIVE_LLAP_DAEMON_OUTPUT_SERVICE_PORT_DEFAULT = 15003;
- public static final String HIVE_LLAP_DAEMON_UMBILICAL_PORT_KEY =
"hive.llap.daemon.umbilical.port";
- public static final String HIVE_LLAP_DAEMON_UMBILICAL_PORT_DEFAULT = "0";
-
public static final String HIVE_LLAP_TASK_SCHEDULER_LOCALITY_DELAY_KEY =
"hive.llap.task.scheduler.locality.delay";
+ /** Prefixes of the HiveServer2 hive.llap settings carried over to a
standalone Tez AM. */
+ private static final List<String> TEZ_AM_LLAP_KEY_PREFIXES =
+ List.of("hive.llap.task.", "hive.llap.client.", "hive.llap.daemon.");
+
+ public static boolean isTezAmLlapKey(String key) {
+ return TEZ_AM_LLAP_KEY_PREFIXES.stream().anyMatch(key::startsWith);
+ }
+
public static final String METASTORE_SERVER_TRANSPORT_MODE_KEY =
"metastore.server.thrift.transport.mode";
public static final String METASTORE_SERVER_TRANSPORT_MODE_DEFAULT = "http";
diff --git
a/packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/util/HiveConfigBuilder.java
b/packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/util/HiveConfigBuilder.java
index b4957a24d86..bc7232ae477 100644
---
a/packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/util/HiveConfigBuilder.java
+++
b/packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/util/HiveConfigBuilder.java
@@ -195,18 +195,26 @@ public static Map<String, String>
getTezSite(HiveClusterSpec spec, LlapSpec llap
if (llap != null) {
tezProps.put(ConfigUtils.HIVE_LLAP_DAEMON_SERVICE_HOSTS_KEY,
llap.serviceHosts());
- }
- // Required by LlapTaskCommunicator — Tez's Configuration doesn't get
HiveConf defaults
- tezProps.put(ConfigUtils.HIVE_LLAP_DAEMON_UMBILICAL_PORT_KEY,
- ConfigUtils.HIVE_LLAP_DAEMON_UMBILICAL_PORT_DEFAULT);
+ // A standalone Tez AM loads tez-site.xml, never hive-site.xml, so LLAP
settings from
+ // the HiveServer2 overrides reach it only by being copied here, after
the derived
+ // keys above so an explicit user setting wins.
+ Map<String, String> hs2Overrides = spec.hiveServer2().configOverrides();
+ if (hs2Overrides != null) {
+ hs2Overrides.forEach((key, value) -> {
+ if (ConfigUtils.isTezAmLlapKey(key)) {
+ tezProps.put(key, value);
+ }
+ });
+ }
+ }
if (spec.tezAm().configOverrides() != null) {
tezProps.putAll(spec.tezAm().configOverrides());
}
// Disable Infinite locality Delay when LLAP Auto-scaling is enabled, as
they are mutually exclusive.
- if (llap != null && llap.isEnabled() && llap.autoscaling().isEnabled() &&
+ if (llap != null && llap.autoscaling().isEnabled() &&
ConfigUtils.getTimeMs(tezProps,
ConfigUtils.HIVE_LLAP_TASK_SCHEDULER_LOCALITY_DELAY_KEY, 0) == -1) {
tezProps.put(ConfigUtils.HIVE_LLAP_TASK_SCHEDULER_LOCALITY_DELAY_KEY,
"0ms");
}