accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject [accumulo] branch master updated: ACCUMULO-4766 Fix Monitor table stats
Date Tue, 19 Dec 2017 21:14:10 GMT
This is an automated email from the ASF dual-hosted git repository.

mmiller pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/master by this push:
     new 37c08d8  ACCUMULO-4766 Fix Monitor table stats
37c08d8 is described below

commit 37c08d8e674a73174656f87e82d1b590ff771bcf
Author: Mike Miller <mmiller@apache.org>
AuthorDate: Tue Dec 19 16:12:09 2017 -0500

    ACCUMULO-4766 Fix Monitor table stats
---
 .../org/apache/accumulo/monitor/rest/tables/TablesResource.java  | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/tables/TablesResource.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/tables/TablesResource.java
index 479b7f7..d0dae38 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/tables/TablesResource.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/tables/TablesResource.java
@@ -109,12 +109,12 @@ public class TablesResource {
    * @return Table list
    */
   private static TablesList generateTables(TablesList tableNamespace) {
-    Instance inst = Monitor.getContext().getInstance();
-    SortedMap<String,TableInfo> tableStats = new TreeMap<>();
+    SortedMap<Table.ID,TableInfo> tableStats = new TreeMap<>();
 
     if (Monitor.getMmi() != null && Monitor.getMmi().tableMap != null)
       for (Entry<String,TableInfo> te : Monitor.getMmi().tableMap.entrySet())
-        tableStats.put(Tables.getPrintableTableInfoFromId(inst, Table.ID.of(te.getKey())),
te.getValue());
+        tableStats.put(Table.ID.of(te.getKey()), te.getValue());
+
     Map<String,Double> compactingByTable = TableInfoUtil.summarizeTableStats(Monitor.getMmi());
     TableManager tableManager = TableManager.getInstance();
     List<TableInformation> tables = new ArrayList<>();
@@ -123,7 +123,8 @@ public class TablesResource {
     for (Entry<String,Table.ID> entry : Tables.getNameToIdMap(HdfsZooInstance.getInstance()).entrySet())
{
       String tableName = entry.getKey();
       Table.ID tableId = entry.getValue();
-      TableInfo tableInfo = tableStats.get(tableName);
+      TableInfo tableInfo = tableStats.get(tableId);
+
       if (null != tableInfo) {
         Double holdTime = compactingByTable.get(tableId.canonicalID());
         if (holdTime == null)

-- 
To stop receiving notification emails like this one, please contact
['"commits@accumulo.apache.org" <commits@accumulo.apache.org>'].

Mime
View raw message