Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A69F3200B5B for ; Fri, 22 Jul 2016 04:58:57 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A56D5160A73; Fri, 22 Jul 2016 02:58:57 +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 75271160A9B for ; Fri, 22 Jul 2016 04:58:56 +0200 (CEST) Received: (qmail 75940 invoked by uid 500); 22 Jul 2016 02:58:55 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 75402 invoked by uid 99); 22 Jul 2016 02:58:55 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jul 2016 02:58:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 44065E1101; Fri, 22 Jul 2016 02:58:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ctubbsii@apache.org To: commits@accumulo.apache.org Date: Fri, 22 Jul 2016 02:59:10 -0000 Message-Id: <731e1b7a413e496bbee1e3c17a61c427@git.apache.org> In-Reply-To: <8930e8a27601403ca60b6d8ca8e92dd7@git.apache.org> References: <8930e8a27601403ca60b6d8ca8e92dd7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [16/16] accumulo git commit: Merge branch '1.8' archived-at: Fri, 22 Jul 2016 02:58:57 -0000 Merge branch '1.8' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/2f8c8e7a Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/2f8c8e7a Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/2f8c8e7a Branch: refs/heads/master Commit: 2f8c8e7a4ae79aafd0653c420c0a1f3d7f50279b Parents: faa92c5 c587a6f Author: Christopher Tubbs Authored: Thu Jul 21 22:58:44 2016 -0400 Committer: Christopher Tubbs Committed: Thu Jul 21 22:58:44 2016 -0400 ---------------------------------------------------------------------- .../core/file/blockfile/impl/CachableBlockFile.java | 2 +- .../minicluster/impl/MiniAccumuloClusterControl.java | 2 +- .../org/apache/accumulo/master/TabletGroupWatcher.java | 11 +++++------ .../apache/accumulo/shell/commands/TablesCommand.java | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/2f8c8e7a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java ---------------------------------------------------------------------- diff --cc server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java index fa8087f,76fda21..9d8a1d1 --- a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java +++ b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java @@@ -27,9 -27,9 +27,10 @@@ import java.util.Iterator import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Optional; import java.util.Set; import java.util.SortedMap; + import java.util.SortedSet; import java.util.TreeMap; import java.util.TreeSet; import java.util.concurrent.TimeUnit; @@@ -91,12 -93,9 +94,8 @@@ import org.apache.hadoop.fs.Path import org.apache.hadoop.io.Text; import org.apache.thrift.TException; -import com.google.common.base.Optional; + import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.Iterators; - import org.apache.accumulo.core.conf.Property; - import org.apache.accumulo.server.conf.TableConfiguration; - import static java.lang.Math.min; - import java.util.SortedSet; - import static java.lang.Math.min; abstract class TabletGroupWatcher extends Daemon { // Constants used to make sure assignment logging isn't excessive in quantity or size http://git-wip-us.apache.org/repos/asf/accumulo/blob/2f8c8e7a/shell/src/main/java/org/apache/accumulo/shell/commands/TablesCommand.java ---------------------------------------------------------------------- diff --cc shell/src/main/java/org/apache/accumulo/shell/commands/TablesCommand.java index 0390c4e,397b450..8bf96e7 --- a/shell/src/main/java/org/apache/accumulo/shell/commands/TablesCommand.java +++ b/shell/src/main/java/org/apache/accumulo/shell/commands/TablesCommand.java @@@ -51,20 -54,28 +51,20 @@@ public class TablesCommand extends Comm Map tables = shellState.getConnector().tableOperations().tableIdMap(); // filter only specified namespace - tables = Maps.filterKeys(tables, new Predicate() { - @Override - public boolean apply(String tableName) { - return namespace == null || Tables.qualify(tableName).getFirst().equals(namespace); - } - }); + tables = Maps.filterKeys(tables, tableName -> namespace == null || Tables.qualify(tableName).getFirst().equals(namespace)); final boolean sortByTableId = cl.hasOption(sortByTableIdOption.getOpt()); -- tables = new TreeMap<>((sortByTableId ? MapUtils.invertMap(tables) : tables)); ++ tables = new TreeMap((sortByTableId ? MapUtils.invertMap(tables) : tables)); - Iterator it = Iterators.transform(tables.entrySet().iterator(), new Function,String>() { - @Override - public String apply(Map.Entry entry) { - String tableName = String.valueOf(sortByTableId ? entry.getValue() : entry.getKey()); - String tableId = String.valueOf(sortByTableId ? entry.getKey() : entry.getValue()); - if (namespace != null) - tableName = Tables.qualify(tableName).getSecond(); - if (cl.hasOption(tableIdOption.getOpt())) - return String.format(NAME_AND_ID_FORMAT, tableName, tableId); - else - return tableName; - } + Iterator it = Iterators.transform(tables.entrySet().iterator(), entry -> { + String tableName = String.valueOf(sortByTableId ? entry.getValue() : entry.getKey()); + String tableId = String.valueOf(sortByTableId ? entry.getKey() : entry.getValue()); + if (namespace != null) + tableName = Tables.qualify(tableName).getSecond(); + if (cl.hasOption(tableIdOption.getOpt())) + return String.format(NAME_AND_ID_FORMAT, tableName, tableId); + else + return tableName; }); shellState.printLines(it, !cl.hasOption(disablePaginationOpt.getOpt()));