This is an automated email from the ASF dual-hosted git repository.
tison pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 6e0088a [FLINK-14766][coordination] Remove volatile keyword in
executiongraph package
6e0088a is described below
commit 6e0088a0048af6671dc187c4ffe011548e275868
Author: Jiayi <[email protected]>
AuthorDate: Fri Nov 15 13:15:01 2019 +0800
[FLINK-14766][coordination] Remove volatile keyword in executiongraph
package
This closes #10207 .
---
.../org/apache/flink/runtime/executiongraph/Execution.java | 12 ++++++------
.../apache/flink/runtime/executiongraph/ExecutionGraph.java | 8 ++++----
.../apache/flink/runtime/executiongraph/ExecutionVertex.java | 4 ++--
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
index ba24f5a..cf45b3c 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
@@ -159,17 +159,17 @@ public class Execution implements AccessExecution,
Archiveable<ArchivedExecution
private volatile ExecutionState state = CREATED;
- private volatile LogicalSlot assignedResource;
+ private LogicalSlot assignedResource;
- private volatile Throwable failureCause; // once assigned,
never changes
+ private Throwable failureCause; // once assigned, never changes
/** Information to restore the task on recovery, such as checkpoint id
and task state snapshot. */
@Nullable
- private volatile JobManagerTaskRestore taskRestore;
+ private JobManagerTaskRestore taskRestore;
/** This field holds the allocation id once it was assigned
successfully. */
@Nullable
- private volatile AllocationID assignedAllocationID;
+ private AllocationID assignedAllocationID;
// ------------------------ Accumulators & Metrics
------------------------
@@ -178,9 +178,9 @@ public class Execution implements AccessExecution,
Archiveable<ArchivedExecution
private final Object accumulatorLock = new Object();
/* Continuously updated map of user-defined accumulators */
- private volatile Map<String, Accumulator<?, ?>> userAccumulators;
+ private Map<String, Accumulator<?, ?>> userAccumulators;
- private volatile IOMetrics ioMetrics;
+ private IOMetrics ioMetrics;
private Map<IntermediateResultPartitionID,
ResultPartitionDeploymentDescriptor> producedPartitions;
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
index 5803f8d..2a15833 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
@@ -270,16 +270,16 @@ public class ExecutionGraph implements
AccessExecutionGraph {
/** On each global recovery, this version is incremented. The version
breaks conflicts
* between concurrent restart attempts by local failover strategies. */
- private volatile long globalModVersion;
+ private long globalModVersion;
/** The exception that caused the job to fail. This is set to the first
root exception
* that was not recoverable and triggered job failure. */
- private volatile Throwable failureCause;
+ private Throwable failureCause;
/** The extended failure cause information for the job. This exists in
addition to 'failureCause',
* to let 'failureCause' be a strong reference to the exception, while
this info holds no
* strong reference to any user-defined classes.*/
- private volatile ErrorInfo failureInfo;
+ private ErrorInfo failureInfo;
private final JobMasterPartitionTracker partitionTracker;
@@ -289,7 +289,7 @@ public class ExecutionGraph implements AccessExecutionGraph
{
* Future for an ongoing or completed scheduling action.
*/
@Nullable
- private volatile CompletableFuture<Void> schedulingFuture;
+ private CompletableFuture<Void> schedulingFuture;
// ------ Fields that are relevant to the execution and need to be
cleared before archiving -------
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java
index fa083c0..6acc519 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java
@@ -92,10 +92,10 @@ public class ExecutionVertex implements
AccessExecutionVertex, Archiveable<Archi
/** The name in the format "myTask (2/7)", cached to avoid frequent
string concatenations. */
private final String taskNameWithSubtask;
- private volatile CoLocationConstraint locationConstraint;
+ private CoLocationConstraint locationConstraint;
/** The current or latest execution attempt of this vertex's task. */
- private volatile Execution currentExecution; // this field must
never be null
+ private Execution currentExecution; // this field must never be null
private final ArrayList<InputSplit> inputSplits;