metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmiklavc <...@git.apache.org>
Subject [GitHub] incubator-metron issue #415: METRON-652: Extract indexing config from enrich...
Date Thu, 12 Jan 2017 21:46:07 GMT
Github user mmiklavc commented on the issue:

    https://github.com/apache/incubator-metron/pull/415
  
    OK, found this for the global config in metron-env.xml
    
    ```
        <property>
            <name>global-json</name>
            <display-name>global.json template</display-name>
            <description>This is the jinja template for global.json file</description>
            <value>
    {
    "es.clustername": "{{ es_cluster_name }}",
    "es.ip": "{{ es_url }}",
    "es.date.format": "yyyy.MM.dd.HH"
    }
            </value>
            <value-attributes>
                <type>content</type>
            </value-attributes>
        </property>
    ```
    This is referenced in params_linux.py
    ```
    global_json_template = config['configurations']['metron-env']['global-json']
    ```
    And then it's used by metron_service.py to lay down the config using jinja templates (edited
for brevity):
    ```
    def init_config():
    ...
        Execute(ambari_format(
            "{metron_home}/bin/zk_load_configs.sh --mode PUSH -i {metron_zookeeper_config_path}
-z {zookeeper_quorum}"),
            path=ambari_format("{java_home}/bin")
        )
    ...
    def load_global_config(params):
    ...
        File("{0}/global.json".format(params.metron_zookeeper_config_path),
             owner=params.metron_user,
             content=InlineTemplate(params.global_json_template)
             )
    ...
        init_config()
    ```
    So yes, if you change global.json external to Ambari, ie in the Metron install config
directory, Ambari will rewrite what's in the local FS, and follow up with a load to ZK. As
best I can tell, this is _only_ applicable to the global config, not the individual topology
json configs. Those are unpacked on install via Ambari performing an RPM install, but not
actually managed on an ongoing basis. The way you get into hot water here is if you've chosen
to manage Ambari configs in a different directory than where Ambari believes they're located,
due to it using zk_load_configs.sh under the hood. Even then, this is parameterized via `metron_zookeeper_config_path`.
I can't recall if that path is absolute, relative, or both. But in metron-env it's defaulted
to `config/zookeeper`
    
    Hope this clarifies some things.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message