gyfora commented on code in PR #278:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/278#discussion_r908191301
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/config/Mode.java:
##########
@@ -46,6 +49,10 @@ public static Mode getMode(FlinkDeployment flinkApp) {
}
private static Mode getMode(FlinkDeploymentSpec spec) {
- return spec.getJob() != null ? APPLICATION : SESSION;
+ KubernetesDeploymentMode deploymentMode = spec.getMode();
Review Comment:
This could use the `getDeploymentMode` utility to avoid null checks
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/config/Mode.java:
##########
@@ -20,11 +20,14 @@
import org.apache.flink.kubernetes.operator.crd.FlinkDeployment;
import org.apache.flink.kubernetes.operator.crd.spec.FlinkDeploymentSpec;
+import org.apache.flink.kubernetes.operator.crd.spec.KubernetesDeploymentMode;
/** The mode of {@link FlinkDeployment}. */
public enum Mode {
- APPLICATION,
- SESSION;
+ NATIVE_APPLICATION,
+ NATIVE_SESSION,
+ STANDALONE_APPLICATION,
+ STANDALONE_SESSION;
Review Comment:
Adding these new enums feels a bit forced because everwhere you use it you
either check session/application or native/standalone. Maybe we can simply have
2 enums (Mode & KubernetesDeploymentMode)
--
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]