[GitHub] metron issue #817: METRON-1283: Install Elasticsearch template as a part of ...

2017-10-29 Thread anandsubbu
Github user anandsubbu commented on the issue:

https://github.com/apache/metron/pull/817
  
I have added this to the Elasticsearch README in my recent commit. Please 
see here:

https://github.com/apache/metron/pull/817/files#diff-325aea0d364d12c8637eef347ebcfca6

The preceding section to the template installation talks about the update 
required to the templates. I hence found this to be a better option than 
hosting it in the Metron Indexing README.


---


[GitHub] metron issue #817: METRON-1283: Install Elasticsearch template as a part of ...

2017-10-29 Thread ottobackwards
Github user ottobackwards commented on the issue:

https://github.com/apache/metron/pull/817
  
I think we need to document this somewhere.  I am not sure where though.


---


[GitHub] metron issue #817: METRON-1283: Install Elasticsearch template as a part of ...

2017-10-29 Thread anandsubbu
Github user anandsubbu commented on the issue:

https://github.com/apache/metron/pull/817
  
Hi @ottobackwards , let me know what you think. 


---


[GitHub] metron issue #817: METRON-1283: Install Elasticsearch template as a part of ...

2017-10-29 Thread nickwallen
Github user nickwallen commented on the issue:

https://github.com/apache/metron/pull/817
  
+1 Thanks for fixing this @anandsubbu!  This takes out a manual step that 
if missed can cause some ugly, unexpected problems.

This is contingent on getting @ottobackwards buy-in before merging too.


---


[GitHub] metron pull request #817: METRON-1283: Install Elasticsearch template as a p...

2017-10-29 Thread anandsubbu
Github user anandsubbu commented on a diff in the pull request:

https://github.com/apache/metron/pull/817#discussion_r147587694
  
--- Diff: 
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py
 ---
@@ -82,6 +82,13 @@ def start(self, env, upgrade_type=None):
 self.configure(env)
 commands = IndexingCommands(params)
 commands.start_indexing_topology(env)
+# Install elasticsearch templates
+try:
+if not commands.is_elasticsearch_template_installed():
+self.elasticsearch_template_install(env)
+commands.set_elasticsearch_template_installed()
--- End diff --

Thank you @nickwallen . Sure, done!


---


[GitHub] metron pull request #817: METRON-1283: Install Elasticsearch template as a p...

2017-10-29 Thread nickwallen
Github user nickwallen commented on a diff in the pull request:

https://github.com/apache/metron/pull/817#discussion_r147587373
  
--- Diff: 
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py
 ---
@@ -82,6 +82,13 @@ def start(self, env, upgrade_type=None):
 self.configure(env)
 commands = IndexingCommands(params)
 commands.start_indexing_topology(env)
+# Install elasticsearch templates
+try:
+if not commands.is_elasticsearch_template_installed():
+self.elasticsearch_template_install(env)
+commands.set_elasticsearch_template_installed()
--- End diff --

> If the install fails the first time due to ES being down, then we WARN 
and move on. If ES service comes up later, the admin needs to install the 
templates subsequently by using 'Ambari -> Metron -> Service Actions -> 
Elasticsearch Template Install' option

I am reading the code differently @anandsubbu .  If we attempt to install 
the templates, but it fails because ES is down, then an exception is thrown and 
we never set the flag file.  This is good because the next time we start 
indexing, it will again attempt to install the index templates.  Only if the 
templates actually get installed will the flag file get set, which causes it to 
stop attempting the install.  This is good.  That's what we want.

The only thing I would suggest is that we attempt the template install 
BEFORE starting the indexing topology.  


---


[GitHub] metron issue #817: METRON-1283: Install Elasticsearch template as a part of ...

2017-10-29 Thread ottobackwards
Github user ottobackwards commented on the issue:

https://github.com/apache/metron/pull/817
  
How are we going to document all this?


---


[GitHub] metron issue #817: METRON-1283: Install Elasticsearch template as a part of ...

2017-10-29 Thread anandsubbu
Github user anandsubbu commented on the issue:

https://github.com/apache/metron/pull/817
  
If the install fails the first time due to ES being down, then we WARN and 
move on. If ES service comes up later, the admin needs to install the templates 
subsequently by using 'Ambari -> Metron -> Service Actions -> Elasticsearch 
Template Install' option. Alternatively s/he can also stop the Indexing service 
and start again so the template will be installed (Note that calling "restart" 
on the Indexing service will not trigger the template installation)


---


[GitHub] metron issue #814: METRON-1277 Add match statement to Stellar language

2017-10-29 Thread ottobackwards
Github user ottobackwards commented on the issue:

https://github.com/apache/metron/pull/814
  
for example: 
```java
 @Test
  public void testValidation() {
Object value = run("IF x == null THEN THROW('it cannot be null') ELSE 
'it is ok'", new HashMap(){{
  put("x","something");
}} );
  }
```
This is a valid test, but it fails on validation not parse.


---