flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gyf...@apache.org
Subject flink git commit: [FLINK-3354] Determine correct size for RocksDB snapshots
Date Mon, 15 Feb 2016 14:41:41 GMT
Repository: flink
Updated Branches:
  refs/heads/master 73bc35f14 -> b17632ddb


[FLINK-3354] Determine correct size for RocksDB snapshots

Closes #1638


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

Branch: refs/heads/master
Commit: b17632ddbbb58f8b3e3d1a31d6658e59258918c7
Parents: 73bc35f
Author: Gyula Fora <gyfora@apache.org>
Authored: Mon Feb 15 13:33:01 2016 +0100
Committer: Gyula Fora <gyfora@apache.org>
Committed: Mon Feb 15 14:08:41 2016 +0100

----------------------------------------------------------------------
 .../flink/contrib/streaming/state/AbstractRocksDBState.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/b17632dd/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
----------------------------------------------------------------------
diff --git a/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
b/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
index 76f05d6..6bd6ce6 100644
--- a/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
+++ b/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
@@ -421,7 +421,8 @@ public abstract class AbstractRocksDBState<K, N, S extends State, SD
extends Sta
 
 		@Override
 		public final long getStateSize() throws Exception {
-			return 0;
+			FileSystem fs = FileSystem.get(backupUri, HadoopFileSystem.getHadoopConfiguration());
+			return fs.getContentSummary(new Path(backupUri)).getLength();
 		}
 	}
 


Mime
View raw message