This is an automated email from the ASF dual-hosted git repository.
dlmarion pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 2310917cb7 Modified monitor code to use table names instead of table
id (#6410)
2310917cb7 is described below
commit 2310917cb75c825f33ed940d81af58ae246b4854
Author: Dave Marion <[email protected]>
AuthorDate: Mon Jun 8 16:56:07 2026 -0400
Modified monitor code to use table names instead of table id (#6410)
Closes #6399
---
.../apache/accumulo/monitor/next/SystemInformation.java | 9 +++++++--
.../org/apache/accumulo/monitor/resources/js/ec.js | 14 +++++++++++++-
.../apache/accumulo/monitor/resources/js/functions.js | 16 ++++++++++++++++
.../org/apache/accumulo/monitor/resources/js/recovery.js | 6 ++++--
.../org/apache/accumulo/monitor/resources/js/scans.js | 6 ++++--
.../org/apache/accumulo/monitor/templates/ec.ftl | 10 +---------
.../org/apache/accumulo/monitor/templates/recovery.ftl | 2 +-
.../org/apache/accumulo/monitor/templates/scans.ftl | 2 +-
8 files changed, 47 insertions(+), 18 deletions(-)
diff --git
a/server/monitor/src/main/java/org/apache/accumulo/monitor/next/SystemInformation.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/next/SystemInformation.java
index a6077e1477..0685431967 100644
---
a/server/monitor/src/main/java/org/apache/accumulo/monitor/next/SystemInformation.java
+++
b/server/monitor/src/main/java/org/apache/accumulo/monitor/next/SystemInformation.java
@@ -1318,8 +1318,13 @@ public class SystemInformation {
}
}
if (empty > 0) {
- addAlert(Info, Table,
- "Table " + tid + " may have " + empty + " tablets that could be
merged.");
+ try {
+ addAlert(Info, Table, "Table " + ctx.getQualifiedTableName(tid) + "
may have " + empty
+ + " tablets that could be merged.");
+ } catch (TableNotFoundException e) {
+ addAlert(Info, Table,
+ "Table " + tid + " may have " + empty + " tablets that could be
merged.");
+ }
}
});
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/ec.js
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/ec.js
index 09f066a08c..35d85e6f1f 100644
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/ec.js
+++
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/ec.js
@@ -28,6 +28,10 @@ $(function () {
sessionStorage.ecDetailsJSON = JSON.stringify([]);
}
+ getTables().then(function () {
+ computeTableMap();
+ });
+
// display datatables errors in the console instead of in alerts
$.fn.dataTable.ext.errMode = 'throw';
@@ -47,6 +51,10 @@ $(function () {
"stateSave": true,
"dom": 't<"align-left"l>p',
"columnDefs": [{
+ targets: '_all',
+ defaultContent: '—'
+ },
+ {
"targets": "duration",
"render": function (data, type, row) {
if (type === 'display') data = timeDuration(data);
@@ -77,7 +85,8 @@ $(function () {
},
{
"data": "tableId",
- "name": tableIdColumnName
+ "name": tableIdColumnName,
+ "render": renderTableLink
},
{
"data": "ecid",
@@ -298,6 +307,9 @@ $(function () {
* Used to redraw the page
*/
function refresh() {
+ getTables().then(function () {
+ computeTableMap();
+ });
refreshManagerStatus();
refreshRunningCompactions();
}
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js
index f8bc91c825..597144a211 100644
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js
+++
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js
@@ -47,6 +47,22 @@ const SCANS = 'scans';
const LAST_UPDATE = 'lastUpdate';
var STATUS_REQUEST = null;
+var TABLE_MAP = {};
+
+function computeTableMap() {
+ TABLE_MAP = {};
+ var tables = getStoredJson('tables', {});
+ return Object.keys(tables).map(function (key) {
+ var tableInfo = tables[key];
+ var name = tableInfo.tableName;
+ TABLE_MAP[key] = name;
+ });
+}
+
+function renderTableLink(data, type, row) {
+ var tableName = TABLE_MAP[data];
+ return '<a class="link-body-emphasis" href="tables/' + data + '">' +
tableName + '</a>';
+}
// Override Length Menu options for dataTables
if ($.fn && $.fn.dataTable) {
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/recovery.js
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/recovery.js
index 904715f81a..1b0d9904dd 100644
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/recovery.js
+++
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/recovery.js
@@ -53,7 +53,8 @@ function getReplaying() {
}
function refresh() {
- $.when(getRecoveryInformation()).then(function () {
+ $.when(getRecoveryInformation(), getTables()).then(function () {
+ computeTableMap();
ajaxReloadTable(overviewDataTable);
ajaxReloadTable(tabletDataTable);
ajaxReloadTable(sortingDataTable);
@@ -129,7 +130,8 @@ $(function () {
defaultContent: '—'
}],
"columns": [{
- "data": "tableId"
+ "data": "tableId",
+ "render": renderTableLink
},
{
"data": "tabletId"
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/scans.js
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/scans.js
index 002afcbdca..0f3bddee07 100644
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/scans.js
+++
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/scans.js
@@ -65,7 +65,8 @@ $(function () {
"data": "resourceGroup"
},
{
- "data": "tableId"
+ "data": "tableId",
+ "render": renderTableLink
},
{
"data": "sessionId"
@@ -97,7 +98,8 @@ $(function () {
* Used to redraw the page
*/
function refresh() {
- getScans().then(function () {
+ $.when(getScans(), getTables()).then(function () {
+ computeTableMap();
refreshScansTable();
});
}
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/ec.ftl
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/ec.ftl
index 87280e491b..5fb41c8adf 100644
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/ec.ftl
+++
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/ec.ftl
@@ -28,14 +28,6 @@
<div class="col-xs-12">
<table id="runningTable" class="table caption-top table-bordered
table-striped table-condensed">
<caption>
- <div class="d-flex justify-content-between align-items-center
mb-3">
- <div>
- <span class="table-caption">Running
Compactions</span>
- <a class="link-body-emphasis"
href="javascript:refreshRunningCompactions();">
- <span style="font-size: 1.5em; color: black;" class="bi
bi-arrow-repeat"></span>
- </a>
- </div>
- </div>
<div class="accordion" id="filterAccordion">
<div class="accordion-item">
<h2 class="accordion-header" id="filterHeading">
@@ -91,7 +83,7 @@
<th title="The type of compaction.">Kind</th>
<th title="The status returned by the last
update.">Status</th>
<th title="The name of the queue this compactor is
assigned.">Queue</th>
- <th title="The ID of the table being compacted.">Table
ID</th>
+ <th title="The ID of the table being compacted.">Table
Name</th>
<th title="The ID of the running external
compaction.">ECID</th>
<th title="The number of files being compacted."># of
Files</th>
<th title="The progress of the compaction."
class="progBar">Progress</th>
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/recovery.ftl
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/recovery.ftl
index 2a9e36b983..34a353f22c 100644
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/recovery.ftl
+++
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/recovery.ftl
@@ -41,7 +41,7 @@
</caption>
<thead>
<tr>
- <th>Table Id</th>
+ <th>Table Name</th>
<th>TabletId</th>
<th>Tablet Directory</th>
<th>Location</th>
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/scans.ftl
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/scans.ftl
index 0609885d9c..34fac0f68e 100644
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/scans.ftl
+++
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/scans.ftl
@@ -28,7 +28,7 @@
<th class="firstcell">Server</th>
<th>Server Type</th>
<th>Resource Group</th>
- <th>Table ID</th>
+ <th>Table Name</th>
<th>Session ID</th>
<th>Client</th>
<th>User</th>