fluo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] keith-turner commented on a change in pull request #960: Use NewTableConfiguration (and also trivial code cleanup)
Date Thu, 01 Jan 1970 00:00:00 GMT
keith-turner commented on a change in pull request #960: Use NewTableConfiguration (and also
trivial code cleanup)
URL: https://github.com/apache/fluo/pull/960#discussion_r150136202
 
 

 ##########
 File path: modules/integration/src/test/java/org/apache/fluo/integration/client/FluoAdminImplIT.java
 ##########
 @@ -92,6 +102,23 @@ public void testInitializeConfig() throws Exception {
       InitializationOptions opts =
           new InitializationOptions().setClearZookeeper(true).setClearTable(true);
       admin.initialize(opts);
+
+      // verify locality groups were set on the table
+      Instance inst =
+          new ZooKeeperInstance(config.getAccumuloInstance(), config.getAccumuloZookeepers());
+      Connector conn = inst.getConnector(config.getAccumuloUser(),
+          new PasswordToken(config.getAccumuloPassword()));
+      Map<String, Set<Text>> localityGroups =
+          conn.tableOperations().getLocalityGroups(config.getAccumuloTable());
+      Assert.assertEquals("Unexpected locality group count.", 1, localityGroups.size());
+      Entry<String, Set<Text>> localityGroup = localityGroups.entrySet().iterator().next();
 
 Review comment:
   I think using guava's Iterables.getOnlyElement could shorten this test a bit.  Since that
guava method throws an exception if the Iterable does not have only one element, then there
is no need to check for that case.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message