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

ASF GitHub Bot commented on METRON-1167:
----------------------------------------

Github user cestella commented on the issue:

    https://github.com/apache/metron/pull/740
  
    So, one way to do this is to allow users to refer to stellar fields:
    ```
    my_complex_field := { 'blah' : 7 }
    %define nicks_new_global_field=&my_complex_field
    ```
    
    Another option to support this is to just insist that `%define` is a string 
and you have a `replace_global` that takes a field as an argument and the field 
contains the new global config (in JSON form) and replaces the global config:
    ```
    new_global_config := SHELL_EDIT()
    %replace_global new_global_config
    ```



> Define Session Specific Global Configuration Values in the REPL
> ---------------------------------------------------------------
>
>                 Key: METRON-1167
>                 URL: https://issues.apache.org/jira/browse/METRON-1167
>             Project: Metron
>          Issue Type: Improvement
>    Affects Versions: 0.4.0
>            Reporter: Nick Allen
>            Assignee: Nick Allen
>
> Many Stellar functions accept configuration values from the Global 
> configuration.  When using the REPL you can load the global configuration 
> values by launching the REPL with the -z option, which loads the global 
> configuration stored in Zookeeper.
> The only way to modify the global configuration within the REPL currently is 
> to do the following steps.
> 1. Retrieve the global configuration with conf := CONFIG_GET("global")
> 2. Alter that global configuration by modifying the JSON contained in the 
> `conf` variable.
> 3. Push the new global configuration using CONFIG_PUT("global", conf)
> 4. Close and then reopen the REPL.  Without restarting the REPL the new 
> global configuration is not loaded.
> I want a way to do this directly in the REPL, without restarting it, and also 
> in a way that does not modify the persisted global configuration in 
> Zookeeper.  I may be monkeying with something the REPL, but I don't want to 
> break one of my live Metron topologies.



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

Reply via email to