metron git commit: METRON-1267 Alerts UI returns a 404 when refreshing the alerts-list page (iraghumitra via merrimanr) closes apache/metron#819
Repository: metron Updated Branches: refs/heads/master 2488842bd -> e5b0d7c14 METRON-1267 Alerts UI returns a 404 when refreshing the alerts-list page (iraghumitra via merrimanr) closes apache/metron#819 Project: http://git-wip-us.apache.org/repos/asf/metron/repo Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/e5b0d7c1 Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/e5b0d7c1 Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/e5b0d7c1 Branch: refs/heads/master Commit: e5b0d7c1495c69932261c034e5339eb87c83faad Parents: 2488842 Author: iraghumitra Authored: Mon Oct 30 13:10:07 2017 -0500 Committer: merrimanr Committed: Mon Oct 30 13:10:07 2017 -0500 -- metron-interface/metron-alerts/scripts/alerts-server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/metron/blob/e5b0d7c1/metron-interface/metron-alerts/scripts/alerts-server.js -- diff --git a/metron-interface/metron-alerts/scripts/alerts-server.js b/metron-interface/metron-alerts/scripts/alerts-server.js index a6ef528..716f37b 100644 --- a/metron-interface/metron-alerts/scripts/alerts-server.js +++ b/metron-interface/metron-alerts/scripts/alerts-server.js @@ -68,7 +68,7 @@ app.use(serveStatic(path.join(__dirname, '../alerts-ui'), { })); app.get('*', function(req, res){ - res.sendFile(path.join('../alerts-ui/index.html')); + res.sendFile(path.join(__dirname, '../alerts-ui/index.html')); }); app.listen(uiConfig.port, function(){
metron git commit: METRON-1283 Install Elasticsearch template as a part of the mpack startup scripts (anandsubbu via nickwallen) closes apache/metron#817
Repository: metron Updated Branches: refs/heads/master 191d5d84a -> 2488842bd METRON-1283 Install Elasticsearch template as a part of the mpack startup scripts (anandsubbu via nickwallen) closes apache/metron#817 Project: http://git-wip-us.apache.org/repos/asf/metron/repo Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/2488842b Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/2488842b Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/2488842b Branch: refs/heads/master Commit: 2488842bdfc8bf394558be93bc9bb6017759fa57 Parents: 191d5d8 Author: anandsubbu Authored: Mon Oct 30 12:23:27 2017 -0400 Committer: nickallen Committed: Mon Oct 30 12:23:27 2017 -0400 -- .../CURRENT/package/scripts/indexing_commands.py | 7 +++ .../CURRENT/package/scripts/indexing_master.py | 7 +++ .../CURRENT/package/scripts/params/params_linux.py | 1 + .../package/scripts/params/status_params.py| 3 +++ .../roles/load_web_templates/tasks/main.yml| 8 metron-platform/metron-elasticsearch/README.md | 17 - 6 files changed, 34 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/metron/blob/2488842b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_commands.py -- diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_commands.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_commands.py index 17374eb..e6cfabb 100755 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_commands.py +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_commands.py @@ -48,6 +48,7 @@ class IndexingCommands: self.__acl_configured = os.path.isfile(self.__params.indexing_acl_configured_flag_file) self.__hbase_configured = os.path.isfile(self.__params.indexing_hbase_configured_flag_file) self.__hbase_acl_configured = os.path.isfile(self.__params.indexing_hbase_acl_configured_flag_file) +self.__elasticsearch_template_installed = os.path.isfile(self.__params.elasticsearch_template_installed_flag_file) self.__hdfs_perm_configured = os.path.isfile(self.__params.indexing_hdfs_perm_configured_flag_file) def __get_topics(self): @@ -72,6 +73,9 @@ class IndexingCommands: def is_hbase_acl_configured(self): return self.__hbase_acl_configured +def is_elasticsearch_template_installed(self): +return self.__elasticsearch_template_installed + def set_configured(self): metron_service.set_configured(self.__params.metron_user, self.__params.indexing_configured_flag_file, "Setting Indexing configured to True") @@ -87,6 +91,9 @@ class IndexingCommands: def set_hdfs_perm_configured(self): metron_service.set_configured(self.__params.metron_user, self.__params.indexing_hdfs_perm_configured_flag_file, "Setting HDFS perm configured to True") +def set_elasticsearch_template_installed(self): +metron_service.set_configured(self.__params.metron_user, self.__params.elasticsearch_template_installed_flag_file, "Setting Elasticsearch template installed to True") + def create_hbase_tables(self): Logger.info("Creating HBase Tables for indexing") if self.__params.security_enabled: http://git-wip-us.apache.org/repos/asf/metron/blob/2488842b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py -- diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py index 8f156d6..e88b949 100755 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py @@ -80,6 +80,13 @@ class Indexing(Script): from params import params env.set_params(params) self.configure(env) +# Install elasticsearch templates +try: +if not commands.is_elasticsearch_template_installed(): +self.elasticsearch_template_install(env) +
metron git commit: METRON-1254: Conditionals as map keys do not function in Stellar closes apache/incubator-metron#801
Repository: metron Updated Branches: refs/heads/master 5c41bf7f3 -> 191d5d84a METRON-1254: Conditionals as map keys do not function in Stellar closes apache/incubator-metron#801 Project: http://git-wip-us.apache.org/repos/asf/metron/repo Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/191d5d84 Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/191d5d84 Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/191d5d84 Branch: refs/heads/master Commit: 191d5d84ae5ff9f7c464555c6a1285d9c5a702bf Parents: 5c41bf7 Author: cstella Authored: Mon Oct 30 11:44:51 2017 -0400 Committer: cstella Committed: Mon Oct 30 11:44:51 2017 -0400 -- .../metron/stellar/common/generated/Stellar.g4 | 5 + .../metron/stellar/common/StellarCompiler.java | 4 +- .../common/generated/StellarBaseListener.java | 12 + .../common/generated/StellarListener.java | 12 + .../stellar/common/generated/StellarParser.java | 538 +++ .../stellar/dsl/functions/BasicStellarTest.java | 19 + 6 files changed, 366 insertions(+), 224 deletions(-) -- http://git-wip-us.apache.org/repos/asf/metron/blob/191d5d84/metron-stellar/stellar-common/src/main/antlr4/org/apache/metron/stellar/common/generated/Stellar.g4 -- diff --git a/metron-stellar/stellar-common/src/main/antlr4/org/apache/metron/stellar/common/generated/Stellar.g4 b/metron-stellar/stellar-common/src/main/antlr4/org/apache/metron/stellar/common/generated/Stellar.g4 index edd9632..dd92e3d 100644 --- a/metron-stellar/stellar-common/src/main/antlr4/org/apache/metron/stellar/common/generated/Stellar.g4 +++ b/metron-stellar/stellar-common/src/main/antlr4/org/apache/metron/stellar/common/generated/Stellar.g4 @@ -194,6 +194,8 @@ op_list : | op_list COMMA identifier_operand | conditional_expr | op_list COMMA conditional_expr + | comparison_expr + | op_list COMMA comparison_expr ; list_entity : @@ -203,7 +205,9 @@ list_entity : kv_list : identifier_operand COLON transformation_expr + | comparison_expr COLON transformation_expr | kv_list COMMA identifier_operand COLON transformation_expr + | kv_list COMMA comparison_expr COLON transformation_expr ; map_entity : @@ -249,6 +253,7 @@ identifier_operand : | NULL #NullConst | EXISTS LPAREN IDENTIFIER RPAREN #ExistsFunc | LPAREN conditional_expr RPAREN #condExpr_paren + | functions #func ; http://git-wip-us.apache.org/repos/asf/metron/blob/191d5d84/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/StellarCompiler.java -- diff --git a/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/StellarCompiler.java b/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/StellarCompiler.java index fbb5bc0..69564df 100644 --- a/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/StellarCompiler.java +++ b/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/StellarCompiler.java @@ -662,7 +662,7 @@ public class StellarCompiler extends StellarBaseListener { public void exitMap_entity(StellarParser.Map_entityContext ctx) { final FrameContext.Context context = getArgContext(); expression.tokenDeque.push(new Token<>( (tokenDeque, state) -> { - HashMap args = new HashMap<>(); + HashMap args = new HashMap<>(); Object value = null; for (int i = 0; true; i++) { Token token = popDeque(tokenDeque); @@ -672,7 +672,7 @@ public class StellarCompiler extends StellarBaseListener { if (i % 2 == 0) { value = token.getValue(); } else { -args.put(token.getValue() + "", value); +args.put(token.getValue(), value); } } } http://git-wip-us.apache.org/repos/asf/metron/blob/191d5d84/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/generated/StellarBaseListener.java -- diff --git a/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/generated/StellarBaseListener.java b/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/generated/StellarBaseListener.java index 6e0ae8c..d2806b9 100644 --- a/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/generated/StellarBaseListener.java +++ b/metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/generated/StellarBaseListener.java @@ -709,6 +709,18 @@ public class StellarBaseListener implements StellarListener { * * The default implementation does nothing. */ + @Override public void enterFunc