From notifications-return-41819-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Tue Jan 30 21:03:05 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id DD56118061A for ; Tue, 30 Jan 2018 21:03:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CA54A160C55; Tue, 30 Jan 2018 20:03:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 237E2160C2A for ; Tue, 30 Jan 2018 21:03:04 +0100 (CET) Received: (qmail 81894 invoked by uid 500); 30 Jan 2018 20:03:04 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 81881 invoked by uid 99); 30 Jan 2018 20:03:04 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jan 2018 20:03:04 +0000 From: GitBox To: notifications@accumulo.apache.org Subject: [GitHub] jmark99 commented on a change in pull request #370: ACCUMULO-4772 Update shell to use NewTableConfiguration methods Message-ID: <151734258372.15601.1323159837724586801.gitbox@gitbox.apache.org> jmark99 commented on a change in pull request #370: ACCUMULO-4772 Update shell to use NewTableConfiguration methods URL: https://github.com/apache/accumulo/pull/370#discussion_r164862676 ########## File path: test/src/main/java/org/apache/accumulo/test/ShellServerIT.java ########## @@ -2020,4 +2022,143 @@ public void testSummarySelection() throws Exception { // check that there are two files, with none having extra summary info assertMatches(output, "(?sm).*^.*total[:]2[,]\\s+missing[:]0[,]\\s+extra[:]0.*$.*"); } + + @Test + public void testCreateTableWithLocalityGroups() throws Exception { + final String table = name.getMethodName(); + ts.exec("createtable " + table + " -l locg1=fam1,fam2", true); + Connector connector = getConnector(); + Map> lMap = connector.tableOperations().getLocalityGroups(table); + Set expectedColFams = new HashSet<>(Arrays.asList(new Text("fam1"), new Text("fam2"))); + for (Entry> entry : lMap.entrySet()) { + Assert.assertTrue(entry.getKey().equals("locg1")); + Assert.assertTrue(entry.getValue().containsAll(expectedColFams)); + } + ts.exec("deletetable -f " + table); + } + + /** + * Due to the existing complexity of the createtable command, the createtable help only displays an example of setting one locality group. It is possible to + * set multiple groups if needed. This test verifies that capability. + */ + @Test + public void testCreateTableWithMultipleLocalityGroups() throws Exception { + final String table = name.getMethodName(); + ts.exec("createtable " + table + " -l locg1=fam1,fam2 locg2=colfam1", true); Review comment: The space enables splitting of the parameters so that multiple groups can be parsed easily. It mimics the format of the setgroups command: setgroups ={,}{ ={,}} [-?] [-t ]. ---------------------------------------------------------------- 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