azagrebin commented on a change in pull request #7351: [FLINK-11008][State
Backends, Checkpointing]SpeedUp upload state files using multithread
URL: https://github.com/apache/flink/pull/7351#discussion_r244004203
##########
File path:
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackend.java
##########
@@ -714,6 +729,20 @@ public void setNumberOfRestoringThreads(int
numberOfRestoringThreads) {
this.numberOfRestoringThreads = numberOfRestoringThreads;
}
+ /**
+ * Gets the thread number will used for uploading files to DFS when
snapshot.
+ */
+ public int getNumberOfUploadingThreads() {
+ return numberOfUploadingThreads ==
UNDEFINED_NUMBER_OF_UPLOADING_THREADS ?
+ CHECKPOINT_SNAPSHOT_THREAD_NUM.defaultValue() :
numberOfUploadingThreads;
+ }
+
+ public void setNumberOfUploadingThreads(int numberOfUploadingThreads) {
+ Preconditions.checkArgument(numberOfUploadingThreads > 0,
+ "The number of threads used to upload files to DFS in
RocksDBStateBackend should > 0.");
Review comment:
`should be greater than zero` (also in `setNumberOfRestoringThreads`)
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services