keith-turner commented on code in PR #2799:
URL: https://github.com/apache/accumulo/pull/2799#discussion_r921385325


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java:
##########
@@ -1017,6 +1019,30 @@ public void setProperty(final String tableName, final 
String property, final Str
     }
   }
 
+  @Override
+  public void modifyProperties(String tableName, final 
Consumer<Map<String,String>> mapMutator)
+      throws AccumuloException, AccumuloSecurityException, 
IllegalArgumentException,
+      ConcurrentModificationException {
+    EXISTING_TABLE_NAME.validate(tableName);
+    checkArgument(mapMutator != null, "mapMutator is null");
+
+    final Map<String,String> properties = 
ThriftClientTypes.CLIENT.execute(context,
+        client -> client.getTableProperties(TraceUtil.traceInfo(), 
context.rpcCreds(), tableName));
+    mapMutator.accept(properties);
+
+    try {
+      // Send to server
+      ThriftClientTypes.MANAGER.executeVoid(context, client -> client
+          .modifyTableProperties(TraceUtil.traceInfo(), context.rpcCreds(), 
tableName, properties));
+
+      for (String property : properties.keySet()) {
+        checkLocalityGroups(tableName, property);

Review Comment:
   I need to research this some more and get back to you, so the following 
comment is just the beginning of a discussion (feel free to ignore now).  
Taking a quick look at this, i suspect checkLocalityGroups could be 
restructured to support setting multiple properties at once.  I'll update with 
a new comment after I do some more digging. 



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