drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5547) Drill config options and session options do not work as intended
Date Fri, 28 Jul 2017 21:28:02 GMT

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

ASF GitHub Bot commented on DRILL-5547:

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

    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionValue.java
    @@ -88,16 +101,17 @@ private OptionValue(@JsonProperty("kind") Kind kind,
                           @JsonProperty("num_val") Long num_val,
                           @JsonProperty("string_val") String string_val,
                           @JsonProperty("bool_val") Boolean bool_val,
    -                      @JsonProperty("float_val") Double float_val) {
    +                      @JsonProperty("float_val") Double float_val,
    +                      @JsonProperty("scope") OptionScope scope) {
    --- End diff --
    The JSON version of this class is part of the drillbit-to-drillbit API. Changing the definition
means that Drillbits of one version can't interoperate with Drillbits of another version.
That is fine, we've never supported multiple versions in a single cluster. But, there is interest
in rolling upgrades which would require such support. That is a separate task; just wanted
to note the compatibility issue here.
    An alternative is to not serialize the scope. Serialization is used only to send option
values to fragments. But, at the fragment level, the code does not care where the value was
set. So, maybe keep the scope in this class, but don't serialize it.

> Drill config options and session options do not work as intended
> ----------------------------------------------------------------
>                 Key: DRILL-5547
>                 URL: https://issues.apache.org/jira/browse/DRILL-5547
>             Project: Apache Drill
>          Issue Type: Bug
>          Components:  Server
>    Affects Versions: 1.10.0
>            Reporter: Karthikeyan Manivannan
>            Assignee: Venkata Jyothsna Donapati
>             Fix For: Future
> In Drill, session options should take precedence over config options. But several of
these session options are assigned hard-coded default values when the option validators are
initialized. Because of this config options will never be read and honored even if the user
did not specify the session option. 
> ClassCompilerSelector.JAVA_COMPILER_VALIDATOR uses CompilerPolicy.DEFAULT as the default
value. This default value gets into the session options map via the initialization of validators
in SystemOptionManager. 
> Now any piece of code that tries to check if a session option is set will never see a
null, so it will always use that value and never try to look into the config options. For
example, in the following piece of code from ClassCompilerSelector (), the policy will never
be read from the config file.
> policy = CompilerPolicy.valueOf((value != null) ? value.string_val.toUpperCase() : config.getString(JAVA_COMPILER_CONFIG).toUpperCase());

This message was sent by Atlassian JIRA

View raw message