Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/1048#discussion_r37753999
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/TaskExecutionState.java
---
@@ -160,19 +123,10 @@ public TaskExecutionState(JobID jobID,
ExecutionAttemptID executionId,
* job this update refers to.
*/
public Throwable getError(ClassLoader usercodeClassloader) {
- if (this.serializedError == null) {
+ if (this.throwable == null) {
return null;
}
-
- if (this.cachedError == null) {
- try {
- cachedError = (Throwable)
InstantiationUtil.deserializeObject(this.serializedError, usercodeClassloader);
- }
- catch (Exception e) {
- throw new RuntimeException("Error while
deserializing the attached exception", e);
- }
- }
- return this.cachedError;
+ return throwable.getError(usercodeClassloader);
--- End diff --
Could we place the last return in an else branch to make the control flow
clearer?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---