kevinrr888 opened a new pull request, #4816:
URL: https://github.com/apache/accumulo/pull/4816
closes #4810
- Fixed some inconsistencies and bugs in (non-test) implementations of
`IteratorEnvironment`
- Fixed `RFileScanner`s unexpected `UnsupportedOperationException` when
calling `env.getServiceEnv()` or `env.getConfig()` (both deprecated) or
`env.getPluginEnv()`
- Some impls returned a new `ServiceEnvironment` for each call to
`getServiceEnv()`/`getPluginEnv()`. This did not align as well with the
`IteratorEnvIT` which would assert that these two calls return the same object.
Memoize a supplier to the `ServiceEnvironment` to avoid creating the object
unless needed and to return the same object each time.
- Seems like `isUserCompaction()` and `isFullMajorCompaction()` are
supposed to be throwing an `IllegalStateException` if it's not a major
compaction. Added missing javadoc to `isUserCompaction()` and changed impls
that were not adhering to these docs.
- Added tests for these environments to `IteratorEnvIT`
Questions:
1) Need confirmation, but it was my interpretation that a TableId doesn't
make sense in the context of `RFileScanner`. Is this correct?
2) I have `getConfiguration()` throw an error in `RFileScanner`s
`IteratorEnvironment` since I'm not sure how we would return the system config
in this context and I don't think it would even make sense here. Does this seem
right?
3) Made the `IteratorEnvironment` for `RFileScanner` return null and not
throw an error on `env.getTableId()` so something like:
`env.getPluginEnv().getConfiguration(env.getTableId())` can be done. Thoughts
on this?
--
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]