kelemensanyi commented on a change in pull request #44:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/44#discussion_r826468015
##########
File path:
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/FlinkOperator.java
##########
@@ -78,12 +88,27 @@ public static void main(String... args) {
jobReconciler,
sessionReconciler);
- FlinkControllerConfig controllerConfig = new
FlinkControllerConfig(controller);
+ controllerConfig = new FlinkControllerConfig(controller);
controller.setControllerConfig(controllerConfig);
controllerConfig.setConfigurationService(configurationService);
+ }
+ public void run() {
operator.register(controller, controllerConfig);
operator.installShutdownHook();
operator.start();
}
+
+ protected ConfigurationService getConfigurationService() {
+ return new
ConfigurationServiceDecorator(DefaultConfigurationService.instance()) {
+ @Override
+ public ExecutorService getExecutorService() {
+ return Executors.newCachedThreadPool();
Review comment:
The only case I can see when I would set a limit is when I would be
getting out of memory. In such a case by setting a limit we could keep the
operator running.
I've added a new config option for that: `RECONCILIATION_MAX_PARALLELISM`
##########
File path:
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/FlinkOperator.java
##########
@@ -27,33 +27,43 @@
import org.apache.flink.kubernetes.operator.reconciler.SessionReconciler;
import org.apache.flink.kubernetes.operator.service.FlinkService;
import org.apache.flink.kubernetes.operator.utils.FlinkUtils;
+import
org.apache.flink.kubernetes.operator.utils.javaoperatorsdk.ConfigurationServiceDecorator;
import
org.apache.flink.kubernetes.operator.validation.DefaultDeploymentValidator;
import
org.apache.flink.kubernetes.operator.validation.FlinkDeploymentValidator;
import io.fabric8.kubernetes.client.DefaultKubernetesClient;
+import io.fabric8.kubernetes.client.KubernetesClient;
import io.javaoperatorsdk.operator.Operator;
+import io.javaoperatorsdk.operator.api.config.ConfigurationService;
import io.javaoperatorsdk.operator.config.runtime.DefaultConfigurationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
/** Main Class for Flink native k8s operator. */
public class FlinkOperator {
private static final Logger LOG =
LoggerFactory.getLogger(FlinkOperator.class);
- public static void main(String... args) {
+ final Operator operator;
Review comment:
Fixed now.
--
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]