You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "tanishq-chugh (via GitHub)" <gi...@apache.org> on 2026/09/24 23:49:39 UTC
[PR] [WIP] HIVE-30092: K8s operator sequential LLAP scale-down and per-component updateStrategy [hive]
tanishq-chugh opened a new pull request, #6820:
URL: https://github.com/apache/hive/pull/6820
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
3. Ensure you have added or run the appropriate tests for your PR:
4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX: Your PR title ...'.
5. Be sure to keep the PR description updated to reflect all changes.
6. Please write your PR title to summarize what this PR proposes.
7. If possible, provide a concise example to reproduce the issue for a faster review.
-->
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description, screenshot and/or a reproducible example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Hive versions or within the unreleased branches such as master.
If no, write 'No'.
-->
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] [WIP] HIVE-30092: K8s operator sequential LLAP scale-down and per-component updateStrategy [hive]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6820:
URL: https://github.com/apache/hive/pull/6820#discussion_r4099685449
##########
packaging/src/kubernetes/config/rbac/cluster-role.yaml:
##########
@@ -41,7 +41,7 @@ rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "patch"]
- # Pods: read-only for readiness checking
+ # Pods: read for readiness checking + delete for bulk update rollout
- apiGroups: [""]
resources: ["pods"]
- verbs: ["get", "list", "watch"]
+ verbs: ["get", "list", "watch", "delete"]
Review Comment:
The raw-manifest role still omits `patch`, unlike the Helm role. `HiveClusterAutoscaler.updateDeploymentPodDeletionCost` calls `pods(...).edit(...)` during autoscaling, so raw-manifest installations will receive Forbidden errors and lose deletion-cost-based scale-down behavior; include `patch` here as well.
##########
packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/model/spec/LlapSpec.java:
##########
@@ -129,7 +137,8 @@ public record LlapTezAmSpec(
envVars = envVars != null ? envVars : List.of();
autoscaling = autoscaling != null ? autoscaling : new AutoscalingSpec(
false, 0, 1, 20, 60, 900, 600, 10, 0, 0, null);
- tezAm = tezAm != null ? tezAm : new LlapTezAmSpec(null, null, null, null);
+ tezAm = tezAm != null ? tezAm : new LlapTezAmSpec(null, null, null, null, null);
+ updateStrategy = updateStrategy != null ? updateStrategy : "RollingUpdate";
Review Comment:
`LlapSpec` creates a non-null `LlapTezAmSpec` here, and that nested constructor defaults its `updateStrategy` to `RollingUpdate`. Therefore the fallback in `HiveDependentResource.tezAmUpdateStrategy()` is never reached when the per-LLAP override is omitted, so a top-level `spec.tezAm.updateStrategy: Recreate` is silently ignored for every per-LLAP TezAM Deployment. Preserve the distinction between an omitted nested override and an explicit value when resolving this precedence.
##########
packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/dependent/HiveDependentResource.java:
##########
@@ -976,4 +978,27 @@ private static String buildJmxExporterConfig(String component) {
return sb.toString();
}
+ protected static DeploymentStrategy buildDeploymentUpdateStrategy(String updateStrategy) {
+ String strategy = updateStrategy != null ? updateStrategy : "RollingUpdate";
+ if ("Recreate".equalsIgnoreCase(strategy)) {
+ return new DeploymentStrategyBuilder().withType("Recreate").build();
+ }
+ return new DeploymentStrategyBuilder()
+ .withType("RollingUpdate")
Review Comment:
Every value other than `Recreate` is silently converted to `RollingUpdate`, even though the new API documents only those two values. A typo or unsupported strategy therefore changes rollout semantics without an error. Validate the value (preferably with an enum in the CRD and model validation) and reject unknown values consistently for Deployments and StatefulSets.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] [WIP] HIVE-30092: K8s operator sequential LLAP scale-down and per-component updateStrategy [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6820:
URL: https://github.com/apache/hive/pull/6820#issuecomment-5863814027
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6820) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6820&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6820&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6820&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6820&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6820&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6820)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] [WIP] HIVE-30092: K8s operator sequential LLAP scale-down and per-component updateStrategy [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6820:
URL: https://github.com/apache/hive/pull/6820#issuecomment-5851537729
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6820) **Quality Gate passed**
Issues
 [4 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6820&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6820&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6820&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6820&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6820&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6820)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] [WIP] HIVE-30092: K8s operator sequential LLAP scale-down and per-component updateStrategy [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6820:
URL: https://github.com/apache/hive/pull/6820#issuecomment-5856461159
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6820) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6820&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6820&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6820&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6820&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6820&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6820)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] [WIP] HIVE-30092: K8s operator sequential LLAP scale-down and per-component updateStrategy [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6820:
URL: https://github.com/apache/hive/pull/6820#issuecomment-5825054262
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6820) **Quality Gate passed**
Issues
 [4 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6820&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6820&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6820&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6820&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6820&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6820)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] [WIP] HIVE-30092: K8s operator sequential LLAP scale-down and per-component updateStrategy [hive]
