|
40 | 40 | import org.apache.accumulo.core.client.admin.servers.ServerId;
|
41 | 41 | import org.apache.accumulo.core.compaction.thrift.TExternalCompaction;
|
42 | 42 | import org.apache.accumulo.core.compaction.thrift.TExternalCompactionList;
|
| 43 | +import org.apache.accumulo.core.data.TableId; |
43 | 44 | import org.apache.accumulo.core.data.TabletId;
|
44 | 45 | import org.apache.accumulo.core.dataImpl.KeyExtent;
|
45 | 46 | import org.apache.accumulo.core.dataImpl.TabletIdImpl;
|
@@ -154,6 +155,11 @@ public static class TableSummary {
|
154 | 155 | private final AtomicLong totalHostedTablets = new AtomicLong();
|
155 | 156 | private final AtomicLong totalSuspendedTablets = new AtomicLong();
|
156 | 157 | private final AtomicLong totalUnassignedTablets = new AtomicLong();
|
| 158 | + private String tableName; |
| 159 | + |
| 160 | + public TableSummary(String tableName) { |
| 161 | + this.tableName = tableName; |
| 162 | + } |
157 | 163 |
|
158 | 164 | public long getTotalEntries() {
|
159 | 165 | return totalEntries.get();
|
@@ -207,6 +213,10 @@ public long getTotalUnassignedTablets() {
|
207 | 213 | return totalUnassignedTablets.get();
|
208 | 214 | }
|
209 | 215 |
|
| 216 | + public String getTableName() { |
| 217 | + return tableName; |
| 218 | + } |
| 219 | + |
210 | 220 | public void addTablet(TabletInformation info) {
|
211 | 221 | totalEntries.addAndGet(info.getEstimatedEntries());
|
212 | 222 | totalSizeOnDisk.addAndGet(info.getEstimatedSize());
|
@@ -327,8 +337,8 @@ public Set<String> getNotRespondedHosts() {
|
327 | 337 | new AtomicReference<>();
|
328 | 338 |
|
329 | 339 | // Table Information
|
330 |
| - private final Map<String,TableSummary> tables = new ConcurrentHashMap<>(); |
331 |
| - private final Map<String,List<TabletInformation>> tablets = new ConcurrentHashMap<>(); |
| 340 | + private final Map<TableId,TableSummary> tables = new ConcurrentHashMap<>(); |
| 341 | + private final Map<TableId,List<TabletInformation>> tablets = new ConcurrentHashMap<>(); |
332 | 342 |
|
333 | 343 | // Deployment Overview
|
334 | 344 | private final Map<String,Map<String,ProcessSummary>> deployment = new ConcurrentHashMap<>();
|
@@ -460,11 +470,11 @@ public void processExternalCompactionList(Map<String,TExternalCompactionList> ru
|
460 | 470 | oldestCompactions.set(running);
|
461 | 471 | }
|
462 | 472 |
|
463 |
| - public void processTabletInformation(String tableName, TabletInformation info) { |
| 473 | + public void processTabletInformation(TableId tableId, String tableName, TabletInformation info) { |
464 | 474 | final SanitizedTabletInformation sti = new SanitizedTabletInformation(info);
|
465 |
| - tablets.computeIfAbsent(tableName, (t) -> Collections.synchronizedList(new ArrayList<>())) |
| 475 | + tablets.computeIfAbsent(tableId, (t) -> Collections.synchronizedList(new ArrayList<>())) |
466 | 476 | .add(sti);
|
467 |
| - tables.computeIfAbsent(tableName, (t) -> new TableSummary()).addTablet(sti); |
| 477 | + tables.computeIfAbsent(tableId, (t) -> new TableSummary(tableName)).addTablet(sti); |
468 | 478 | if (sti.getEstimatedEntries() == 0) {
|
469 | 479 | suggestions.add("Tablet " + sti.getTabletId().toString() + " (tid: "
|
470 | 480 | + sti.getTabletId().getTable() + ") may have zero entries and could be merged.");
|
@@ -582,12 +592,12 @@ public List<TExternalCompaction> getCompactions(String group) {
|
582 | 592 | return list.getCompactions();
|
583 | 593 | }
|
584 | 594 |
|
585 |
| - public Map<String,TableSummary> getTables() { |
| 595 | + public Map<TableId,TableSummary> getTables() { |
586 | 596 | return this.tables;
|
587 | 597 | }
|
588 | 598 |
|
589 |
| - public List<TabletInformation> getTablets(String table) { |
590 |
| - return this.tablets.get(table); |
| 599 | + public List<TabletInformation> getTablets(TableId tableId) { |
| 600 | + return this.tablets.get(tableId); |
591 | 601 | }
|
592 | 602 |
|
593 | 603 | public Map<String,Map<String,ProcessSummary>> getDeploymentOverview() {
|
|
0 commit comments