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 2022/05/19 22:20:23 UTC
[GitHub] [accumulo] EdColeman commented on a diff in pull request #2717: Create Public API to set multiple properties
EdColeman commented on code in PR #2717:
URL: https://github.com/apache/accumulo/pull/2717#discussion_r877584349
##########
core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java:
##########
@@ -47,6 +47,24 @@ public interface InstanceOperations {
void setProperty(final String property, final String value)
throws AccumuloException, AccumuloSecurityException;
+ /**
+ * Sets multiple system properties in zookeeper. Tablet servers will pull this setting and
+ * override the equivalent setting in accumulo.properties. Changes can be seen using
+ * {@link #getSystemConfiguration()}.
+ * <p>
+ * Only some properties can be changed by this method, an IllegalArgumentException will be thrown
+ * if there is an attempt to set a read-only property.
+ *
+ * @param propertiesMap
+ * map containing key-value pairs of properties and corresponding values
+ * @throws AccumuloException
+ * if a general error occurs
+ * @throws AccumuloSecurityException
+ * if the user does not have permission
+ */
+ void setProperties(Map<String,String> propertiesMap)
Review Comment:
It may be easier to adopt the addOrUpdate semantics - there may be default properties that are added on table creation - and you probably do not want to remove them unless it is done explicitly.
I'm not sure how addOrUpdate handles empty (or null) values - but that could be used to remove a property as part of an atomic set group operation. Doing something like thatMap.of("a", "v1", "b", ", "c", "v2") - would either add or update a or c and remove b.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org