Posted by "tanishq-chugh (via GitHub)" <gi...@apache.org>.
tanishq-chugh commented on code in PR #6820:
URL: https://github.com/apache/hive/pull/6820#discussion_r4113478525
##########
packaging/src/kubernetes/config/rbac/cluster-role.yaml:
##########
@@ -41,7 +41,7 @@ rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "patch"]
- # Pods: read-only for readiness checking
+ # Pods: read for readiness checking + delete for bulk update rollout
- apiGroups: [""]
resources: ["pods"]
- verbs: ["get", "list", "watch"]
+ verbs: ["get", "list", "watch", "delete"]
Review Comment:
Addressed in commit - [ec939f6](https://github.com/apache/hive/pull/6820/commits/ec939f648f7e80a485fb48f5867e785abfac2078)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] [WIP] HIVE-30092: K8s operator sequential LLAP scale-down and per-component updateStrategy [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on PR #6820:
URL: https://github.com/apache/hive/pull/6820#issuecomment-5830621511
> sequential LLAP scale-down
what about scale-up, update?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] [WIP] HIVE-30092: K8s operator sequential LLAP scale-down and per-component updateStrategy [hive]
Posted by "tanishq-chugh (via GitHub)" <gi...@apache.org>.
tanishq-chugh commented on code in PR #6820:
URL: https://github.com/apache/hive/pull/6820#discussion_r4113479223
##########
packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/dependent/HiveDependentResource.java:
##########
@@ -976,4 +978,27 @@ private static String buildJmxExporterConfig(String component) {
return sb.toString();
}
+ protected static DeploymentStrategy buildDeploymentUpdateStrategy(String updateStrategy) {
+ String strategy = updateStrategy != null ? updateStrategy : "RollingUpdate";
+ if ("Recreate".equalsIgnoreCase(strategy)) {
+ return new DeploymentStrategyBuilder().withType("Recreate").build();
+ }
+ return new DeploymentStrategyBuilder()
+ .withType("RollingUpdate")
Review Comment:
Addressed in commit - [c60dcd0](https://github.com/apache/hive/pull/6820/commits/c60dcd0646e315f2df887982b3b3874398f756d7)
##########
packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/model/spec/LlapSpec.java:
##########
@@ -129,7 +137,8 @@ public record LlapTezAmSpec(
envVars = envVars != null ? envVars : List.of();
autoscaling = autoscaling != null ? autoscaling : new AutoscalingSpec(
false, 0, 1, 20, 60, 900, 600, 10, 0, 0, null);
- tezAm = tezAm != null ? tezAm : new LlapTezAmSpec(null, null, null, null);
+ tezAm = tezAm != null ? tezAm : new LlapTezAmSpec(null, null, null, null, null);
+ updateStrategy = updateStrategy != null ? updateStrategy : "RollingUpdate";
Review Comment:
Addressed in commit - [cf222b6](https://github.com/apache/hive/pull/6820/commits/cf222b6e14a54459b5bcf56c075a404bf270655a)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] [WIP] HIVE-30092: K8s operator sequential LLAP scale-down and per-component updateStrategy [hive]
Posted by "tanishq-chugh (via GitHub)" <gi...@apache.org>.
tanishq-chugh commented on PR #6820:
URL: https://github.com/apache/hive/pull/6820#issuecomment-5851134290
>what about scale-up, update?
@deniskuzZ LLAP scale-up remains parallel as is and update will be configurable with two options - Recreate (all at once / parallel), RollingUpdate(one by one / serial - Default).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] [WIP] HIVE-30092: K8s operator sequential LLAP scale-down and per-component updateStrategy [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6820:
URL: https://github.com/apache/hive/pull/6820#issuecomment-5865114803
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6820) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6820&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6820&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6820&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6820&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6820&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6820)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] [WIP] HIVE-30092: K8s operator sequential LLAP scale-down and per-component updateStrategy [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on PR #6820:
URL: https://github.com/apache/hive/pull/6820#issuecomment-5872007604
> > what about scale-up, update?
>
> @deniskuzZ LLAP scale-up remains parallel as is and update will be configurable with two options - Recreate (all at once / parallel), RollingUpdate(one by one / serial - Default).
basically same as was in https://github.com/apache/hive/pull/6809/changes#diff-c64a0ae2919ee6dcff85476159f0d4e19bfd0cf3afa1f5796673ec6f1ca2c11aR25 ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org