wangyang0918 commented on a change in pull request #85:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/85#discussion_r830771983



##########
File path: 
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/JobReconciler.java
##########
@@ -114,6 +119,14 @@ public void reconcile(FlinkDeployment flinkApp, Context 
context, Configuration e
         }
     }
 
+    private void restart(FlinkDeployment flinkApp, Configuration 
effectiveConfig) throws Exception {
+        LOG.info("Restart application cluster now.");
+        String jobIdString = flinkApp.getStatus().getJobStatus().getJobId();
+        JobID jobID = jobIdString != null ? JobID.fromHexString(jobIdString) : 
null;

Review comment:
       Since we always `cancelJob` with `LAST_STATE`, do we really need to get 
the `jobID` here?

##########
File path: 
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/ReconciliationUtils.java
##########
@@ -65,6 +65,22 @@ public static void 
updateForReconciliationError(FlinkDeployment flinkApp, String
         reconciliationStatus.setError(err);
     }
 
+    public static boolean triggerRestart(FlinkDeployment flinkApp) {
+        Long restartNonce = flinkApp.getSpec().getRestartNonce();
+        boolean everReconcileSucceed =

Review comment:
       IIRC, the `triggerRestart` is never called with `lastReconciledSpec` is 
null since `JobReconciler#reconcile()` will directly return in such case.




-- 
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]


Reply via email to