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

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

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

    https://github.com/apache/drill/pull/923#discussion_r136657555
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StatusResources.java
 ---
    @@ -50,75 +53,124 @@
     public class StatusResources {
       static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(StatusResources.class);
     
    +  public static final String PATH_STATUS_JSON = "/status.json";
    +  public static final String PATH_STATUS = "/status";
    +  public static final String PATH_OPTIONS_JSON = "/options.json";
    +  public static final String PATH_INTERNAL_OPTIONS_JSON = 
"/internal_options.json";
    +  public static final String PATH_OPTIONS = "/options";
    +  public static final String PATH_INTERNAL_OPTIONS = "/internal_options";
    +
       @Inject UserAuthEnabled authEnabled;
       @Inject WorkManager work;
       @Inject SecurityContext sc;
     
       @GET
    -  @Path("/status.json")
    +  @Path(StatusResources.PATH_STATUS_JSON)
       @Produces(MediaType.APPLICATION_JSON)
       public Pair<String, String> getStatusJSON() {
         return new ImmutablePair<>("status", "Running!");
       }
     
       @GET
    -  @Path("/status")
    +  @Path(StatusResources.PATH_STATUS)
       @Produces(MediaType.TEXT_HTML)
       public Viewable getStatus() {
         return ViewableWithPermissions.create(authEnabled.get(), 
"/rest/status.ftl", sc, getStatusJSON());
       }
     
    -  @GET
    -  @Path("/options.json")
    -  @RolesAllowed(DrillUserPrincipal.AUTHENTICATED_ROLE)
    -  @Produces(MediaType.APPLICATION_JSON)
    -  public List<OptionWrapper> getSystemOptionsJSON() {
    +  private List<OptionWrapper> getSystemOptionsJSONHelper(boolean internal)
    +  {
         List<OptionWrapper> options = new LinkedList<>();
    -    for (OptionValue option : work.getContext().getOptionManager()) {
    +    OptionManager optionManager = work.getContext().getOptionManager();
    +    OptionList optionList = internal ? 
optionManager.getInternalOptionList(): optionManager.getExternalOptionList();
    +
    +    for (OptionValue option : optionList) {
           options.add(new OptionWrapper(option.name, option.getValue(), 
option.type, option.kind));
         }
    +
    --- End diff --
    
    FWIW, DRILL-5716 introduces name sorting to this page. (I can never find 
anything in the original unsorted list...)


> Support System/Session Internal Options
> ---------------------------------------
>
>                 Key: DRILL-5723
>                 URL: https://issues.apache.org/jira/browse/DRILL-5723
>             Project: Apache Drill
>          Issue Type: New Feature
>            Reporter: Timothy Farkas
>            Assignee: Timothy Farkas
>
> This is a feature proposed by [~ben-zvi].
> Currently all the options are accessible by the user in sys.options. We would 
> like to add internal options which can be altered, but are not visible in the 
> sys.options table. These internal options could be seen by another alias 
> select * from internal.options. The intention would be to put new options we 
> weren't comfortable with exposing to the end user in this table.
> After the options and their corresponding features are considered stable they 
> could be changed to appear in the sys.option table.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to