From afdd05bb78a034c23d588fb96b45335876a03bd9 Mon Sep 17 00:00:00 2001 From: Amanda Villarreal Date: Wed, 19 Aug 2026 14:44:30 -0500 Subject: [PATCH 1/3] Remove unused monitor endpoint /compactions --- .../accumulo/monitor/view/WebViews.java | 18 ---- .../monitor/resources/js/compactions.js | 89 ------------------- .../monitor/templates/compactions.ftl | 41 --------- 3 files changed, 148 deletions(-) delete mode 100644 server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/compactions.js delete mode 100644 server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/compactions.ftl diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java index 2dafa85d677..267d891c9b9 100644 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java +++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java @@ -291,24 +291,6 @@ public Map getScans() { return model; } - /** - * Returns the compactions template - * - * @return Scans model - */ - @GET - @Path("compactions") - @Template(name = "/default.ftl") - public Map getCompactions() { - - Map model = getModel(); - model.put("title", "Active Compactions"); - model.put("template", "compactions.ftl"); - model.put("js", "compactions.js"); - - return model; - } - /** * Returns the active compactions template. * diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/compactions.js b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/compactions.js deleted file mode 100644 index 62108d86ff3..00000000000 --- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/compactions.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -"use strict"; - -var compactionsList; -/** - * Creates active compactions table - */ -$(function () { - // Create a table for compactions list - compactionsList = new DataTable('#compactionsList', { - "ajax": { - "url": contextPath + 'rest/compactions', - "dataSrc": "compactions" - }, - "stateSave": true, - "layout": { - "topStart": null, - "topEnd": null, - "bottomStart": "pageLength", - "bottomEnd": "paging" - }, - "columnDefs": [{ - "targets": "duration", - "render": function (data, type, row) { - if (type === 'display') data = timeDuration(data); - return data; - } - }, - { - "targets": "date", - "render": function (data, type, row) { - if (type === 'display') data = dateFormat(data); - return data; - } - } - ], - "columns": [{ - "data": "server", - "type": "html", - "render": function (data, type, row, meta) { - if (type === 'display') { - data = renderServerMetricsLink('COMPACTOR', '', row.server); - } - return data; - } - }, - { - "data": "count" - }, - { - "data": "oldest" - }, - { - "data": "fetched" - }, - ] - }); -}); - -/** - * Generates the compactions table - */ -function refreshCompactionsTable() { - if (compactionsList) compactionsList.ajax.reload(null, false); // user paging is not reset on reload -} - -/** - * Used to redraw the page - */ -function refresh() { - refreshCompactionsTable(); -} diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/compactions.ftl b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/compactions.ftl deleted file mode 100644 index 72a32cbe5eb..00000000000 --- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/compactions.ftl +++ /dev/null @@ -1,41 +0,0 @@ -<#-- - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - ---> -
-
-

${title}

-
-
-
-
- - - - - - - - - - - -
Compactions
Server Oldest Age Fetched
-
-
From d4f41d272c15219720b872a5fefee903925802f0 Mon Sep 17 00:00:00 2001 From: Amanda Villarreal Date: Thu, 20 Aug 2026 12:05:38 -0500 Subject: [PATCH 2/3] Remove unused endpoint /problems --- .../accumulo/monitor/view/WebViews.java | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java index 267d891c9b9..4823ec59c3c 100644 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java +++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java @@ -419,30 +419,4 @@ public Map getTables(@PathParam(TABLEID_PARAM_KEY) @NotNull @Patt return model; } - - /** - * Returns problem report template - * - * @param table Table ID to display problem details - * @return Problem report model - */ - @GET - @Path("problems") - @Template(name = "/default.ftl") - public Map getProblems( - @QueryParam(TABLE_PARAM_KEY) @Pattern(regexp = ALPHA_NUM_REGEX_BLANK_OK) String table) { - - Map model = getModel(); - model.put("title", "Per-Table Problem Report"); - - model.put("template", "problems.ftl"); - model.put("js", "problems.js"); - - if (table != null && !table.isBlank()) { - model.put("table", table); - } - - return model; - } - } From af5a902d77c8aef7839b68ed5a5b28afcce73850 Mon Sep 17 00:00:00 2001 From: Dom Garguilo Date: Thu, 20 Aug 2026 14:40:31 -0400 Subject: [PATCH 3/3] Formatting --- .../src/main/java/org/apache/accumulo/monitor/view/WebViews.java | 1 - 1 file changed, 1 deletion(-) diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java index 4823ec59c3c..8694c4d7972 100644 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java +++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java @@ -18,7 +18,6 @@ */ package org.apache.accumulo.monitor.view; -import static org.apache.accumulo.monitor.util.ParameterValidator.ALPHA_NUM_REGEX_BLANK_OK; import static org.apache.accumulo.monitor.util.ParameterValidator.ALPHA_NUM_REGEX_TABLE_ID; import static org.apache.accumulo.monitor.util.ParameterValidator.HOSTNAME_PORT_REGEX;