You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2017/02/23 19:10:35 UTC
[7/7] flink git commit: [hotfix] [checkpoints] Remove
equals()/hashCode() from CompletedCheckpoint as semantic equality is not well
defined.
[hotfix] [checkpoints] Remove equals()/hashCode() from CompletedCheckpoint as semantic equality is not well defined.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/417597fb
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/417597fb
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/417597fb
Branch: refs/heads/master
Commit: 417597fbf71ac9062bed1abf04139d46ec830ec4
Parents: 8ffe75a
Author: Stephan Ewen <se...@apache.org>
Authored: Wed Feb 22 22:19:11 2017 +0100
Committer: Stephan Ewen <se...@apache.org>
Committed: Thu Feb 23 18:39:50 2017 +0100
----------------------------------------------------------------------
.../runtime/checkpoint/CompletedCheckpoint.java | 24 +-------------------
1 file changed, 1 insertion(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/417597fb/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpoint.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpoint.java b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpoint.java
index 53d888e..db86484 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpoint.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpoint.java
@@ -23,13 +23,13 @@ import org.apache.flink.runtime.checkpoint.savepoint.SavepointStore;
import org.apache.flink.runtime.jobgraph.JobStatus;
import org.apache.flink.runtime.jobgraph.JobVertexID;
import org.apache.flink.runtime.state.StateUtil;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Nullable;
import java.io.Serializable;
import java.util.Map;
-import java.util.Objects;
import static org.apache.flink.util.Preconditions.checkArgument;
import static org.apache.flink.util.Preconditions.checkNotNull;
@@ -206,29 +206,7 @@ public class CompletedCheckpoint implements Serializable {
// --------------------------------------------------------------------------------------------
@Override
- public boolean equals(Object obj) {
- if (obj instanceof CompletedCheckpoint) {
- CompletedCheckpoint other = (CompletedCheckpoint) obj;
-
- return job.equals(other.job) && checkpointID == other.checkpointID &&
- timestamp == other.timestamp && duration == other.duration &&
- taskStates.equals(other.taskStates);
- } else {
- return false;
- }
- }
-
- @Override
- public int hashCode() {
- return (int) (this.checkpointID ^ this.checkpointID >>> 32) +
- 31 * ((int) (this.timestamp ^ this.timestamp >>> 32) +
- 31 * ((int) (this.duration ^ this.duration >>> 32) +
- 31 * Objects.hash(job, taskStates)));
- }
-
- @Override
public String toString() {
return String.format("Checkpoint %d @ %d for %s", checkpointID, timestamp, job);
}
-
}