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_r150136309
 
 

 ##########
 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();
+      Assert.assertEquals("'notify' locality group not found.",
+          ColumnConstants.NOTIFY_LOCALITY_GROUP_NAME, localityGroup.getKey());
+      Assert.assertEquals("'notify' locality group does not contain exactly 1 column family.",
1,
+          localityGroup.getValue().size());
+      Text colFam = localityGroup.getValue().iterator().next();
 
 Review comment:
   Could also use Iterables.getOnlyElement here.

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