kevinrr888 commented on code in PR #6028:
URL: https://github.com/apache/accumulo/pull/6028#discussion_r2631678411
##########
core/src/main/java/org/apache/accumulo/core/client/admin/NewTableConfiguration.java:
##########
@@ -206,7 +206,8 @@ public Map<String,String> getProperties() {
try {
TableOperationsHelper.checkIteratorConflicts(noDefaultsPropMap,
setting, scopes);
} catch (AccumuloException e) {
- throw new IllegalStateException(e);
+ throw new IllegalStateException(String.format(
+ "conflict with default table iterator: scopes: %s setting: %s",
scopes, setting), e);
}
});
Review Comment:
checkIteratorConflicts() is intended to check if the "setting" conflicts
with any prop in the prop map. Here we are using it the other way around, so
the exception message was lacking helpful info. Added more info here.
Here is an example of the previous exception:
```
java.lang.IllegalStateException:
org.apache.accumulo.core.client.AccumuloException:
java.lang.IllegalArgumentException: iterator priority conflict:
table.iterator.minc.NullIterator=20,org.apache.accumulo.test.functional.FlushNoFileIT$NullIterator
at
org.apache.accumulo.core.client.admin.NewTableConfiguration.lambda$getProperties$1(NewTableConfiguration.java:209)
at java.base/java.util.Map.forEach(Map.java:713)
at
org.apache.accumulo.core.client.admin.NewTableConfiguration.getProperties(NewTableConfiguration.java:205)
at
org.apache.accumulo.core.clientImpl.TableOperationsImpl.create(TableOperationsImpl.java:250)
at
org.apache.accumulo.test.functional.FlushNoFileIT.test(FlushNoFileIT.java:75)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.apache.accumulo.core.client.AccumuloException:
java.lang.IllegalArgumentException: iterator priority conflict:
table.iterator.minc.NullIterator=20,org.apache.accumulo.test.functional.FlushNoFileIT$NullIterator
at
org.apache.accumulo.core.clientImpl.TableOperationsHelper.checkIteratorConflicts(TableOperationsHelper.java:168)
at
org.apache.accumulo.core.client.admin.NewTableConfiguration.lambda$getProperties$1(NewTableConfiguration.java:207)
... 9 more
Caused by: java.lang.IllegalArgumentException: iterator priority conflict:
table.iterator.minc.NullIterator=20,org.apache.accumulo.test.functional.FlushNoFileIT$NullIterator
... 11 more
```
Here is the new exception message:
```
java.lang.IllegalStateException: conflict with default table iterator:
scopes: [majc, minc, scan] setting: name:vers, priority:20,
class:org.apache.accumulo.core.iterators.user.VersioningIterator,
properties:{maxVersions=1}
at
org.apache.accumulo.core.client.admin.NewTableConfiguration.lambda$getProperties$1(NewTableConfiguration.java:209)
at java.base/java.util.Map.forEach(Map.java:713)
at
org.apache.accumulo.core.client.admin.NewTableConfiguration.getProperties(NewTableConfiguration.java:205)
at
org.apache.accumulo.core.clientImpl.TableOperationsImpl.create(TableOperationsImpl.java:250)
at
org.apache.accumulo.test.functional.FlushNoFileIT.test(FlushNoFileIT.java:75)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.apache.accumulo.core.client.AccumuloException:
java.lang.IllegalArgumentException: iterator priority conflict:
table.iterator.minc.NullIterator=20,org.apache.accumulo.test.functional.FlushNoFileIT$NullIterator
at
org.apache.accumulo.core.clientImpl.TableOperationsHelper.checkIteratorConflicts(TableOperationsHelper.java:168)
at
org.apache.accumulo.core.client.admin.NewTableConfiguration.lambda$getProperties$1(NewTableConfiguration.java:207)
... 9 more
Caused by: java.lang.IllegalArgumentException: iterator priority conflict:
table.iterator.minc.NullIterator=20,org.apache.accumulo.test.functional.FlushNoFileIT$NullIterator
... 11 more
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]