[ 
https://issues.apache.org/jira/browse/DRILL-4699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15557177#comment-15557177
 ] 

ASF GitHub Bot commented on DRILL-4699:
---------------------------------------

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/536#discussion_r82495464
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java ---
    @@ -237,71 +281,81 @@
        * DEFAULT: 64 MB
        * MAXIMUM: 2048 MB
        */
    -  String NON_BLOCKING_OPERATORS_MEMORY_KEY = 
"planner.memory.non_blocking_operators_memory";
    -  OptionValidator NON_BLOCKING_OPERATORS_MEMORY = new 
PowerOfTwoLongValidator(
    -    NON_BLOCKING_OPERATORS_MEMORY_KEY, 1 << 11, 1 << 6);
    +  public static final String NON_BLOCKING_OPERATORS_MEMORY_KEY = 
"planner.memory.non_blocking_operators_memory";
    +  public static final OptionValidator NON_BLOCKING_OPERATORS_MEMORY = new 
PowerOfTwoLongValidator(
    +      NON_BLOCKING_OPERATORS_MEMORY_KEY, 1 << 11, 1 << 6);
     
    -  String HASH_JOIN_TABLE_FACTOR_KEY = 
"planner.memory.hash_join_table_factor";
    -  OptionValidator HASH_JOIN_TABLE_FACTOR = new 
DoubleValidator(HASH_JOIN_TABLE_FACTOR_KEY, 1.1d);
    +  public static final String HASH_JOIN_TABLE_FACTOR_KEY = 
"planner.memory.hash_join_table_factor";
    +  public static final OptionValidator HASH_JOIN_TABLE_FACTOR = new 
DoubleValidator(HASH_JOIN_TABLE_FACTOR_KEY, 1.1d);
     
    -  String HASH_AGG_TABLE_FACTOR_KEY = 
"planner.memory.hash_agg_table_factor";
    -  OptionValidator HASH_AGG_TABLE_FACTOR = new 
DoubleValidator(HASH_AGG_TABLE_FACTOR_KEY, 1.1d);
    +  public static final String HASH_AGG_TABLE_FACTOR_KEY = 
"planner.memory.hash_agg_table_factor";
    +  public static final OptionValidator HASH_AGG_TABLE_FACTOR = new 
DoubleValidator(HASH_AGG_TABLE_FACTOR_KEY, 1.1d);
     
    -  String AVERAGE_FIELD_WIDTH_KEY = "planner.memory.average_field_width";
    -  OptionValidator AVERAGE_FIELD_WIDTH = new 
PositiveLongValidator(AVERAGE_FIELD_WIDTH_KEY, Long.MAX_VALUE, 8);
    +  public static final String AVERAGE_FIELD_WIDTH_KEY = 
"planner.memory.average_field_width";
    +  public static final OptionValidator AVERAGE_FIELD_WIDTH = new 
PositiveLongValidator(AVERAGE_FIELD_WIDTH_KEY,
    +      Long.MAX_VALUE, 8);
     
    -  BooleanValidator ENABLE_QUEUE = new 
BooleanValidator("exec.queue.enable", false);
    -  LongValidator LARGE_QUEUE_SIZE = new 
PositiveLongValidator("exec.queue.large", 1000, 10);
    -  LongValidator SMALL_QUEUE_SIZE = new 
PositiveLongValidator("exec.queue.small", 100000, 100);
    -  LongValidator QUEUE_THRESHOLD_SIZE = new 
PositiveLongValidator("exec.queue.threshold",
    -      Long.MAX_VALUE, 30000000);
    -  LongValidator QUEUE_TIMEOUT = new 
PositiveLongValidator("exec.queue.timeout_millis",
    -      Long.MAX_VALUE, 60 * 1000 * 5);
    +  public static final BooleanValidator ENABLE_QUEUE = new 
BooleanValidator("exec.queue.enable", false);
    +  public static final LongValidator LARGE_QUEUE_SIZE = new 
