apache / apache/accumulo

Make configuration validation more strict

Open
#6,216 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
1.2k
Forks
487
Avg merge
4d 5h
Merged PRs (30d)
13

Description

**Is your feature request related to a problem? Please describe.**

Started some Accumulo servers processes with that changes in #6207 that removed port search properties. The server processes still had port search properties in the site config. The properties were ignored and nothing complained about them. Site config called this [code](https://github.com/apache/accumulo/blob/c01b34949d9c2d9a4eddd33ce8bd62b22a0fbd79/core/src/main/java/org/apache/accumulo/core/conf/ConfigCheckUtil.java#L55) and I suspect it ignored the port search properties because they had something like a `tserver.` prefix.

**Describe the solution you'd like**

Warn on properties that will never be used. Some prefixes in the accumulo config are meant to be extended by user and others are not. Maybe an annotation could be added to prefixes to denote if they can be extended or not. For example the `tserver.` prefix could have an annotation that specifies it can not be extended and the `table.iterator` prefix could have an annotation that specifies it can be extended. Probably only need one of the annotations, can treat absence as the opposite.

With this change the code could know that only having the `tserver.` prefix does not make a property valid.

Contributor guide

Open the contributing guide

Research direction

Start with core/src/main/java/org/apache/accumulo/core/conf/ConfigCheckUtil.java and review the configuration changes from #6207. Trace how site configuration properties are validated, especially properties with prefixes such as tserver. and table.iterator. Done means warning when a configured property will never be used while allowing intentionally extensible prefixes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.