From aa419f96dd626ce49ccfc5f4cc73bbbbc782a715 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Tue, 23 Sep 2008 04:04:50 +0000 Subject: [PATCH] HBASE-886, HBASE-895 Sort the tables in the web UI [shell] 'list' command should emit a sorted list of tables git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@698088 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ .../org/apache/hadoop/hbase/client/HConnectionManager.java | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ac9e0806c2b..791d71046f5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,8 @@ Release 0.19.0 - Unreleased (Sishen Freecity via Stack) HBASE-894 [shell] Should be able to copy-paste table description to create new table (Sishen Freecity via Stack) + HBASE-886, HBASE-895 Sort the tables in the web UI, [shell] 'list' command + should emit a sorted list of tables (Krzysztof Szlapinski via Stack) NEW FEATURES diff --git a/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java b/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java index 1f46a2c6d2c..d6080361c62 100644 --- a/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java +++ b/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java @@ -24,9 +24,9 @@ import java.lang.reflect.UndeclaredThrowableException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.logging.Log; @@ -277,8 +277,8 @@ public class HConnectionManager implements HConstants { public HTableDescriptor[] listTables() throws IOException { getMaster(); - final HashSet uniqueTables = - new HashSet(); + final TreeSet uniqueTables = + new TreeSet(); MetaScannerVisitor visitor = new MetaScannerVisitor() {