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/09/23 23:26:00 UTC

[GitHub] [accumulo-website] EdColeman commented on a diff in pull request #341: Add setting multiple properties using java api

EdColeman commented on code in PR #341:
URL: https://github.com/apache/accumulo-website/pull/341#discussion_r979117044


##########
_docs-2/configuration/overview.md:
##########
@@ -59,6 +59,17 @@ They can also be set using {% jlink org.apache.accumulo.core.client.admin.Instan
 client.instanceOperations().setProperty("table.durability", "flush");
 ```
 
+The java api also supports adding, modifying and removing multiple properties in a single operation:
+
+```java
+client.instanceOperations().modifyProperties(properties -> {
+  properties.remove(Property.TABLE_FILE_MAX.getKey());

Review Comment:
   Yes - with set on an instance the become "system" level properties.
   
   Before:
   
   ```
   root@uno> config -f bloom
   -----------+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------
   SCOPE      | NAME                                 | VALUE
   -----------+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------
   default    | table.bloom.enabled ................ | false
   default    | table.bloom.error.rate ............. | 0.5%
   default    | table.bloom.hash.type .............. | murmur
   default    | table.bloom.key.functor ............ | org.apache.accumulo.core.file.keyfunctor.RowFunctor
   default    | table.bloom.load.threshold ......... | 1
   default    | table.bloom.size ................... | 1048576
   default    | tserver.bloom.load.concurrent.max .. | 4
   -----------+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------
   
   ```
   
   After:
   
   ```
   jshell> import org.apache.accumulo.core.conf.Property;
   
   jshell> client.instanceOperations().modifyProperties(properties -> {
      ...>   properties.remove(Property.TABLE_FILE_MAX.getKey());
      ...>   properties.put("table.bloom.enabled", "true");
      ...>   properties.put("table.bloom.error.rate", "0.75");
      ...>   properties.put("table.bloom.size", "128000");
      ...> });
   
   root@uno> config -f bloom
   -----------+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------
   SCOPE      | NAME                                 | VALUE
   -----------+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------
   default    | table.bloom.enabled ................ | false
   system     |    @override ....................... | true
   default    | table.bloom.error.rate ............. | 0.5%
   system     |    @override ....................... | 0.75
   default    | table.bloom.hash.type .............. | murmur
   default    | table.bloom.key.functor ............ | org.apache.accumulo.core.file.keyfunctor.RowFunctor
   default    | table.bloom.load.threshold ......... | 1
   default    | table.bloom.size ................... | 1048576
   system     |    @override ....................... | 128000
   default    | tserver.bloom.load.concurrent.max .. | 4
   -----------+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------
   
   ```



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