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/06/13 15:15:17 UTC

[GitHub] [accumulo] DomGarguilo commented on a diff in pull request #2771: Implement consistent Namespace and Table property handling

DomGarguilo commented on code in PR #2771:
URL: https://github.com/apache/accumulo/pull/2771#discussion_r895844001


##########
test/src/main/java/org/apache/accumulo/test/ZooKeeperPropertiesIT.java:
##########
@@ -38,4 +52,106 @@ public void testNoFiles() {
     }
   }
 
+  @Test
+  @Timeout(30)
+  public void testTablePropUtils() throws AccumuloException, TableExistsException,
+      AccumuloSecurityException, TableNotFoundException {
+    ServerContext context = getServerContext();
+
+    try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+
+      final String tableName = getUniqueNames(1)[0];
+      client.tableOperations().create(tableName);
+      Map<String,String> idMap = client.tableOperations().tableIdMap();
+      String tid = idMap.get(tableName);
+
+      Map<String,String> properties = client.tableOperations().getConfiguration(tableName);
+      assertEquals("false", properties.get(Property.TABLE_BLOOM_ENABLED.getKey()));
+
+      context.tablePropUtil().setProperties(TableId.of(tid),
+          Map.of(Property.TABLE_BLOOM_ENABLED.getKey(), "true"));
+
+      // add a sleep to give the property change time to propagate
+      properties = client.tableOperations().getConfiguration(tableName);
+      while (!properties.get(Property.TABLE_BLOOM_ENABLED.getKey()).equals("true")) {

Review Comment:
   Could this be simplified to `while (properties.get(Property.TABLE_BLOOM_ENABLED.getKey()).equals("false"))`?



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