dlmarion commented on code in PR #60:
URL: https://github.com/apache/accumulo-proxy/pull/60#discussion_r1072358091


##########
src/main/java/org/apache/accumulo/proxy/ProxyServer.java:
##########
@@ -403,12 +404,24 @@ public void compactTable(ByteBuffer login, String 
tableName, ByteBuffer startRow
           
.setStartRow(ByteBufferUtil.toText(startRow)).setEndRow(ByteBufferUtil.toText(endRow))
           
.setIterators(getIteratorSettings(iterators)).setFlush(flush).setWait(wait);
 
-      if (compactionStrategy != null) {
-        org.apache.accumulo.core.client.admin.CompactionStrategyConfig ccc = 
new org.apache.accumulo.core.client.admin.CompactionStrategyConfig(
-            compactionStrategy.getClassName());
-        if (compactionStrategy.options != null)
-          ccc.setOptions(compactionStrategy.options);
-        compactionConfig.setCompactionStrategy(ccc);
+      if (selectorConfig != null) {
+        Map<String,String> options = selectorConfig.options == null ? Map.of()
+            : selectorConfig.options;
+
+        org.apache.accumulo.core.client.admin.PluginConfig spc = new 
org.apache.accumulo.core.client.admin.PluginConfig(
+            selectorConfig.getClassName(), options);
+
+        compactionConfig.setSelector(spc);
+      }
+
+      if (configurerConfig != null) {
+        Map<String,String> options = configurerConfig.options == null ? 
Map.of()
+            : configurerConfig.options;
+
+        org.apache.accumulo.core.client.admin.PluginConfig cpc = new 
org.apache.accumulo.core.client.admin.PluginConfig(
+            configurerConfig.getClassName(), options);
+
+        compactionConfig.setConfigurer(cpc);

Review Comment:
   This new logic looks correct, appears to match the code in 
`CompactCommand.setupConfigurableCompaction`.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to