1996fanrui commented on code in PR #677:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/677#discussion_r1361898608
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/controller/FlinkResourceContext.java:
##########
@@ -47,6 +55,48 @@ public abstract class FlinkResourceContext<CR extends
AbstractFlinkResource<?, ?
private FlinkOperatorConfiguration operatorConfig;
private Configuration observeConfig;
private FlinkService flinkService;
+ private KubernetesJobAutoScalerContext autoScalerContext;
+
+ public KubernetesJobAutoScalerContext getJobAutoScalerContext() {
+ if (autoScalerContext != null) {
+ return autoScalerContext;
+ }
+ return autoScalerContext = createJobAutoScalerContext();
+ }
+
+ private KubernetesJobAutoScalerContext createJobAutoScalerContext() {
+ Configuration conf = new Configuration(getObserveConfig());
+ conf.set(
+ AutoScalerOptions.FLINK_CLIENT_TIMEOUT,
+ getOperatorConfig().getFlinkClientTimeout());
Review Comment:
@mxm also mentioned this, I have answered at this comment[1].
In brief, operator has client timeout config, however:
- `autoscaler` module cannot depend on operator code.
- The client timeout config of operator is used in many places(not only
autoscaler), if we move it into `autoscaler` module, it will be strange when
other places use the autoscaler client timeout.
[1]
https://github.com/apache/flink-kubernetes-operator/pull/677#discussion_r1350028811
--
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]