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 2018/01/05 18:38:49 UTC

[08/19] flink git commit: [hotfix] [checkpoints] Remove never used method 'close()' on CheckpointStreamFactory

[hotfix] [checkpoints] Remove never used method 'close()' on CheckpointStreamFactory

The fact that the method was never called (and never implemented) strongly suggests
that it should be removed, otherwise someone might eventually end up implementing
it for a new state backend and wonder why it is never called.


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

Branch: refs/heads/master
Commit: 6360875f12a102612bbb6c79bed807712285e116
Parents: b82f59f
Author: Stephan Ewen <se...@apache.org>
Authored: Thu Oct 26 20:54:55 2017 +0200
Committer: Stephan Ewen <se...@apache.org>
Committed: Fri Jan 5 19:38:06 2018 +0100

----------------------------------------------------------------------
 .../apache/flink/runtime/state/CheckpointStreamFactory.java  | 8 --------
 .../runtime/state/filesystem/FsCheckpointStreamFactory.java  | 3 ---
 .../runtime/state/memory/MemCheckpointStreamFactory.java     | 3 ---
 .../flink/runtime/util/BlockerCheckpointStreamFactory.java   | 5 -----
 .../runtime/tasks/TaskCheckpointingBehaviourTest.java        | 3 ---
 5 files changed, 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/6360875f/flink-runtime/src/main/java/org/apache/flink/runtime/state/CheckpointStreamFactory.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/CheckpointStreamFactory.java b/flink-runtime/src/main/java/org/apache/flink/runtime/state/CheckpointStreamFactory.java
index 199a856..73113ec 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/CheckpointStreamFactory.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/CheckpointStreamFactory.java
@@ -40,14 +40,6 @@ public interface CheckpointStreamFactory {
 			long timestamp) throws Exception;
 
 	/**
-	 * Closes the stream factory, releasing all internal resources, but does not delete any
-	 * persistent checkpoint data.
-	 *
-	 * @throws Exception Exceptions can be forwarded and will be logged by the system
-	 */
-	void close() throws Exception;
-
-	/**
 	 * A dedicated output stream that produces a {@link StreamStateHandle} when closed.
 	 *
 	 * <p>Note: This is an abstract class and not an interface because {@link OutputStream}

http://git-wip-us.apache.org/repos/asf/flink/blob/6360875f/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStreamFactory.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStreamFactory.java b/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStreamFactory.java
index a824651..8f84a38 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStreamFactory.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStreamFactory.java
@@ -106,9 +106,6 @@ public class FsCheckpointStreamFactory implements CheckpointStreamFactory {
 	}
 
 	@Override
-	public void close() throws Exception {}
-
-	@Override
 	public FsCheckpointStateOutputStream createCheckpointStateOutputStream(long checkpointID, long timestamp) throws Exception {
 		checkFileSystemInitialized();
 

http://git-wip-us.apache.org/repos/asf/flink/blob/6360875f/flink-runtime/src/main/java/org/apache/flink/runtime/state/memory/MemCheckpointStreamFactory.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/memory/MemCheckpointStreamFactory.java b/flink-runtime/src/main/java/org/apache/flink/runtime/state/memory/MemCheckpointStreamFactory.java
index 3920ce8..602e9d1 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/memory/MemCheckpointStreamFactory.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/memory/MemCheckpointStreamFactory.java
@@ -45,9 +45,6 @@ public class MemCheckpointStreamFactory implements CheckpointStreamFactory {
 	}
 
 	@Override
-	public void close() throws Exception {}
-
-	@Override
 	public CheckpointStateOutputStream createCheckpointStateOutputStream(
 			long checkpointID, long timestamp) throws Exception
 	{

http://git-wip-us.apache.org/repos/asf/flink/blob/6360875f/flink-runtime/src/test/java/org/apache/flink/runtime/util/BlockerCheckpointStreamFactory.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/util/BlockerCheckpointStreamFactory.java b/flink-runtime/src/test/java/org/apache/flink/runtime/util/BlockerCheckpointStreamFactory.java
index 2091e00..727dc4f 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/util/BlockerCheckpointStreamFactory.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/util/BlockerCheckpointStreamFactory.java
@@ -146,9 +146,4 @@ public class BlockerCheckpointStreamFactory implements CheckpointStreamFactory {
 
 		return lastCreatedStream;
 	}
-
-	@Override
-	public void close() throws Exception {
-
-	}
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/6360875f/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/TaskCheckpointingBehaviourTest.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/TaskCheckpointingBehaviourTest.java b/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/TaskCheckpointingBehaviourTest.java
index b1127d5..ddb5f9b 100644
--- a/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/TaskCheckpointingBehaviourTest.java
+++ b/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/TaskCheckpointingBehaviourTest.java
@@ -362,9 +362,6 @@ public class TaskCheckpointingBehaviourTest extends TestLogger {
 		public CheckpointStateOutputStream createCheckpointStateOutputStream(long checkpointID, long timestamp) {
 			return new LockingOutputStream();
 		}
-
-		@Override
-		public void close() {}
 	}
 
 	private static final class LockingOutputStream extends CheckpointStateOutputStream {