Skip to content

HIVE-29685: Fix LLAP UI status for non-YARN deployments - #6656

Open
Manya0407 wants to merge 1 commit into
apache:masterfrom
Manya0407:HIVE-29685-llap-ui-registry-status
Open

HIVE-29685: Fix LLAP UI status for non-YARN deployments#6656
Manya0407 wants to merge 1 commit into
apache:masterfrom
Manya0407:HIVE-29685-llap-ui-registry-status

Conversation

@Manya0407

@Manya0407 Manya0407 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

1.This PR fixes the HiveServer2 LLAP status page (/llap.html, backed by GET /llap) on non-YARN deployments such as Kubernetes and Docker. Today LlapServlet delegates to LlapStatusServiceDriver, which only queries YARN for the LLAP application. On K8s/Docker, LLAP daemons register in ZooKeeper instead of YARN, so the driver returns APP_NOT_FOUND and the UI never shows running instances.
2.The main change is config-based routing in LlapStatusServiceDriver: when the deployment is detected as non-YARN (via hive.server2.tez.use.external.sessions=true, tez.am.framework.mode=STANDALONE_ZOOKEEPER, or the override hive.llapcli.status.use-registry), status is populated from the LLAP ZK registry instead of YARN. For those deployments, worker UUIDs are used as container IDs when YARN container IDs are absent. The YARN path is unchanged for classic YARN LLAP.
3.This PR also fixes runningThresholdAchieved not being set for servlet/one-shot callers by calling updateRunningThresholdAchieved() after a successful registry or YARN status lookup. LlapServlet now returns HTTP 500 when status lookup fails. On the UI side, it removes references to missing boolean PNG assets in llap.js, adds a defensive guard in json.human.js so bool icons are only rendered for valid /static/ paths, and adds cache-buster query params in llap.html. Unit tests are added in TestLlapStatus

Why are the changes needed?

On Kubernetes and Docker, LLAP does not run as a YARN application. Daemons register in ZooKeeper, but the status driver only looked up YARN and returned early with APP_NOT_FOUND before consulting the registry. That broke /llap.html for operators running LLAP on K8s/Docker — they could not see cluster state, instance counts, or daemon web URLs from HiveServer2.
The runningThresholdAchieved field was also never set for the servlet path, so the UI always showed false even when all daemons were up. The broken boolean icon beside runningThresholdAchieved is a separate pre-existing UI bug (missing PNG assets since HIVE-13467); this PR fixes that as well so the page renders cleanly.

Does this PR introduce any user-facing change?

Yes. On non-YARN LLAP deployments, /llap.html and GET /llap now report the correct state (RUNNING_ALL / RUNNING_PARTIAL instead of APP_NOT_FOUND), show live instance counts and daemon web URLs from the registry, and set runningThresholdAchieved to true when the running threshold is met. On YARN LLAP deployments, behavior is unchanged. When status lookup fails, the servlet returns HTTP 500 instead of 200 with incomplete JSON. The LLAP UI no longer shows a broken image icon before boolean fields; it displays plain true/false text instead.

Before :
image

After:
image

How was this patch tested?

1.Unit tests were added in TestLlapStatusRegistryFallback.java covering registry instance creation (worker identity vs YARN container ID), state updates from instance counts, config-based detection of registry vs YARN status lookup, and runningThresholdAchieved logic. These were run with mvn test -pl llap-server -Dtest=TestLlapStatusRegistryFallback.
2.End-to-end testing used the Docker LLAP stack in packaging/src/docker/ with ./start-hive.sh --llap and a locally built apache/hive:4.3.0-SNAPSHOT image

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants