You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/12/31 06:34:19 UTC
[GitHub] [incubator-iotdb] fanhualta commented on a change in pull request
#685: abstract TsFileFlushPolicy and allow specifying storage groups in
flush command
fanhualta commented on a change in pull request #685: abstract TsFileFlushPolicy and allow specifying storage groups in flush command
URL: https://github.com/apache/incubator-iotdb/pull/685#discussion_r362156340
##########
File path: server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
##########
@@ -485,6 +491,25 @@ private boolean execAdminCommand(String statement, long sessionId) throws Storag
}
}
+ private void execFlush(String statement) throws StorageGroupNotSetException {
+ String[] args = statement.split("\\s+");
+ if (args.length == 1) {
+ StorageEngine.getInstance().syncCloseAllProcessor();
+ } else if (args.length == 2){
+ String[] storageGroups = args[1].split(",\\s*");
Review comment:
What do you want to match here? If the command is "FLUSH root.a.b, root.b.c", the length if `args` is 3 which is invalid. So in your gramma, you don't allow space between `storageGroups`. So it's unnecessary to split `,\\s*`, just `,` is ok.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services