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 Wed, 13 Sep 2017 18:01:22 GMT
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/923#discussion_r138689935
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionManager.java
---
    @@ -17,49 +17,97 @@
      */
     package org.apache.drill.exec.server.options;
     
    -import org.apache.drill.exec.server.options.OptionValue.OptionType;
    +import javax.validation.constraints.NotNull;
     
     /**
      * Manager for Drill {@link OptionValue options}. Implementations must be case-insensitive
to the name of an option.
      */
     public interface OptionManager extends OptionSet, Iterable<OptionValue> {
     
       /**
    -   * Sets an option value.
    -   *
    -   * @param value option value
    -   * @throws org.apache.drill.common.exceptions.UserException message to describe error
with value
    +   * Sets a boolean option on the {@link OptionManager}.
    +   * @param name The name of the option.
    +   * @param value The value of the option.
        */
    -  void setOption(OptionValue value);
    +  void setLocalOption(String name, boolean value);
     
       /**
    -   * Deletes the option. Unfortunately, the type is required given the fallback structure
of option managers.
    -   * See {@link FallbackOptionManager}.
    +   * Sets a long option on the {@link OptionManager}.
    +   * @param name The name of the option.
    +   * @param value The value of the option.
    +   */
    +  void setLocalOption(String name, long value);
    +
    +  /**
    +   * Sets a double option on the {@link OptionManager}.
    +   * @param name The name of the option.
    +   * @param value The value of the option.
    +   */
    +  void setLocalOption(String name, double value);
    +
    +  /**
    +   * Sets a String option on the {@link OptionManager}.
    +   * @param name The name of the option.
    +   * @param value The value of the option.
    +   */
    +  void setLocalOption(String name, String value);
    +
    +  /**
    +   * Sets an option of the specified {@link OptionValue.Kind} on the {@link OptionManager}.
    +   * @param kind The kind of the option.
    +   * @param name The name of the option.
    +   * @param value The value of the option.
    +   */
    +  void setLocalOption(OptionValue.Kind kind, String name, String value);
    +
    +  /**
    +   * Deletes the option.
        *
    -   * If the option name is valid (exists in {@link SystemOptionManager#VALIDATORS}),
    +   * If the option name is valid (exists in the set of validators produced by {@link
SystemOptionManager#createDefaultOptionDefinitions()}),
        * but the option was not set within this manager, calling this method should be a
no-op.
        *
        * @param name option name
    -   * @param type option type
        * @throws org.apache.drill.common.exceptions.UserException message to describe error
with value
        */
    -  void deleteOption(String name, OptionType type);
    +  void deleteLocalOption(String name);
     
       /**
    -   * Deletes all options. Unfortunately, the type is required given the fallback structure
of option managers.
    -   * See {@link FallbackOptionManager}.
    +   * Deletes all options.
        *
        * If no options are set, calling this method should be no-op.
        *
    -   * @param type option type
        * @throws org.apache.drill.common.exceptions.UserException message to describe error
with value
        */
    -  void deleteAllOptions(OptionType type);
    +  void deleteAllLocalOptions();
    +
    +  /**
    +   * Get the option definition corresponding to the given option name.
    +   * @param name The name of the option to retrieve a validator for.
    +   * @return The option validator corresponding to the given option name.
    +   */
    +  @NotNull
    +  OptionDefinition getOptionDefinition(String name);
     
       /**
        * Gets the list of options managed this manager.
        *
        * @return the list of options
        */
       OptionList getOptionList();
    +
    +  /**
    +   * Returns all the internal options contained in this option manager.
    +   *
    +   * @return All the internal options contained in this option manager.
    +   */
    +  @NotNull
    +  OptionList getInternalOptionList();
    --- End diff --
    
    Thanks for the explanation.


---

Mime
View raw message