flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [05/12] flink git commit: [FLINK-5327] Remove IOException from StateObject::getStateSize
Date Wed, 14 Dec 2016 12:10:12 GMT
[FLINK-5327] Remove IOException from StateObject::getStateSize

This closes #2993


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

Branch: refs/heads/master
Commit: 3560f2e819425326cc93b4e019a615b7752b98e6
Parents: 47a6105
Author: Stefan Richter <s.richter@data-artisans.com>
Authored: Mon Dec 12 14:02:25 2016 +0100
Committer: Stephan Ewen <sewen@apache.org>
Committed: Wed Dec 14 12:43:32 2016 +0100

----------------------------------------------------------------------
 .../flink/migration/state/MigrationStreamStateHandle.java       | 2 +-
 .../java/org/apache/flink/runtime/state/ChainedStateHandle.java | 3 +--
 .../org/apache/flink/runtime/state/KeyGroupsStateHandle.java    | 2 +-
 .../org/apache/flink/runtime/state/MultiStreamStateHandle.java  | 2 +-
 .../org/apache/flink/runtime/state/OperatorStateHandle.java     | 2 +-
 .../flink/runtime/state/RetrievableStreamStateHandle.java       | 2 +-
 .../main/java/org/apache/flink/runtime/state/StateObject.java   | 5 +----
 .../apache/flink/runtime/state/filesystem/FileStateHandle.java  | 3 +--
 .../checkpoint/ZooKeeperCompletedCheckpointStoreITCase.java     | 3 +--
 .../streaming/runtime/tasks/InterruptSensitiveRestoreTest.java  | 2 +-
 10 files changed, 10 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/3560f2e8/flink-runtime/src/main/java/org/apache/flink/migration/state/MigrationStreamStateHandle.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/migration/state/MigrationStreamStateHandle.java
b/flink-runtime/src/main/java/org/apache/flink/migration/state/MigrationStreamStateHandle.java
index e7aa788..e2da757 100644
--- a/flink-runtime/src/main/java/org/apache/flink/migration/state/MigrationStreamStateHandle.java
+++ b/flink-runtime/src/main/java/org/apache/flink/migration/state/MigrationStreamStateHandle.java
@@ -50,7 +50,7 @@ public class MigrationStreamStateHandle implements StreamStateHandle {
 	}
 
 	@Override
