ctubbsii commented on PR #2717:
URL: https://github.com/apache/accumulo/pull/2717#issuecomment-1133596040

   > Maybe I am too focused on how it would be handled via the shell if we 
wanted to allow multiple, atomic sets there.
   
   Mutating the props in the shell would be a huge pain. It'd be easier to use 
`bin/accumulo jshell` and work directly on the map in there.
   
   Also, I'm thinking Consumer would be better than Function:
   ```java
   /**
    * Modify system properties using a Consumer that accepts a mutable map 
containing the current system
    * property overrides stored in ZooKeeper. If the supplied Consumer alters 
the map without throwing an
    * Exception, then the resulting map will atomically replace the current 
system property overrides in
    * ZooKeeper. Only properties which can be stored in ZooKeeper will be 
accepted.
    *
    * @throws IllegalArgumentException if the Consumer alters the map by adding 
properties that cannot be
    *         stored in ZooKeeper
    * @throws ConcurrentModificationException without altering the stored 
properties if the server reports
    *         that the properties have been changed by another process
    */
   void modifyProperties(Consumer<Map<String,String>> mapMutator);
   ```


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