flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljos...@apache.org
Subject flink git commit: [hotfix] Add logging for RocksDB backup durations
Date Wed, 24 Feb 2016 14:56:18 GMT
Repository: flink
Updated Branches:
  refs/heads/master cec7fbbc7 -> be68b1780


[hotfix] Add logging for RocksDB backup durations


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

Branch: refs/heads/master
Commit: be68b178091229b051c07504f16a429571315bc0
Parents: cec7fbb
Author: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Authored: Wed Feb 24 11:26:27 2016 +0100
Committer: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Committed: Wed Feb 24 15:55:39 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/flink/blob/be68b178/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 ef58c79..ba1b7dc 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
@@ -252,9 +252,12 @@ public abstract class AbstractRocksDBState<K, N, S extends State,
SD extends Sta
 			}
 		}
 
+		long startTime = System.currentTimeMillis();
 		try (BackupEngine backupEngine = BackupEngine.open(Env.getDefault(), new BackupableDBOptions(localBackupPath.getAbsolutePath())))
{
 			backupEngine.createNewBackup(db);
 		}
+		long endTime = System.currentTimeMillis();
+		LOG.info("RocksDB (" + rocksDbPath + ") backup (synchronous part) took " + (endTime - startTime)
+ " ms.");
 
 		return new AsyncRocksDBSnapshot<>(
 			localBackupPath,
@@ -419,7 +422,10 @@ public abstract class AbstractRocksDBState<K, N, S extends State,
SD extends Sta
 		@Override
 		public KvStateSnapshot<K, N, S, SD, RocksDBStateBackend> materialize() throws Exception
{
 			try {
+				long startTime = System.currentTimeMillis();
 				HDFSCopyFromLocal.copyFromLocal(localBackupPath, backupUri);
+				long endTime = System.currentTimeMillis();
+				LOG.info("RocksDB materialization from " + localBackupPath + " to " + backupUri + " (asynchronous
part) took " + (endTime - startTime) + " ms.");
 				return state.createRocksDBSnapshot(backupUri, checkpointId);
 			} catch (Exception e) {
 				FileSystem fs = FileSystem.get(backupUri, HadoopFileSystem.getHadoopConfiguration());


Mime
View raw message