This is an automated email from the ASF dual-hosted git repository. kturner 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 69f226e9a5 improves bulk import error message (#5172) 69f226e9a5 is described below commit 69f226e9a578a84bcf9771dc0465ceefab520796 Author: Keith Turner <ktur...@apache.org> AuthorDate: Thu Dec 12 16:24:37 2024 -0500 improves bulk import error message (#5172) For the case when a bulk import exceeds the configured files per tablet limit improves the error message to include range info and the relevant property name. --- core/src/main/java/org/apache/accumulo/core/fate/Fate.java | 4 ++-- .../accumulo/manager/tableOps/bulkVer2/PrepBulkImport.java | 6 +++--- .../java/org/apache/accumulo/test/functional/BulkNewIT.java | 11 +++++++++++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/fate/Fate.java b/core/src/main/java/org/apache/accumulo/core/fate/Fate.java index fc405920d5..0be6b50eaa 100644 --- a/core/src/main/java/org/apache/accumulo/core/fate/Fate.java +++ b/core/src/main/java/org/apache/accumulo/core/fate/Fate.java @@ -263,8 +263,8 @@ public class Fate<T> { // as a warning. They're a normal, handled failure condition. if (e instanceof AcceptableException) { var tableOpEx = (AcceptableThriftTableOperationException) e; - log.debug(msg + " for {}({}) {}", tableOpEx.getTableName(), tableOpEx.getTableId(), - tableOpEx.getDescription()); + log.info("{} for table:{}({}) saw acceptable exception: {}", msg, tableOpEx.getTableName(), + tableOpEx.getTableId(), tableOpEx.getDescription()); } else { log.warn(msg, e); } diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/PrepBulkImport.java b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/PrepBulkImport.java index b2d3521735..c7a9d03540 100644 --- a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/PrepBulkImport.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/PrepBulkImport.java @@ -203,9 +203,9 @@ public class PrepBulkImport extends ManagerRepo { if (maxFilesPerTablet > 0 && currRange.getValue().getSize() > maxFilesPerTablet) { throw new AcceptableThriftTableOperationException(tableId, null, TableOperation.BULK_IMPORT, TableOperationExceptionType.OTHER, - "Attempted to import " + currRange.getValue().getSize() - + " files into a single tablet which exceeds the configured max of " - + maxFilesPerTablet); + "Attempted to import " + currRange.getValue().getSize() + " files into tablets in range " + + currRange.getKey() + " which exceeds the configured max files per tablet of " + + maxFilesPerTablet + " from " + Property.TABLE_BULK_MAX_TABLET_FILES.getKey()); } } diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BulkNewIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BulkNewIT.java index d2fa75ff26..f5896e1119 100644 --- a/test/src/main/java/org/apache/accumulo/test/functional/BulkNewIT.java +++ b/test/src/main/java/org/apache/accumulo/test/functional/BulkNewIT.java @@ -428,6 +428,8 @@ public class BulkNewIT extends SharedMiniClusterBase { newTableConf.setProperties(props); client.tableOperations().create(tableName, newTableConf); + var tableId = ((ClientContext) client).getTableId(tableName); + String dir = getDir("/testBulkFileMFP-"); for (int i = 4; i < 8; i++) { @@ -450,6 +452,9 @@ public class BulkNewIT extends SharedMiniClusterBase { // message should contain the limit of 5 and the number of files attempted to import 6 assertTrue(msg.contains(" 5"), msg); assertTrue(msg.contains(" 6"), msg); + // error should include range information + assertTrue(msg.contains(tableId + "<<"), msg); + assertTrue(msg.contains(" " + Property.TABLE_BULK_MAX_TABLET_FILES.getKey()), msg); // ensure no data was added to table verifyData(client, tableName, 40, 79, false); @@ -476,6 +481,8 @@ public class BulkNewIT extends SharedMiniClusterBase { // message should contain the limit of 5 and the number of files attempted to import 7 assertTrue(msg.contains(" 5"), msg); assertTrue(msg.contains(" 7"), msg); + assertTrue(msg.contains(tableId + ";0100<"), msg); + assertTrue(msg.contains(" " + Property.TABLE_BULK_MAX_TABLET_FILES.getKey()), msg); verifyData(client, tableName, 40, 79, false); // try the middle tablet @@ -496,6 +503,8 @@ public class BulkNewIT extends SharedMiniClusterBase { // message should contain the limit of 5 and the number of files attempted to import 6 assertTrue(msg.contains(" 5"), msg); assertTrue(msg.contains(" 6"), msg); + assertTrue(msg.contains(tableId + ";0200;0100"), msg); + assertTrue(msg.contains(" " + Property.TABLE_BULK_MAX_TABLET_FILES.getKey()), msg); verifyData(client, tableName, 40, 79, false); // try the last tablet @@ -516,6 +525,8 @@ public class BulkNewIT extends SharedMiniClusterBase { // message should contain the limit of 5 and the number of files attempted to import 7 assertTrue(msg.contains(" 5"), msg); assertTrue(msg.contains(" 7"), msg); + assertTrue(msg.contains(tableId + "<;0200"), msg); + assertTrue(msg.contains(" " + Property.TABLE_BULK_MAX_TABLET_FILES.getKey()), msg); verifyData(client, tableName, 40, 79, false); // test an import that has more files than the limit, but not in a single tablet so it should