flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #5184: [FLINK-8234][flip6] Cache JobExecutionResult in Di...
Date Mon, 08 Jan 2018 10:36:45 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5184#discussion_r160111827
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniClusterJobDispatcher.java
---
    @@ -458,7 +465,14 @@ public JobExecutionResult getResult() throws JobExecutionException,
InterruptedE
     				}
     			}
     			else if (result != null) {
    -				return result;
    +				try {
    +					return new SerializedJobExecutionResult(
    +						jobId,
    +						result.getNetRuntime(),
    +						result.getAccumulatorResults()).toJobExecutionResult(ClassLoader.getSystemClassLoader());
    --- End diff --
    
    I think it is ok. Because this is what happens on the client as well.
    
    Code-wise one could also write it
    ```
    return new JobExecutionResult(
    	jobId,
    	result.getNetRuntime(),
    	AccumulatorHelper.deserializeAccumulators(result.getAccumulatorResults(), ClassLoader.getSystemClassLoader()));
    ```
    



---

Mime
View raw message