drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #923: DRILL-5723: Added System Internal Options That can ...
Date Fri, 01 Sep 2017 20:54:58 GMT
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/923#discussion_r136659980
  
    --- 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 --
    
    A compromise is to introduce a two-level table.
    
    * Global table of option metadata. Perhaps evolve the validator to be that metadata. Or,
better, define a new `OptionDefinition` class, an attribute of which is the validator.
    * Per-Drillbit table of defaults resolved from the config system using the information
from the definitions.
    
    If we do this, we should clean up all the messy enums in this system. The current ones
confuse everyone. We want:
    
    * Definition: The allowed scope: session-only or both session and system.
    * Visibility: public or hidden (this change)
    * Data type: (long, double, string, etc.)
    
    For a value:
    
    * Scope: default, session or system.
    
    Sometimes it is easier to fix the original problems than to keep working around an outdated
design...


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message