You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/12 08:42:41 UTC
[GitHub] [flink] gaoyunhaii commented on a change in pull request #14558: [FLINK-18685] [runtime] Make MiniClusterJobClient#getAccumulators non-blocking in Streaming mode
gaoyunhaii commented on a change in pull request #14558:
URL: https://github.com/apache/flink/pull/14558#discussion_r555597955
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniClusterJobClient.java
##########
@@ -106,7 +108,25 @@ public JobID getJobID() {
@Override
public CompletableFuture<Map<String, Object>> getAccumulators() {
- return getJobExecutionResult().thenApply(JobExecutionResult::getAllAccumulatorResults);
+ //TODO: this is not the only case when we need to get the accumulators from JobExecutionResult.
+ // It is needed also for UnalignedCheckpointCompatibilityITCase savepoints tests to pass.
+ // What is the complete condition ?
+ if (!miniCluster.isRunning()) {
Review comment:
I'm wondering if the `miniCluster.isRunning()` is not a proper condition ? Since a mini-cluster could be viewed as a cluster that could run multiple jobs, the miniCluster would still be able to run after the job is done logically ? Perhaps we could use `jobResultFuture.isDone()`
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniClusterJobClient.java
##########
@@ -106,7 +108,25 @@ public JobID getJobID() {
@Override
public CompletableFuture<Map<String, Object>> getAccumulators() {
- return getJobExecutionResult().thenApply(JobExecutionResult::getAllAccumulatorResults);
+ //TODO: this is not the only case when we need to get the accumulators from JobExecutionResult.
+ // It is needed also for UnalignedCheckpointCompatibilityITCase savepoints tests to pass.
+ // What is the complete condition ?
+ if (!miniCluster.isRunning()) {
Review comment:
I'm wondering if the `miniCluster.isRunning()` is not a proper condition ? Since a mini-cluster could be viewed as a cluster that could run multiple jobs, the miniCluster would still be able to run after the job is done logically ? Perhaps we could use `jobResultFuture.isDone()` ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org