szetszwo commented on a change in pull request #340:
URL: https://github.com/apache/incubator-ratis/pull/340#discussion_r539040813
##########
File path:
ratis-examples/src/main/java/org/apache/ratis/examples/filestore/cli/DataStream.java
##########
@@ -118,9 +121,11 @@ protected void operation(RaftClient client) throws
IOException {
FileStoreClient fileStoreClient = new FileStoreClient(client);
System.out.println("Starting DataStream write now ");
+ final ExecutorService executor =
Executors.newFixedThreadPool(getNumFiles());
Review comment:
It should have a max since getNumFiles() can return a large number.
##########
File path:
ratis-examples/src/main/java/org/apache/ratis/examples/filestore/cli/DataStream.java
##########
@@ -118,9 +121,11 @@ protected void operation(RaftClient client) throws
IOException {
FileStoreClient fileStoreClient = new FileStoreClient(client);
System.out.println("Starting DataStream write now ");
+ final ExecutorService executor =
Executors.newFixedThreadPool(getNumFiles());
Review comment:
BTW, we should make the executors in FileStore configurable. I suspect
the performance will be better if we use more threads.
```
//org.apache.ratis.examples.filestore.FileStore
private final ExecutorService writer = Executors.newFixedThreadPool(10);
private final ExecutorService committer = Executors.newFixedThreadPool(3);
private final ExecutorService reader = Executors.newFixedThreadPool(10);
private final ExecutorService deleter = Executors.newFixedThreadPool(3);
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]