You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Paul Rogers (Jira)" <ji...@apache.org> on 2020/02/27 02:37:00 UTC

[jira] [Created] (DRILL-7611) Minor improvements to the Option Manager

Paul Rogers created DRILL-7611:
----------------------------------

             Summary: Minor improvements to the Option Manager
                 Key: DRILL-7611
                 URL: https://issues.apache.org/jira/browse/DRILL-7611
             Project: Apache Drill
          Issue Type: Improvement
    Affects Versions: 1.17.0
            Reporter: Paul Rogers


Based on a recent contribution in  DRILL-7603, #1996 suggests some minor improvements to the option manager:

* Provide a `getInt(String name)` method that verifies that a `long` is in the `int` range and does the cast. Avoids casts in each client location.
* Provide a `setOption(String name, Object value)` method in `BaseOptionManager`.
* Then, build on that with a `setOptions<Map<String, Object>)` method.
* Rename the `setLocalOption` methods to `set<type>()` (the "local option" part is implied.)
* Rename `setLocalOption(String name, String value)` to `setString()`.
* Rename `void setLocalOption(String name, Object value)` to `setOption()`. (Avoids the String/Object ambiguity in the current methods.)

Then, we reuse these methods in the several other places where we do such things. In the code in DRILL-7603 and in the `ClusterTest` code which mucks with options.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)