deniskuzZ commented on code in PR #6756:
URL: https://github.com/apache/hive/pull/6756#discussion_r3927913757


##########
packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator/dependent/HiveDependentResource.java:
##########
@@ -499,6 +477,24 @@ protected static void applySpreadAffinityIfAbsent(
         .build());
   }
 
+  /**
+   * Sets the user-provided affinity override, if any. Must run before
+   * {@link #applySpreadAffinityIfAbsent}, which only sets its default when
+   * the pod spec has no affinity yet.
+   */
+  protected static void applyAffinityOverride(PodSpec podSpec, Affinity 
affinity) {
+    if (affinity != null) {
+      podSpec.setAffinity(affinity);
+    }
+  }
+
+  /** Sets the given tolerations on the pod spec, if any. */
+  protected static void applyTolerations(PodSpec podSpec, List<Toleration> 
tolerations) {
+    if (tolerations != null && !tolerations.isEmpty()) {
+      podSpec.setTolerations(tolerations);
+    }
+  }

Review Comment:
   fixed



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to