nickwallen commented on a change in pull request #1305: METRON-1940:Check if
not and install Elastic search templates / Solr collections when indexing
server is restarted
URL: https://github.com/apache/metron/pull/1305#discussion_r256627402
##########
File path:
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py
##########
@@ -138,6 +142,30 @@ def status(self, env):
def restart(self, env):
from params import params
env.set_params(params)
+ commands = IndexingCommands(params)
+ if params.ra_indexing_writer == 'Solr':
+ # Install Solr schemas
+ try:
+ if not commands.is_solr_schema_installed():
+ commands.solr_schema_install(env)
+ commands.set_solr_schema_installed()
+
+ except Exception as e:
Review comment:
Can we move this try/catch block into `solr_schema_install`? Then it
doesn't have to be duplicated in `start` and `restart`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services