Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/868#discussion_r126831642
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/server/options/SystemOptionManager.java
---
@@ -271,12 +320,20 @@ public static OptionValidator getValidator(final
String name) {
public OptionValue getOption(final String name) {
// check local space (persistent store)
final OptionValue value = options.get(name.toLowerCase());
+ OptionValue val;
if (value != null) {
return value;
}
- // otherwise, return default.
+ // otherwise, return default set in the validator.
final OptionValidator validator = getValidator(name);
+ if (validator.getDefault() != null) {
+ if
(!validator.getDefault().getValue().equals(validator.getDefault().getValue())) {
+ System.out.println("Config and hardcoded values are" +
"\t" + validator.getDefault().getValue()
--- End diff --
We can't use println in production code. Instead, we can use the logger:
```
logger.trace("Config value: {}, hardcoded value: {},
validator.getDefault().getValue(),
validator.getDefault().getValue());
```
The logger will call `toString()` on each argument for us.
Actually, this code seems to be temporary debugging code: checking the
default value against hard-coded. Once the work is done, the hard-coded values
should no longer exist.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---