[
https://issues.apache.org/jira/browse/DRILL-5723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16151186#comment-16151186
]
ASF GitHub Bot commented on DRILL-5723:
---------------------------------------
Github user ilooner commented on a diff in the pull request:
https://github.com/apache/drill/pull/923#discussion_r136669290
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/server/options/SystemOptionManager.java
---
@@ -70,11 +69,13 @@
* </p>
*/
-public class SystemOptionManager extends BaseOptionManager implements
OptionManager, AutoCloseable {
+public class SystemOptionManager extends BaseOptionManager implements
AutoCloseable {
private static final org.slf4j.Logger logger =
org.slf4j.LoggerFactory.getLogger(SystemOptionManager.class);
- private CaseInsensitiveMap<OptionValidator> VALIDATORS;
- public void populateValidators() {
+ public static final CaseInsensitiveMap<OptionValidator>
DEFAULT_VALIDATORS =
--- End diff --
Agreed we should not be using global variables. The intended flow was the
following:
- DEFAULT_VALIDATORS holds the default set of validators
- The system option manager is passed a set of validators when it is
initialized
- The validators map is copied and stored in the validators variable on
line 230. So each option manager has a separate copy of the validator map.
Looking at this again I agree that this is not ideal. The
DEFAULT_VALIDATORS constant should be deleted and usages should be replaced
with createDefaultValidators.
I also see another issue that was present before where the validators
themselves are static, they should be explicitly copied, so we should probably
add a clone method to the validators to do that.
> Support System/Session Internal Options
> ---------------------------------------
>
> Key: DRILL-5723
> URL: https://issues.apache.org/jira/browse/DRILL-5723
> Project: Apache Drill
> Issue Type: New Feature
> Reporter: Timothy Farkas
> Assignee: Timothy Farkas
>
> This is a feature proposed by [~ben-zvi].
> Currently all the options are accessible by the user in sys.options. We would
> like to add internal options which can be altered, but are not visible in the
> sys.options table. These internal options could be seen by another alias
> select * from internal.options. The intention would be to put new options we
> weren't comfortable with exposing to the end user in this table.
> After the options and their corresponding features are considered stable they
> could be changed to appear in the sys.option table.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)