You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2020/07/16 13:35:28 UTC

[GitHub] [accumulo] milleruntime commented on a change in pull request #1649: Addresses four compaction service follow on issues.

milleruntime commented on a change in pull request #1649:
URL: https://github.com/apache/accumulo/pull/1649#discussion_r455788993



##########
File path: shell/src/main/java/org/apache/accumulo/shell/commands/CompactCommand.java
##########
@@ -147,30 +170,28 @@ public int execute(final String fullCommand, final CommandLine cl, final Shell s
       compactionConfig.setIterators(new ArrayList<>(iterators));
     }
 
-    Map<String,String> selectorOpts = new HashMap<>();
-    Map<String,String> configurerOpts = new HashMap<>();
-    getConfigurableCompactionStrategyOpts(cl, selectorOpts, configurerOpts);
+    setupConfigurableCompaction(cl, compactionConfig);
 
     if (cl.hasOption(strategyOpt.getOpt())) {
-      if (!selectorOpts.isEmpty() || !configurerOpts.isEmpty())
+      if (cl.hasOption(selectorOpt.getLongOpt()) || cl.hasOption(configurerOpt.getLongOpt())) {
         throw new IllegalArgumentException(
-            "Can not specify compaction strategy with file selection and file output options.");
-
+            "Can not specify a strategy with a selector or configurer");
+      }
       configureCompactionStrat(cl);
     }
 
-    if (!selectorOpts.isEmpty()) {
-      PluginConfig selectorCfg = new PluginConfig(
-          "org.apache.accumulo.tserver.compaction.strategies.ConfigurableCompactionStrategy",
-          selectorOpts);
-      compactionConfig.setSelector(selectorCfg);
+    if (cl.hasOption(selectorOpt.getLongOpt())) {

Review comment:
       If the new options can't be set along with a strategy, shouldn't these two if statements be in an else?




----------------------------------------------------------------
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