diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java index 9e1546c15dd..9e53765c026 100644 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java +++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java @@ -74,12 +74,9 @@ import org.apache.accumulo.core.util.Pair; import org.apache.accumulo.core.util.threads.Threads; import org.apache.accumulo.monitor.next.InformationFetcher; -import org.apache.accumulo.monitor.rest.bulkImports.BulkImport; -import org.apache.accumulo.monitor.rest.bulkImports.BulkImportInformation; import org.apache.accumulo.server.AbstractServer; import org.apache.accumulo.server.ServerContext; import org.apache.accumulo.server.util.TableInfoUtil; -import org.apache.accumulo.server.util.bulkCommand.ListBulk; import org.apache.zookeeper.KeeperException; import org.eclipse.jetty.ee10.servlet.ResourceServlet; import org.eclipse.jetty.ee10.servlet.ServletHolder; @@ -555,9 +552,6 @@ public static class CompactionStats { private final Supplier> compactionsSupplier = Suppliers.memoizeWithExpiration(this::fetchCompactions, expirationTimeMinutes, MINUTES); - private final Supplier bulkImportSupplier = - Suppliers.memoizeWithExpiration(this::computeBulkImports, expirationTimeMinutes, MINUTES); - /** * @return active tablet server scans. Values are cached and refresh after * {@link #expirationTimeMinutes}. @@ -581,20 +575,6 @@ public Map getCompactions() { return compactionsSupplier.get(); } - private BulkImport computeBulkImports() { - BulkImport bulkImport = new BulkImport(); - ListBulk.list(getContext(), bulkStatus -> { - bulkImport.addBulkImport( - new BulkImportInformation(bulkStatus.sourceDir(), bulkStatus.lastUpdate().toEpochMilli(), - bulkStatus.state(), bulkStatus.tableId(), bulkStatus.fateId())); - }); - return bulkImport; - } - - public BulkImport getBulkImports() { - return bulkImportSupplier.get(); - } - private Map fetchScans(Collection servers) { ServerContext context = getContext(); Map scans = new HashMap<>(); diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/bulkImports/BulkImport.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/bulkImports/BulkImport.java deleted file mode 100644 index 8512e1b90f9..00000000000 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/bulkImports/BulkImport.java +++ /dev/null @@ -1,43 +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. - */ -package org.apache.accumulo.monitor.rest.bulkImports; - -import java.util.ArrayList; -import java.util.List; - -/** - * BulkImport stores the bulk import and tserver bulk imports - * - * @since 2.0.0 - */ -public class BulkImport { - - // Variable names become JSON key - public List bulkImport = new ArrayList<>(); - - /** - * Adds a new bulk import to the array - * - * @param bulkImport new bulk import to add - */ - public void addBulkImport(BulkImportInformation bulkImport) { - this.bulkImport.add(bulkImport); - } - -} diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/bulkImports/BulkImportInformation.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/bulkImports/BulkImportInformation.java deleted file mode 100644 index cd84b0b34b8..00000000000 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/bulkImports/BulkImportInformation.java +++ /dev/null @@ -1,54 +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. - */ -package org.apache.accumulo.monitor.rest.bulkImports; - -import org.apache.accumulo.core.data.TableId; -import org.apache.accumulo.core.fate.FateId; -import org.apache.accumulo.server.util.bulkCommand.ListBulk; - -/** - * Stores bulk import in a JSON object - * - * @since 2.0.0 - */ -public class BulkImportInformation { - - // Variable names become JSON key - public final String filename; - public final long age; - public final ListBulk.BulkState state; - public final String tableId; - public final String fateId; - - /** - * Creates new bulk import object - * - * @param filename name of the bulk import file - * @param age age of the bulk import - * @param state state of the bulk import - */ - public BulkImportInformation(String filename, long age, ListBulk.BulkState state, TableId tableId, - FateId fateId) { - this.filename = filename; - this.age = age; - this.state = state; - this.tableId = tableId.canonical(); - this.fateId = fateId.canonical(); - } -} diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/bulkImports/BulkImportResource.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/bulkImports/BulkImportResource.java deleted file mode 100644 index 2a15b1ec75a..00000000000 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/bulkImports/BulkImportResource.java +++ /dev/null @@ -1,51 +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. - */ -package org.apache.accumulo.monitor.rest.bulkImports; - -import jakarta.inject.Inject; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.MediaType; - -import org.apache.accumulo.monitor.Monitor; - -/** - * The BulkImportResource is responsible for obtaining the information of the bulk import, and - * tablet server bulk import from the Monitor and creating the JSON objects with each - * - * @since 2.0.0 - */ -@Path("/bulkImports") -@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) -public class BulkImportResource { - - @Inject - private Monitor monitor; - - /** - * Generates bulk import and tserver bulk imports with the information from the Monitor - * - * @return JSON object with BulkImport information - */ - @GET - public BulkImport getTables() { - return monitor.getBulkImports(); - } -} 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 6a6caf95126..55e1e90efa8 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 @@ -328,24 +328,6 @@ public Map getCompactors() { return model; } - /** - * Returns the bulk import template - * - * @return Bulk Import model - */ - @GET - @Path("bulkImports") - @Template(name = "/default.ftl") - public Map getBulkImports() { - - Map model = getModel(); - model.put("title", "Bulk Imports"); - model.put("template", "bulkImport.ftl"); - model.put("js", "bulkImport.js"); - - return model; - } - /** * Returns the Fate template * diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/bulkImport.js b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/bulkImport.js deleted file mode 100644 index 6ff3beb4ae1..00000000000 --- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/bulkImport.js +++ /dev/null @@ -1,85 +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 bulkListTable; - -/** - * Fetches new data and updates DataTables with it - */ -function refreshBulkImport() { - ajaxReloadTable(bulkListTable); -} - -/** - * Used to redraw the page - */ -function refresh() { - refreshBulkImport(); -} - -/** - * Initializes the bulk import DataTables - */ -$(function () { - - const url = contextPath + 'rest/bulkImports'; - console.debug('REST url used to fetch data for the DataTables in bulkImport.js: ' + url); - - // Generates the manager bulk import status table - bulkListTable = $('#bulkListTable').DataTable({ - "ajax": { - "url": url, - "dataSrc": "bulkImport" - }, - "stateSave": true, - "autoWidth": false, - "columns": [{ - "data": "tableId", - "width": "5%" - }, - { - "data": "fateId", - "width": "25%" - }, - { - "data": "filename", - "width": "35%" - }, - { - "data": "age", - "width": "25%", - "render": function (data, type) { - var age = Number(data); - if (type === 'display') { - return age > 0 ? new Date(age) : '—'; - } - return age > 0 ? age : 0; - } - }, - { - "data": "state", - "width": "10%" - } - ] - }); - - refreshBulkImport(); - -}); 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 dafc9c68c18..d28a46c75a8 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 @@ -493,13 +493,6 @@ function getScans() { return getJSONForTable(REST_V2_PREFIX + '/scans', SCANS); } -/** - * REST GET call for the bulk imports, stores it on a sessionStorage variable - */ -function getBulkImports() { - return getJSONForTable(contextPath + 'rest/bulkImports', 'bulkImports'); -} - /** * REST GET call for the server stats, stores it on a sessionStorage variable */ diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/bulkImport.ftl b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/bulkImport.ftl deleted file mode 100644 index 8ae6cf9b5e7..00000000000 --- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/bulkImport.ftl +++ /dev/null @@ -1,42 +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}

-
-
-
-
- - - - - - - - - - - - -
Bulk Imports
Table ID Fate ID Directory Age State 
-
-
diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/navbar.ftl b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/navbar.ftl index 9de8837ffdc..c0a7d0a00f2 100644 --- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/navbar.ftl +++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/navbar.ftl @@ -54,7 +54,6 @@ Activity