Skip to content

Replace non-public ConfigurationImpl with test utility#3381

Open
SethSmucker wants to merge 7 commits into
integrationfrom
task/replace-configurationimpl
Open

Replace non-public ConfigurationImpl with test utility#3381
SethSmucker wants to merge 7 commits into
integrationfrom
task/replace-configurationimpl

Conversation

@SethSmucker
Copy link
Copy Markdown
Collaborator

Summary

  • Create AccumuloConfigurationWrapper test utility in common-test module
  • Replace non-public org.apache.accumulo.core.util.ConfigurationImpl with the new wrapper
  • Updated test files in warehouse/age-off and warehouse/query-core

Fixes #3375
Part of #2443

@keith-turner
Copy link
Copy Markdown
Collaborator

There is new code in 4.0.0 that offers this functionality in the public API. Could backport these changes to 2.1.

https://github.com/apache/accumulo/blob/3dfe28e8e1774a143c86edbeb645ea3ac301cdd5/core/src/main/java/org/apache/accumulo/core/client/PluginEnvironment.java#L145

Create a test utility class AccumuloConfigurationWrapper that implements
PluginEnvironment.Configuration by wrapping an AccumuloConfiguration.
This replaces usage of non-public org.apache.accumulo.core.util.ConfigurationImpl.
Per review feedback, this class is not inherently test-only. Moved from
datawave.test to datawave.accumulo.core.util in the core/common-utils module.
@SethSmucker SethSmucker force-pushed the task/replace-configurationimpl branch from d6851e8 to b94533e Compare March 23, 2026 16:28
@foster33 foster33 self-assigned this Apr 22, 2026
@ddanielr
Copy link
Copy Markdown
Collaborator

Created apache/accumulo#6336 based on @keith-turner's comment which would avoid the need for the AccumuloConfigurationWrapper class.

}

@Override
public Map<String,String> getWithPrefix(String prefix) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method needs to add validation for the property and call
conf.getAllPropertiesWithPrefix.

The code in AccumuloConfiguration is special since most properties that use a defined accumulo prefix must be returned as a snapshot set.

This is handled in AccumuloConfiguration.getAllPropertiesWithPrefix() by using a ReentrantLock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace non-public ConfigurationImpl in tests

6 participants