flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] klion26 commented on a change in pull request #6777: [FLINK-10461] [State Backends, Checkpointing] Speed up download files when restore from DFS
Date Tue, 18 Dec 2018 14:26:58 GMT
klion26 commented on a change in pull request #6777: [FLINK-10461] [State Backends, Checkpointing]
Speed up download files when restore from DFS
URL: https://github.com/apache/flink/pull/6777#discussion_r242554475
 
 

 ##########
 File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackend.java
 ##########
 @@ -686,6 +697,17 @@ public RocksDBNativeMetricOptions getMemoryWatcherOptions() {
 		return options;
 	}
 
+	/**
+	 * Gets the thread number will used for downloading files from DFS when restore.
+	 */
+	public int getNumberOfRestoringThreads() {
+		return numberOfRestoringThreads == -1 ? RocksDBOptions.CHECKPOINT_RESTORE_THREAD_NUM.defaultValue()
: numberOfRestoringThreads;
 
 Review comment:
   @zentol thank you for your review. How about add a variable `private final int undefinedThreadNum
= -1` in  `RocksDBStateBackend`, change the code 
    - from `this.numberOfrestoringThreads = 1` to `this.numberOfRestoringThreads = undefinedThreadNum`
in constructor 
   - `if (original.numberOfRestoringThreads == -1)` to `if (original.numberOfRestoringThreads
== undefinedThreadNum)`  in constructor 
   - and here `return numberOfRestoringThreads == undefinedThreadNum ? RocksDBOptions.CHECKPOINT_RESTORE_THREAD_NUM.defaultValue()
: numberOfRestoringThreads;`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message