PositiveLongValidator("exec.queue.large", 1000, 10,
    +      "Sets the number of large queries that can run concurrently in the 
cluster. Range: 0 - 1000.");
    +  public static final LongValidator SMALL_QUEUE_SIZE = new 
PositiveLongValidator("exec.queue.small", 100000, 100,
    +      "Sets the number of small queries that can run concurrently in the 
cluster. Range: 0 - 100000.");
    +  public static final LongValidator QUEUE_THRESHOLD_SIZE = new 
PositiveLongValidator("exec.queue.threshold",
    +      Long.MAX_VALUE, 30000000, "Sets the cost threshold, which depends on 
the complexity of the queries in" +
    +      " queue, for determining whether query is large or small. Complex 
queries have higher thresholds." +
    +      " Range: 0 - 9223372036854775807.");
    +  public static final LongValidator QUEUE_TIMEOUT = new 
PositiveLongValidator("exec.queue.timeout_millis",
    +      Long.MAX_VALUE, 60 * 1000 * 5, "Indicates how long a query can wait 
in queue before the query fails." +
    +      " Range: 0 - 9223372036854775807.");
     
    -  String ENABLE_VERBOSE_ERRORS_KEY = "exec.errors.verbose";
    -  OptionValidator ENABLE_VERBOSE_ERRORS = new 
BooleanValidator(ENABLE_VERBOSE_ERRORS_KEY, false);
    +  public static final String ENABLE_VERBOSE_ERRORS_KEY = 
"exec.errors.verbose";
    +  public static final OptionValidator ENABLE_VERBOSE_ERRORS = new 
BooleanValidator(ENABLE_VERBOSE_ERRORS_KEY, false,
    +      "Toggles verbose output of error messages.");
     
    -  String ENABLE_NEW_TEXT_READER_KEY = 
"exec.storage.enable_new_text_reader";
    -  OptionValidator ENABLE_NEW_TEXT_READER = new 
BooleanValidator(ENABLE_NEW_TEXT_READER_KEY, true);
    +  public static final String ENABLE_NEW_TEXT_READER_KEY = 
"exec.storage.enable_new_text_reader";
    +  public static final OptionValidator ENABLE_NEW_TEXT_READER = new 
BooleanValidator(ENABLE_NEW_TEXT_READER_KEY, true);
     
    -  String BOOTSTRAP_STORAGE_PLUGINS_FILE = "bootstrap-storage-plugins.json";
    -  String MAX_LOADING_CACHE_SIZE_CONFIG = 
"drill.exec.compile.cache_max_size";
    +  public static final String BOOTSTRAP_STORAGE_PLUGINS_FILE = 
"bootstrap-storage-plugins.json";
    +  public static final String MAX_LOADING_CACHE_SIZE_CONFIG = 
"drill.exec.compile.cache_max_size";
     
    -  String DRILL_SYS_FILE_SUFFIX = ".sys.drill";
    +  public static final String DRILL_SYS_FILE_SUFFIX = ".sys.drill";
     
    -  String ENABLE_WINDOW_FUNCTIONS = "window.enable";
    -  OptionValidator ENABLE_WINDOW_FUNCTIONS_VALIDATOR = new 
BooleanValidator(ENABLE_WINDOW_FUNCTIONS, true);
    +  public static final String ENABLE_WINDOW_FUNCTIONS = "window.enable";
    +  public static final OptionValidator ENABLE_WINDOW_FUNCTIONS_VALIDATOR = 
new BooleanValidator(ENABLE_WINDOW_FUNCTIONS,
    +      true, "Enable or disable window functions in Drill 1.1 and later.");
     
    -  String DRILLBIT_CONTROL_INJECTIONS = "drill.exec.testing.controls";
    -  OptionValidator DRILLBIT_CONTROLS_VALIDATOR =
    -    new 
ExecutionControls.ControlsOptionValidator(DRILLBIT_CONTROL_INJECTIONS, 
ExecutionControls.DEFAULT_CONTROLS, 1);
    +  public static final String DRILLBIT_CONTROL_INJECTIONS = 
"drill.exec.testing.controls";
    +  public static final OptionValidator DRILLBIT_CONTROLS_VALIDATOR =
    +      new 
ExecutionControls.ControlsOptionValidator(DRILLBIT_CONTROL_INJECTIONS, 
ExecutionControls.DEFAULT_CONTROLS, 1);
     
    -  String NEW_VIEW_DEFAULT_PERMS_KEY = "new_view_default_permissions";
    -  OptionValidator NEW_VIEW_DEFAULT_PERMS_VALIDATOR =
    -      new StringValidator(NEW_VIEW_DEFAULT_PERMS_KEY, "700");
    +  public static final String NEW_VIEW_DEFAULT_PERMS_KEY = 
"new_view_default_permissions";
    +  public static final OptionValidator NEW_VIEW_DEFAULT_PERMS_VALIDATOR = 
new StringValidator(
    +      NEW_VIEW_DEFAULT_PERMS_KEY, "700", "Sets view permissions using an 
octal code in the Unix tradition.");
     
    -  String CTAS_PARTITIONING_HASH_DISTRIBUTE = 
"store.partition.hash_distribute";
    -  BooleanValidator CTAS_PARTITIONING_HASH_DISTRIBUTE_VALIDATOR = new 
BooleanValidator(CTAS_PARTITIONING_HASH_DISTRIBUTE, false);
    +  public static final String CTAS_PARTITIONING_HASH_DISTRIBUTE = 
"store.partition.hash_distribute";
    +  public static final BooleanValidator 
CTAS_PARTITIONING_HASH_DISTRIBUTE_VALIDATOR = new BooleanValidator(
    +      CTAS_PARTITIONING_HASH_DISTRIBUTE, false);
     
    -  String ENABLE_BULK_LOAD_TABLE_LIST_KEY = 
"exec.enable_bulk_load_table_list";
    -  BooleanValidator ENABLE_BULK_LOAD_TABLE_LIST = new 
BooleanValidator(ENABLE_BULK_LOAD_TABLE_LIST_KEY, false);
    +  public static final String ENABLE_BULK_LOAD_TABLE_LIST_KEY = 
"exec.enable_bulk_load_table_list";
    +  public static final BooleanValidator ENABLE_BULK_LOAD_TABLE_LIST = new 
BooleanValidator(
    +      ENABLE_BULK_LOAD_TABLE_LIST_KEY, false);
     
       /**
        * Option whose value is a comma separated list of admin usernames. 
Admin users are users who have special privileges
        * such as changing system options.
        */
    -  String ADMIN_USERS_KEY = "security.admin.users";
    -  StringValidator ADMIN_USERS_VALIDATOR =
    +  public static final String ADMIN_USERS_KEY = "security.admin.users";
    +  public static final StringValidator ADMIN_USERS_VALIDATOR =
           new AdminOptionValidator(ADMIN_USERS_KEY, 
ImpersonationUtil.getProcessUserName());
     
       /**
        * Option whose value is a comma separated list of admin usergroups.
        */
    -  String ADMIN_USER_GROUPS_KEY = "security.admin.user_groups";
    -  StringValidator ADMIN_USER_GROUPS_VALIDATOR = new 
AdminOptionValidator(ADMIN_USER_GROUPS_KEY, "");
    +  public static final String ADMIN_USER_GROUPS_KEY = 
"security.admin.user_groups";
    +  public static final StringValidator ADMIN_USER_GROUPS_VALIDATOR = new 
AdminOptionValidator(ADMIN_USER_GROUPS_KEY, "");
     
       /**
    -   * Option whose value is a string representing list of inbound 
impersonation policies.
    +   * Option whose value is a public static final String representing list 
of inbound impersonation policies.
    --- End diff --
    
    No need to state the type in the Javadoc comment; the type declaration will 
appear in the generated docs. So, must say "List of inbound..."
    
    Then, below, in the example format, the text is interpreted as HTML. So, 
add the required directives:
    
        * <pre>[
        *    ....
        * [</pre>


> Add Description Column in sys.options
> -------------------------------------
>
>                 Key: DRILL-4699
>                 URL: https://issues.apache.org/jira/browse/DRILL-4699
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components:  Server, Documentation
>    Affects Versions: 1.6.0
>            Reporter: John Omernik
>            Assignee: Paul Rogers
>
> select * from sys.options provides a user with a strong understanding of what 
> options are available to Drill. These options are not well documented.  Some 
> options are "experimental" other options have a function only in specific 
> cases (writers vs readers for example).  If we had a large text field for 
> description, we could enforce documentation of the settings are option 
> creation time, and the description of the setting could change as the 
> versions change (i.e. when an option graduates to being supported from being 
> experimental, it would be changed in the version the user is using. I.e. when 
> they run select * from sys.options, they know the exact state of the option 
> every time they query. It could also facilitate better self documentation via 
> QA on pull requests "Did you update the sys.options.desc?"  This makes it 
> easier for users, and admins in the use of Drill in an enterprise.    
> The first step is adding the field, and then going back and filling in the 
> desc for each option.  (Another JIRA after the option is available)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to