flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnowojski <...@git.apache.org>
Subject [GitHub] flink pull request #5239: [FLINK-8360] Implement task-local state recovery
Date Fri, 05 Jan 2018 14:03:00 GMT
Github user pnowojski commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5239#discussion_r159866648
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java ---
    @@ -669,31 +676,14 @@ else if (current == ExecutionState.CANCELING) {
     			Environment env = new RuntimeEnvironment(
     				jobId, vertexId, executionId, executionConfig, taskInfo,
     				jobConfiguration, taskConfiguration, userCodeClassLoader,
    -				memoryManager, ioManager, broadcastVariableManager,
    +				memoryManager, ioManager, broadcastVariableManager, taskStateManager,
     				accumulatorRegistry, kvStateRegistry, inputSplitProvider,
     				distributedCacheEntries, writers, inputGates,
     				checkpointResponder, taskManagerConfig, metrics, this);
     
     			// let the task code create its readers and writers
     			invokable.setEnvironment(env);
     
    -			// the very last thing before the actual execution starts running is to inject
    -			// the state into the task. the state is non-empty if this is an execution
    -			// of a task that failed but had backuped state from a checkpoint
    -
    -			if (null != taskRestore && taskRestore.getTaskStateSnapshot() != null) {
    -				if (invokable instanceof StatefulTask) {
    -					StatefulTask op = (StatefulTask) invokable;
    -					op.setInitialState(taskRestore.getTaskStateSnapshot());
    --- End diff --
    
    grrr, this cryptic `op` name forced me to look into the source code to check whether this
is is instance of `StatefullTask` or not :/ could you rename it to something that at least
is not an abbreviation?


---

Mime
View raw message