flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ches...@apache.org
Subject [04/10] flink git commit: [hotfix] Improve readability in SPV2#convertToOperatorStateSavepointV2
Date Sun, 25 Jun 2017 11:50:25 GMT
[hotfix] Improve readability in SPV2#convertToOperatorStateSavepointV2


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/3d5cee2d
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/3d5cee2d
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/3d5cee2d

Branch: refs/heads/release-1.3
Commit: 3d5cee2dcc6b764556f430404b5b7936ee1cd009
Parents: 9139791
Author: zentol <chesnay@apache.org>
Authored: Wed Jun 7 12:03:57 2017 +0200
Committer: zentol <chesnay@apache.org>
Committed: Sun Jun 25 08:55:09 2017 +0200

----------------------------------------------------------------------
 .../flink/runtime/checkpoint/savepoint/SavepointV2.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/3d5cee2d/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/savepoint/SavepointV2.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/savepoint/SavepointV2.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/savepoint/SavepointV2.java
index 6a3b57f..1b2963d 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/savepoint/SavepointV2.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/savepoint/SavepointV2.java
@@ -188,8 +188,8 @@ public class SavepointV2 implements Savepoint {
 				for (int chainIndex = 0; chainIndex < taskState.getChainLength(); chainIndex++) {
 
 					// task consists of multiple operators so we have to break the state apart
-					for (int o = 0; o < operatorIDs.size(); o++) {
-						OperatorID operatorID = operatorIDs.get(o);
+					for (int operatorIndex = 0; operatorIndex < operatorIDs.size(); operatorIndex++)
{
+						OperatorID operatorID = operatorIDs.get(operatorIndex);
 						OperatorState operatorState = operatorStates.get(operatorID);
 
 						if (operatorState == null) {
@@ -204,15 +204,15 @@ public class SavepointV2 implements Savepoint {
 						KeyedStateHandle rawKeyedState = null;
 
 						// only the head operator retains the keyed state
-						if (o == operatorIDs.size() - 1) {
+						if (operatorIndex == operatorIDs.size() - 1) {
 							managedKeyedState = subtaskState.getManagedKeyedState();
 							rawKeyedState = subtaskState.getRawKeyedState();
 						}
 
 						OperatorSubtaskState operatorSubtaskState = new OperatorSubtaskState(
-							nonPartitionedState != null ? nonPartitionedState.get(o) : null,
-							partitioneableState != null ? partitioneableState.get(o) : null,
-							rawOperatorState != null ? rawOperatorState.get(o) : null,
+							nonPartitionedState != null ? nonPartitionedState.get(operatorIndex) : null,
+							partitioneableState != null ? partitioneableState.get(operatorIndex) : null,
+							rawOperatorState != null ? rawOperatorState.get(operatorIndex) : null,
 							managedKeyedState,
 							rawKeyedState);
 


Mime
View raw message