You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You hit the nail on the head regarding the shift from "YARN-thinking" to "Kubernetes-native thinking."
Physical vs. Logical Isolation
You are completely right about Workload Management (WLM). Trying to carve up a single JVM's heap and CPU cycles among competing tenants is incredibly complex and never gives you 100% true isolation. By shifting to Kubernetes, we get true physical isolation via namespaces, cgroups, and dedicated pod resources.
How this could work technically
What you are describing is entirely feasible. The LLAP instances register themselves in ZooKeeper under a specific app name (defaulting to @llap0). If we update the Operator to support an array of LLAP profiles (e.g., llap-cluster1, llap-cluster2), the Operator would spin up multiple independent StatefulSets, each registering to a different ZK path.
Then, exactly as you said, a user simply sets hive.llap.daemon.service.hosts=@llap-cluster1 in their JDBC string or session. TezAM would look up that specific ZK path, find those specific pods, and route the fragments exclusively to that tenant's dedicated executors.
The Autoscaling Synergy
The best part is how it ties into the autoscaling logic in this PR! Because each tenant's LLAP cluster would be its own independent K8s StatefulSet, the autoscaler would scale llap-cluster1 and llap-cluster2 completely independently. If user1 isn't running queries, their dedicated LLAP cluster scales to zero, costing nothing, while user2 can comfortably stay scaled up to 100 pods.
This is a fantastic concept for multi-tenancy. Since the core autoscaling loop and K8s operator primitives are established in this PR, building out "Multi-Tenant LLAP Compute Groups" on top of it feels like a perfect follow-up Jira ticket. I think it is definitely worth exploring! I will definitely give it a shot :-)
Your thoughts align completely with mine—this idea is both feasible and highly valuable. The reason I came up with this idea is that other MPP-architecture OLAP analytical engines, such as StarRocks and Doris, already have similar compute-group functionality that effectively isolates multi-tenant workloads. So the solution we've conceived is absolutely feasible and has practical value. Therefore, it is well worth our effort to explore this capability in depth. Thanks @ayushtkn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Add auto scaling to Hive Operator
Why are the changes needed?
Better usage & cloud saving.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Manually
Installed Dependencies (ZK, Postgres & Ozone)
Started Hive Operator With AutoScaling Enabled (Very Low Thresholds for Testing)
Launched Beeline
OUTPUTS:
Initial Start -> Only 1 HMS, 1 HS2 (1 == Min Configured)
Hits First Beeline Session -> Tez AM, LLAP Daemons starts (Min 1 configured)
AutoScaling HS2 to 2 & Tez AM(Reduced max threshold)
Tez AM

HS2

Auto Scaling HMS & LLAP to 2
HMS

LLAP (Load reduced by the time, query finished :-( )

Scale Downs (After Cooling Periods)
Scheduled

Done (After waiting for cool down period for specific service)

CPU tracking
HS2
HMS