-	public long getStateSize() throws IOException {
+	public long getStateSize() {
 		return delegate.getStateSize();
 	}
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/3560f2e8/flink-runtime/src/main/java/org/apache/flink/runtime/state/ChainedStateHandle.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/ChainedStateHandle.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/state/ChainedStateHandle.java
index a807428..27ef576 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/ChainedStateHandle.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/ChainedStateHandle.java
@@ -21,7 +21,6 @@ package org.apache.flink.runtime.state;
 
 import org.apache.flink.util.Preconditions;
 
-import java.io.IOException;
 import java.util.Collections;
 import java.util.List;
 
@@ -85,7 +84,7 @@ public class ChainedStateHandle<T extends StateObject> implements
StateObject {
 	}
 
 	@Override
-	public long getStateSize() throws IOException {
+	public long getStateSize() {
 		long sumStateSize = 0;
 
 		if (operatorStateHandles != null) {

http://git-wip-us.apache.org/repos/asf/flink/blob/3560f2e8/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupsStateHandle.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupsStateHandle.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupsStateHandle.java
index 1d277b3..b454e42 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupsStateHandle.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupsStateHandle.java
@@ -111,7 +111,7 @@ public class KeyGroupsStateHandle implements StreamStateHandle {
 	}
 
 	@Override
-	public long getStateSize() throws IOException {
+	public long getStateSize() {
 		return stateHandle.getStateSize();
 	}
 

http://git-wip-us.apache.org/repos/asf/flink/blob/3560f2e8/flink-runtime/src/main/java/org/apache/flink/runtime/state/MultiStreamStateHandle.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/MultiStreamStateHandle.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/state/MultiStreamStateHandle.java
index 7492262..b95dace 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/MultiStreamStateHandle.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/MultiStreamStateHandle.java
@@ -58,7 +58,7 @@ public class MultiStreamStateHandle implements StreamStateHandle {
 	}
 
 	@Override
-	public long getStateSize() throws IOException {
+	public long getStateSize() {
 		return stateSize;
 	}
 

http://git-wip-us.apache.org/repos/asf/flink/blob/3560f2e8/flink-runtime/src/main/java/org/apache/flink/runtime/state/OperatorStateHandle.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/OperatorStateHandle.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/state/OperatorStateHandle.java
index 1ad41ea..3cd37c9 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/OperatorStateHandle.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/OperatorStateHandle.java
@@ -55,7 +55,7 @@ public class OperatorStateHandle implements StreamStateHandle {
 	}
 
 	@Override
-	public long getStateSize() throws IOException {
+	public long getStateSize() {
 		return delegateStateHandle.getStateSize();
 	}
 

http://git-wip-us.apache.org/repos/asf/flink/blob/3560f2e8/flink-runtime/src/main/java/org/apache/flink/runtime/state/RetrievableStreamStateHandle.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/RetrievableStreamStateHandle.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/state/RetrievableStreamStateHandle.java
index 29d21ac..653e227 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/RetrievableStreamStateHandle.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/RetrievableStreamStateHandle.java
@@ -70,7 +70,7 @@ public class RetrievableStreamStateHandle<T extends Serializable>
implements
 	}
 
 	@Override
-	public long getStateSize() throws IOException {
+	public long getStateSize() {
 		return wrappedStreamStateHandle.getStateSize();
 	}
 

http://git-wip-us.apache.org/repos/asf/flink/blob/3560f2e8/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateObject.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateObject.java b/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateObject.java
index a502b9d..9ff2fa8 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateObject.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateObject.java
@@ -18,8 +18,6 @@
 
 package org.apache.flink.runtime.state;
 
-import java.io.IOException;
-
 /**
  * Base of all types that represent checkpointed state. Specializations are for
  * example {@link StateHandle StateHandles} (directly resolve to state).
@@ -45,7 +43,6 @@ public interface StateObject extends java.io.Serializable {
 	 * <p>If the the size is not known, return {@code 0}.
 	 *
 	 * @return Size of the state in bytes.
-	 * @throws IOException If the operation fails during size retrieval.
 	 */
-	long getStateSize() throws IOException;
+	long getStateSize();
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/3560f2e8/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FileStateHandle.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FileStateHandle.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FileStateHandle.java
index 4b2d350..bdf3f42 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FileStateHandle.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FileStateHandle.java
@@ -91,10 +91,9 @@ public class FileStateHandle implements StreamStateHandle {
 	 * Returns the file size in bytes.
 	 *
 	 * @return The file size in bytes.
-	 * @throws IOException Thrown if the file system cannot be accessed.
 	 */
 	@Override
-	public long getStateSize() throws IOException {
+	public long getStateSize() {
 		return stateSize;
 	}
 

http://git-wip-us.apache.org/repos/asf/flink/blob/3560f2e8/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreITCase.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreITCase.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreITCase.java
index f46f7d2..046adba 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreITCase.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreITCase.java
@@ -30,7 +30,6 @@ import org.junit.Test;
 import scala.concurrent.duration.Deadline;
 import scala.concurrent.duration.FiniteDuration;
 
-import java.io.IOException;
 import java.io.Serializable;
 import java.util.concurrent.TimeUnit;
 
@@ -184,7 +183,7 @@ public class ZooKeeperCompletedCheckpointStoreITCase extends CompletedCheckpoint
 		}
 
 		@Override
-		public long getStateSize() throws IOException {
+		public long getStateSize() {
 			return 0;
 		}
 	}

http://git-wip-us.apache.org/repos/asf/flink/blob/3560f2e8/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/InterruptSensitiveRestoreTest.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/InterruptSensitiveRestoreTest.java
b/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/InterruptSensitiveRestoreTest.java
index 6cde30f..1207cbb 100644
--- a/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/InterruptSensitiveRestoreTest.java
+++ b/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/InterruptSensitiveRestoreTest.java
@@ -249,7 +249,7 @@ public class InterruptSensitiveRestoreTest {
 		public void discardState() throws Exception {}
 
 		@Override
-		public long getStateSize() throws IOException {
+		public long getStateSize() {
 			return 0;
 		}
 	}


Mime
View raw message