Describe the bug
When using the accumulo shell to set properties, a user is able to set an invalid property value for value types such as Boolean and Port.
Example:
This property is a boolean type.
|
TSERV_PORTSEARCH("tserver.port.search", "false", PropertyType.BOOLEAN, |
|
"if the ports above are in use, search higher ports until one is available", "1.3.5"), |
However, it can be set to an integer value.
root@uno> config -s tserver.monitor.fs=345
root@uno> config -f tserver.monitor.fs
-----------+--------------------------------------------------------------------+-----------------------------------------------------------------------------------
SCOPE | NAME | VALUE
-----------+--------------------------------------------------------------------+-----------------------------------------------------------------------------------
default | tserver.monitor.fs ............................................... | false
system | @override ..................................................... | 345
-----------+--------------------------------------------------------------------+-----------------------------------------------------------------------------------
Versions (OS, Maven, Java, and others, as appropriate):
- Affected version(s) of this project: 2.1.x, 1.10.x
- OS: Centos7
- Others:
To Reproduce
Steps to reproduce the behavior (or a link to an example repository that reproduces the problem):
- Start accumulo Shell
- Use the Config Command to find a Boolean or Port Property Type
config -f <property>
- Use the
config -s <property>=<invalid value> command to set that type to an invalid value
- Use
config -f <property> to show the invalid value is set
Expected behavior
The Shell tool should check the property value and error on invalid values instead of allowing them to be set.
Additional context
I assume that all versions of accumulo have this bug, but I have only checked against 1.10, 2.1, and main.
Describe the bug
When using the accumulo shell to set properties, a user is able to set an invalid property value for value types such as Boolean and Port.
Example:
This property is a boolean type.
accumulo/core/src/main/java/org/apache/accumulo/core/conf/Property.java
Lines 438 to 439 in fbe1ee8
However, it can be set to an integer value.
Versions (OS, Maven, Java, and others, as appropriate):
To Reproduce
Steps to reproduce the behavior (or a link to an example repository that reproduces the problem):
config -f <property>config -s <property>=<invalid value>command to set that type to an invalid valueconfig -f <property>to show the invalid value is setExpected behavior
The Shell tool should check the property value and error on invalid values instead of allowing them to be set.
Additional context
I assume that all versions of accumulo have this bug, but I have only checked against 1.10, 2.1, and main.