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 06907260e5 Modify exception handling in new ServerAmplImpl methods for ScanServers (#2866) 06907260e5 is described below commit 06907260e520441567e710b534ad02019355f0b9 Author: Dave Marion <dlmar...@apache.org> AuthorDate: Thu Aug 11 07:06:03 2022 -0400 Modify exception handling in new ServerAmplImpl methods for ScanServers (#2866) Closes #2853 --- .../java/org/apache/accumulo/server/metadata/ServerAmpleImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/base/src/main/java/org/apache/accumulo/server/metadata/ServerAmpleImpl.java b/server/base/src/main/java/org/apache/accumulo/server/metadata/ServerAmpleImpl.java index 46d7e9cf50..3f23fca6ab 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/metadata/ServerAmpleImpl.java +++ b/server/base/src/main/java/org/apache/accumulo/server/metadata/ServerAmpleImpl.java @@ -284,7 +284,8 @@ public class ServerAmpleImpl extends AmpleImpl implements Ample { writer.addMutation(m); } } catch (MutationsRejectedException | TableNotFoundException e) { - throw new RuntimeException(e); + throw new IllegalStateException( + "Error inserting scan server file references into " + DataLevel.USER.metaTable(), e); } } @@ -298,7 +299,7 @@ public class ServerAmpleImpl extends AmpleImpl implements Ample { .map(e -> new ScanServerRefTabletFile(e.getKey().getRowData().toString().substring(pLen), e.getKey().getColumnFamily(), e.getKey().getColumnQualifier())); } catch (TableNotFoundException e) { - throw new RuntimeException(e); + throw new IllegalStateException(DataLevel.USER.metaTable() + " not found!", e); } } @@ -321,7 +322,7 @@ public class ServerAmpleImpl extends AmpleImpl implements Ample { this.deleteScanServerFileReferences(refsToDelete); } } catch (TableNotFoundException e) { - throw new RuntimeException(e); + throw new IllegalStateException(DataLevel.USER.metaTable() + " not found!", e); } }