[accumulo] branch main updated: Add VFS type mapping for new jar mime type (#2683)
This is an automated email from the ASF dual-hosted git repository. ctubbsii 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 838eccf83e Add VFS type mapping for new jar mime type (#2683) 838eccf83e is described below commit 838eccf83ee88d0716b88d021611b1fb85089491 Author: Christopher Tubbs AuthorDate: Fri May 6 20:44:45 2022 -0400 Add VFS type mapping for new jar mime type (#2683) Add VFS type mapping for the new jar mime type added in newer versions of Java 17, application/java-archive, to ensure it is associated with the "jar" scheme in VFS. This ensures VFS loads jars correctly when run on a newer version of Java. This fixes #2682 See related: https://issues.apache.org/jira/browse/VFS-819 --- .../accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java | 5 ++--- .../test/java/org/apache/accumulo/start/test/AccumuloDFSBase.java| 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java index 6b5a5de522..d797c0cf3b 100644 --- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java +++ b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java @@ -285,6 +285,7 @@ public class AccumuloVFSClassLoader { vfs.addExtensionMap("tbz2", "tar"); vfs.addExtensionMap("tgz", "tar"); vfs.addExtensionMap("bz2", "bz2"); +vfs.addMimeTypeMap("application/java-archive", "jar"); vfs.addMimeTypeMap("application/x-tar", "tar"); vfs.addMimeTypeMap("application/x-gzip", "gz"); vfs.addMimeTypeMap("application/zip", "zip"); @@ -426,9 +427,7 @@ public class AccumuloVFSClassLoader { private static synchronized ContextManager getContextManager() throws IOException { if (contextManager == null) { getClassLoader(); - contextManager = new ContextManager(generateVfs(), () -> { -return getClassLoader(); - }); + contextManager = new ContextManager(generateVfs(), AccumuloVFSClassLoader::getClassLoader); } return contextManager; diff --git a/start/src/test/java/org/apache/accumulo/start/test/AccumuloDFSBase.java b/start/src/test/java/org/apache/accumulo/start/test/AccumuloDFSBase.java index f070badd8e..a4f1e9a919 100644 --- a/start/src/test/java/org/apache/accumulo/start/test/AccumuloDFSBase.java +++ b/start/src/test/java/org/apache/accumulo/start/test/AccumuloDFSBase.java @@ -112,6 +112,7 @@ public class AccumuloDFSBase { vfs.addExtensionMap("tbz2", "tar"); vfs.addExtensionMap("tgz", "tar"); vfs.addExtensionMap("bz2", "bz2"); + vfs.addMimeTypeMap("application/java-archive", "jar"); vfs.addMimeTypeMap("application/x-tar", "tar"); vfs.addMimeTypeMap("application/x-gzip", "gz"); vfs.addMimeTypeMap("application/zip", "zip");
[accumulo] branch main updated (bbd32b1ad4 -> c356c93f5b)
This is an automated email from the ASF dual-hosted git repository. mmiller pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git from bbd32b1ad4 Bug fix for caption in tservers table in monitor (#2674) add c356c93f5b GC Blip Count Follow up Fixes (#2678) No new revisions were added by this update. Summary of changes: .../apache/accumulo/gc/GarbageCollectionAlgorithm.java | 12 .../org/apache/accumulo/gc/GarbageCollectionTest.java| 16 ++-- 2 files changed, 18 insertions(+), 10 deletions(-)
[accumulo] branch main updated: Bug fix for caption in tservers table in monitor (#2674)
This is an automated email from the ASF dual-hosted git repository. domgarguilo 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 bbd32b1ad4 Bug fix for caption in tservers table in monitor (#2674) bbd32b1ad4 is described below commit bbd32b1ad44512b8305d1273ed7c8c72de6d21ae Author: Dom G AuthorDate: Fri May 6 11:10:14 2022 -0400 Bug fix for caption in tservers table in monitor (#2674) * Patch bug with caption remaining highlighted --- .../accumulo/monitor/resources/js/tservers.js | 122 - .../apache/accumulo/monitor/templates/tservers.ftl | 6 +- 2 files changed, 71 insertions(+), 57 deletions(-) diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/tservers.js b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/tservers.js index b17cd153d9..223f768d16 100644 --- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/tservers.js +++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/tservers.js @@ -18,29 +18,18 @@ */ "use strict"; -var tserversList; +var tserversTable; +var recoveryList = []; + /** * Creates tservers initial table */ $(document).ready(function() { - - const recoveryList = [] - getRecoveryList().then(function () { -// fill recoveryList -JSON.parse(sessionStorage.recoveryList).recoveryList.forEach(entry => { - recoveryList.push(entry.server); -}); -// only show the note about highlighted rows if there are rows to highlight -if (recoveryList.length === 0) { - $('#recovery-caption').hide(); -} else { - $('#recovery-caption').show(); -} - }); + refreshRecoveryList(); // Create a table for tserver list -tserversList = $('#tservers').DataTable({ +tserversTable = $('#tservers').DataTable({ "ajax": { "url": '/rest/tservers', "dataSrc": "servers" @@ -92,10 +81,13 @@ $(document).ready(function() { // reset background of each row $(row).css('background-color', ''); -// return if current rows tserver is not recovering +// return if the current row's tserver is not recovering if (!recoveryList.includes(data.hostname)) return; +// only show the caption if we know there are rows in the tservers table +$('#recovery-caption').show(); + // highlight current row console.log('Highlighting row index:' + index + ' tserver:' + data.hostname); $(row).css('background-color', 'gold'); @@ -111,6 +103,7 @@ function refreshTServers() { getTServers().then(function() { refreshBadTServersTable(); refreshDeadTServersTable(); +refreshRecoveryList(); refreshTServersTable(); }); } @@ -126,56 +119,62 @@ function refresh() { * Generates the tservers rows */ function refreshBadTServersTable() { + $('#badtservers').hide(); // Hide table on each refresh + var data = sessionStorage.tservers === undefined ? - [] : JSON.parse(sessionStorage.tservers); +[] : JSON.parse(sessionStorage.tservers); clearTableBody('badtservers'); - if (data.length === 0 || data.badServers.length === 0) { -$('#badtservers').hide(); - } else { -$('#badtservers').show(); -$.each(data.badServers, function(key, val) { - var items = []; - items.push(createFirstCell(val.id, val.id)); - items.push(createRightCell(val.status, val.status)); - - $('', { -html: items.join('') - }).appendTo('#badtservers tbody'); -}); - } + // return if the table is empty + if (data.length === 0 || data.badServers.length === 0) +return; + + $('#badtservers').show(); + $.each(data.badServers, function (key, val) { +var items = []; +items.push(createFirstCell(val.id, val.id)); +items.push(createRightCell(val.status, val.status)); + +$('', { + html: items.join('') +}).appendTo('#badtservers tbody'); + }); } + /** * Generates the deadtservers rows */ function refreshDeadTServersTable() { + $('#deadtservers').hide(); // Hide table on each refresh + var data = sessionStorage.tservers === undefined ? - [] : JSON.parse(sessionStorage.tservers); +[] : JSON.parse(sessionStorage.tservers); clearTableBody('deadtservers'); - if (data.length === 0 || data.deadServers.length === 0) { -$('#deadtservers').hide(); - } else { -$('#deadtservers').show(); -$.each(data.deadServers, function(key, val) { - var items = []; - items.push(createFirstCell(val.server, val.server)); - - var date = new Date(val.lastStatus); - date = date.toLocaleString().split(' ').join(''); - items.push(createRightCell(val.lastStatus, date)); - items.push(createRightCell(val.status, val.status)); - items.push(createRightCell('',
[accumulo] branch main updated: Clean up bulkImport js (#2675)
This is an automated email from the ASF dual-hosted git repository. mmiller 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 c5ca1713d1 Clean up bulkImport js (#2675) c5ca1713d1 is described below commit c5ca1713d1f70b71effbfb1451a881590590437a Author: Mike Miller AuthorDate: Fri May 6 06:33:34 2022 -0400 Clean up bulkImport js (#2675) * Refactor bulkImport.js to be formatted properly and use concise jquery Co-authored-by: Dom G. --- .../accumulo/monitor/resources/js/bulkImport.js| 139 ++--- .../accumulo/monitor/resources/js/functions.js | 8 +- .../apache/accumulo/monitor/resources/js/global.js | 3 + .../apache/accumulo/monitor/resources/js/server.js | 3 +- .../accumulo/monitor/templates/bulkImport.ftl | 4 +- 5 files changed, 75 insertions(+), 82 deletions(-) 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 index bac1c7d581..5ef20d568c 100644 --- 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 @@ -16,99 +16,88 @@ * specific language governing permissions and limitations * under the License. */ +/* JSLint global definitions */ +/*global +$, document, sessionStorage, clearTableBody, EMPTY_ROW_THREE_CELLS, EMPTY_CELL, getBulkImports +*/ "use strict"; -/** - * Creates bulk import initial table - */ -$(document).ready(function() { - refreshBulkImport(); -}); - -/** - * Makes the REST calls, generates the tables with the new information - */ -function refreshBulkImport() { - getBulkImports().then(function() { -refreshBulkImportTable(); -refreshServerBulkTable(); - }); -} - -/** - * Used to redraw the page - */ -function refresh() { - refreshBulkImport(); -} - /** * Generates the manager bulk import status table */ function refreshBulkImportTable() { +$("#bulkListTable tbody").html(EMPTY_ROW_THREE_CELLS); - clearTableBody('managerBulkImportStatus'); - - /* - * Get the bulk import value obtained earlier, if it doesn't exists, - * create an empty array - */ - var data = sessionStorage.bulkImports === undefined ? - [] : JSON.parse(sessionStorage.bulkImports); +// Get the bulk import data from the session +var data = sessionStorage.bulkImports === undefined ? +[] : JSON.parse(sessionStorage.bulkImports); - /* If the data is empty, create an empty row, otherwise, - * create the rows for the table - */ - if (data.length === 0 || data.bulkImport.length === 0) { -$('', { - html: createEmptyRow(3, 'Empty') -}).appendTo('#managerBulkImportStatus tbody'); - } else { -$.each(data.bulkImport, function(key, val) { - var items = []; - items.push(createFirstCell(val.filename, val.filename)); - items.push(createRightCell(val.age, new Date(val.age))); - items.push(createRightCell(val.state, val.state)); - $('', { -html: items.join('') - }).appendTo('#managerBulkImportStatus tbody'); +// If the data is empty, clear table, otherwise populate +if (data.length === 0 || data.bulkImport.length === 0) { +return; +} +console.log("Populate bulkListTable with " + sessionStorage.bulkImports); +var tableBodyHtml = ""; +$.each(data.bulkImport, function (key, val) { +console.log("Append row " + key + " " + JSON.stringify(val) + " to bulkListTable"); +tableBodyHtml += "" + val.filename + ""; +tableBodyHtml += "" + new Date(val.age) + ""; +tableBodyHtml += "" + val.state + ""; }); - } +$("#bulkListTable tbody").html(tableBodyHtml); } /** - * Generates the bulk import status table + * Generates the bulkPerServerTable table */ function refreshServerBulkTable() { +$("#bulkPerServerTable tbody").html(EMPTY_ROW_THREE_CELLS); - clearTableBody('bulkImportStatus'); +// get the bulkImport data from sessionStorage +var data = sessionStorage.bulkImports === undefined ? +[] : JSON.parse(sessionStorage.bulkImports); - /* Get the bulk import value obtained earlier, if it doesn't exists, - * create an empty array - */ - var data = sessionStorage.bulkImports === undefined ? - [] : JSON.parse(sessionStorage.bulkImports); +// if data is empty, log an error because that means no tablet servers were found +if (data.length === 0 || data.tabletServerBulkImport.length === 0) { +console.error("No tablet servers."); +return; +} +var tableBodyHtml = ""; +$.each(data.tabletServerBulkImport, function (key, val) { +console.log("Append " + key + " " + JSON.stringify(val) + " to