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 18:48:10 UTC

[GitHub] [accumulo-website] EdColeman opened a new pull request, #341: Add setting multiple properties using java api

EdColeman opened a new pull request, #341:
URL: https://github.com/apache/accumulo-website/pull/341

   Documents ability to modify properties in a single operation provided in https://github.com/apache/accumulo/pull/2799


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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [accumulo-website] EdColeman merged pull request #341: Add setting multiple properties using java api

Posted by GitBox <gi...@apache.org>.
EdColeman merged PR #341:
URL: https://github.com/apache/accumulo-website/pull/341


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


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

Posted by GitBox <gi...@apache.org>.
dlmarion commented on code in PR #341:
URL: https://github.com/apache/accumulo-website/pull/341#discussion_r979000550


##########
_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:
   Can you set table properties at the instance level? 



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


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

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on code in PR #341:
URL: https://github.com/apache/accumulo-website/pull/341#discussion_r983887335


##########
_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:
   Fixed in 4dbd6b5f95a406d790fcbbd5182ed9fbcdef3f75



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


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

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on code in PR #341:
URL: https://github.com/apache/accumulo-website/pull/341#discussion_r983881350


##########
_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:
   `org.apache.accumulo.core.conf.Property` is not public API, and should not be used in documentation as an example. It should be replaced with the actual String key for the property, which is the user-facing "public API" for configuration.



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