You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metron.apache.org by ce...@apache.org on 2018/07/26 16:29:12 UTC

[1/4] metron git commit: METRON-1606 Add a ' wrap' to incoming messages in the metron json parser (ottobackwards) closes apache/metron#1054

Repository: metron
Updated Branches:
  refs/heads/feature/METRON-1554-pcap-query-panel 6c90724d8 -> 7dff4def2


METRON-1606 Add a 'wrap' to incoming messages in the metron json parser (ottobackwards) closes apache/metron#1054


Project: http://git-wip-us.apache.org/repos/asf/metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/6bac842d
Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/6bac842d
Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/6bac842d

Branch: refs/heads/feature/METRON-1554-pcap-query-panel
Commit: 6bac842d7ad2819c56412837d8befb603ef15f35
Parents: aceca46
Author: ottobackwards <ot...@gmail.com>
Authored: Fri Jul 20 17:44:35 2018 -0400
Committer: otto <ot...@apache.org>
Committed: Fri Jul 20 17:44:35 2018 -0400

----------------------------------------------------------------------
 .../docker/rpm-docker/SPECS/metron.spec         |   1 +
 .../parsed/jsonMapExampleParsed                 |   6 +
 .../raw/jsonMapExampleOutput                    |   3 +
 metron-platform/metron-parsers/README.md        |   5 +
 .../zookeeper/parsers/jsonMapWrappedQuery.json  |   5 +
 .../metron/parsers/json/JSONMapParser.java      |  40 +++-
 .../JSONMapWrappedQueryIntegrationTest.java     |  37 ++++
 .../integration/ParserIntegrationTest.java      |  22 +-
 .../json/JSONMapParserWrappedQueryTest.java     | 199 +++++++++++++++++++
 9 files changed, 299 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/metron/blob/6bac842d/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec b/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec
index 4b88fd0..b308908 100644
--- a/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec
+++ b/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec
@@ -151,6 +151,7 @@ This package installs the Metron Parser files
 %{metron_home}/config/zookeeper/parsers/bro.json
 %{metron_home}/config/zookeeper/parsers/jsonMap.json
 %{metron_home}/config/zookeeper/parsers/jsonMapQuery.json
+%{metron_home}/config/zookeeper/parsers/jsonMapWrappedQuery.json
 %{metron_home}/config/zookeeper/parsers/snort.json
 %{metron_home}/config/zookeeper/parsers/squid.json
 %{metron_home}/config/zookeeper/parsers/websphere.json

http://git-wip-us.apache.org/repos/asf/metron/blob/6bac842d/metron-platform/metron-integration-test/src/main/sample/data/jsonMapWrappedQuery/parsed/jsonMapExampleParsed
----------------------------------------------------------------------
diff --git a/metron-platform/metron-integration-test/src/main/sample/data/jsonMapWrappedQuery/parsed/jsonMapExampleParsed b/metron-platform/metron-integration-test/src/main/sample/data/jsonMapWrappedQuery/parsed/jsonMapExampleParsed
new file mode 100644
index 0000000..c6aac78
--- /dev/null
+++ b/metron-platform/metron-integration-test/src/main/sample/data/jsonMapWrappedQuery/parsed/jsonMapExampleParsed
@@ -0,0 +1,6 @@
+{ "string" : "foo", "number" : 1, "ignored" : [ "blah" ], "original_string":"{ \"string\" : \"foo\", \"number\" : 1, \"ignored\" : [ \"blah\" ] }","timestamp":1000000000000, "source.type":"jsonMapWrappedQuery","guid":"this-is-random-uuid-will-be-36-chars" }
+{ "number" : 4 , "original_string" : "{ \"number\" : 4 }", "source.type":"jsonMapWrappedQuery","timestamp":1000000000000,"guid":"this-is-random-uuid-will-be-36-chars"}
+{ "string" : "bar", "number" : 2, "ignored" : [ "blah" ], "original_string":"{ \"string\" : \"bar\", \"number\" : 2, \"ignored\" : [ \"blah\" ] }","timestamp":1000000000000, "source.type":"jsonMapWrappedQuery","guid":"this-is-random-uuid-will-be-36-chars" }
+{ "number" : 5 , "original_string" : "{ \"number\" : 5 }", "source.type":"jsonMapWrappedQuery","timestamp":1000000000000,"guid":"this-is-random-uuid-will-be-36-chars"}
+{ "string" : "baz", "number" : 3, "ignored" : [ "blah" ], "original_string":"{ \"string\" : \"baz\", \"number\" : 3, \"ignored\" : [ \"blah\" ] }","timestamp":1000000000000, "source.type":"jsonMapWrappedQuery","guid":"this-is-random-uuid-will-be-36-chars" }
+{ "number" : 6 , "original_string" : "{ \"number\" : 6 }", "source.type":"jsonMapWrappedQuery","timestamp":1000000000000,"guid":"this-is-random-uuid-will-be-36-chars"}

http://git-wip-us.apache.org/repos/asf/metron/blob/6bac842d/metron-platform/metron-integration-test/src/main/sample/data/jsonMapWrappedQuery/raw/jsonMapExampleOutput
----------------------------------------------------------------------
diff --git a/metron-platform/metron-integration-test/src/main/sample/data/jsonMapWrappedQuery/raw/jsonMapExampleOutput b/metron-platform/metron-integration-test/src/main/sample/data/jsonMapWrappedQuery/raw/jsonMapExampleOutput
new file mode 100644
index 0000000..f142a55
--- /dev/null
+++ b/metron-platform/metron-integration-test/src/main/sample/data/jsonMapWrappedQuery/raw/jsonMapExampleOutput
@@ -0,0 +1,3 @@
+{ "string" : "foo", "number" : 1, "ignored" : [ "blah" ] },{ "number" : 4 },
+{ "string" : "bar", "number" : 2, "ignored" : [ "blah" ] },{ "number" : 5 },
+{ "string" : "baz", "number" : 3, "ignored" : [ "blah" ] },{ "number" : 6 }

http://git-wip-us.apache.org/repos/asf/metron/blob/6bac842d/metron-platform/metron-parsers/README.md
----------------------------------------------------------------------
diff --git a/metron-platform/metron-parsers/README.md b/metron-platform/metron-parsers/README.md
index 0e428e3..fd6b470 100644
--- a/metron-platform/metron-parsers/README.md
+++ b/metron-platform/metron-parsers/README.md
@@ -44,6 +44,11 @@ There are two general types types of parsers:
       * `ALLOW` : Allow multidimensional maps
       * `ERROR` : Throw an error when a multidimensional map is encountered
     * `jsonpQuery` : A [JSON Path](#json_path) query string. If present, the result of the JSON Path query should be a list of messages. This is useful if you have a JSON document which contains a list or array of messages embedded in it, and you do not have another means of splitting the message.
+    * `wrapInEntityArray` : `"true" or "false"`. If `jsonQuery` is present and this flag is present and set to `"true"`, the incoming message will be wrapped in a JSON  entity and array.
+       for example:
+       `{"name":"value"},{"name2","value2}` will be wrapped as `{"message" : [{"name":"value"},{"name2","value2}]}`.
+       This is using the default value for `wrapEntityName` if that property is not set.
+    * `wrapEntityName` : Sets the name to use when wrapping JSON using `wrapInEntityArray`.  The `jsonpQuery` should reference this name.
     * A field called `timestamp` is expected to exist and, if it does not, then current time is inserted.  
 
 ## Parser Error Routing

http://git-wip-us.apache.org/repos/asf/metron/blob/6bac842d/metron-platform/metron-parsers/src/main/config/zookeeper/parsers/jsonMapWrappedQuery.json
----------------------------------------------------------------------
diff --git a/metron-platform/metron-parsers/src/main/config/zookeeper/parsers/jsonMapWrappedQuery.json b/metron-platform/metron-parsers/src/main/config/zookeeper/parsers/jsonMapWrappedQuery.json
new file mode 100644
index 0000000..3e960e0
--- /dev/null
+++ b/metron-platform/metron-parsers/src/main/config/zookeeper/parsers/jsonMapWrappedQuery.json
@@ -0,0 +1,5 @@
+{
+  "parserClassName":"org.apache.metron.parsers.json.JSONMapParser",
+  "sensorTopic":"jsonMapWrappedQuery",
+  "parserConfig": {"jsonpQuery":"$.foo","wrapInEntityArray":"true","wrapEntityName":"foo"}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/metron/blob/6bac842d/metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/json/JSONMapParser.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/json/JSONMapParser.java b/metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/json/JSONMapParser.java
index f5d67f9..0acc96c 100644
--- a/metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/json/JSONMapParser.java
+++ b/metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/json/JSONMapParser.java
@@ -35,6 +35,7 @@ import java.util.EnumSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+
 import org.apache.commons.lang3.StringUtils;
 import org.apache.metron.common.utils.JSONUtils;
 import org.apache.metron.parsers.BasicParser;
@@ -87,10 +88,18 @@ public class JSONMapParser extends BasicParser {
 
   public static final String MAP_STRATEGY_CONFIG = "mapStrategy";
   public static final String JSONP_QUERY = "jsonpQuery";
+  public static final String WRAP_JSON = "wrapInEntityArray";
+  public static final String WRAP_ENTITY_NAME = "wrapEntityName";
+  public static final String DEFAULT_WRAP_ENTITY_NAME = "messages";
+
+  private static final String WRAP_START_FMT = "{ \"%s\" : [";
+  private static final String WRAP_END = "]}";
 
   private MapStrategy mapStrategy = MapStrategy.DROP;
   private transient TypeRef<List<Map<String, Object>>> typeRef = null;
   private String jsonpQuery = null;
+  private String wrapEntityName = DEFAULT_WRAP_ENTITY_NAME;
+  private boolean wrapJson = false;
 
 
   @Override
@@ -100,6 +109,20 @@ public class JSONMapParser extends BasicParser {
     if (config.containsKey(JSONP_QUERY)) {
       typeRef = new TypeRef<List<Map<String, Object>>>() { };
       jsonpQuery = (String) config.get(JSONP_QUERY);
+
+      if (!StringUtils.isBlank(jsonpQuery) && config.containsKey(WRAP_JSON)) {
+        Object wrapObject = config.get(WRAP_JSON);
+        if (wrapObject instanceof String) {
+          wrapJson = Boolean.valueOf((String)wrapObject);
+        } else if (wrapObject instanceof Boolean) {
+          wrapJson = (Boolean) config.get(WRAP_JSON);
+        }
+        String entityName = (String)config.get(WRAP_ENTITY_NAME);
+        if (!StringUtils.isBlank(entityName)) {
+          wrapEntityName = entityName;
+        }
+      }
+
       Configuration.setDefaults(new Configuration.Defaults() {
 
         private final JsonProvider jsonProvider = new JacksonJsonProvider();
@@ -147,9 +170,14 @@ public class JSONMapParser extends BasicParser {
       String originalString = new String(rawMessage);
       List<Map<String, Object>> messages = new ArrayList<>();
 
+      // if configured, wrap the json in an entity and array
+      if (wrapJson) {
+        originalString = wrapMessageJson(originalString);
+      }
+
       if (!StringUtils.isEmpty(jsonpQuery)) {
-        Object parsedObject = JsonPath.parse(new String(rawMessage)).read(jsonpQuery, typeRef);
-        if(parsedObject != null) {
+        Object parsedObject = JsonPath.parse(originalString).read(jsonpQuery, typeRef);
+        if (parsedObject != null) {
           messages.addAll((List<Map<String,Object>>)parsedObject);
         }
       } else {
@@ -192,4 +220,12 @@ public class JSONMapParser extends BasicParser {
     return ret;
   }
 
+  private String wrapMessageJson(String jsonMessage) {
+    String base = new StringBuilder(String.format(WRAP_START_FMT,wrapEntityName))
+            .append(jsonMessage).toString().trim();
+    if (base.endsWith(",")) {
+      base = base.substring(0, base.length() - 1);
+    }
+    return base + WRAP_END;
+  }
 }

http://git-wip-us.apache.org/repos/asf/metron/blob/6bac842d/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/integration/JSONMapWrappedQueryIntegrationTest.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/integration/JSONMapWrappedQueryIntegrationTest.java b/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/integration/JSONMapWrappedQueryIntegrationTest.java
new file mode 100644
index 0000000..569e175
--- /dev/null
+++ b/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/integration/JSONMapWrappedQueryIntegrationTest.java
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.metron.parsers.integration;
+
+import org.apache.metron.parsers.integration.validation.SampleDataValidation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class JSONMapWrappedQueryIntegrationTest extends ParserIntegrationTest {
+  @Override
+  String getSensorType() {
+    return "jsonMapWrappedQuery";
+  }
+
+  @Override
+  List<ParserValidation> getValidations() {
+    return new ArrayList<ParserValidation>() {{
+      add(new SampleDataValidation());
+    }};
+  }
+}

http://git-wip-us.apache.org/repos/asf/metron/blob/6bac842d/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/integration/ParserIntegrationTest.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/integration/ParserIntegrationTest.java b/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/integration/ParserIntegrationTest.java
index cd3d005..6b00a2b 100644
--- a/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/integration/ParserIntegrationTest.java
+++ b/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/integration/ParserIntegrationTest.java
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -17,31 +17,19 @@
  */
 package org.apache.metron.parsers.integration;
 
-import com.google.common.base.Function;
 import org.apache.metron.TestConstants;
-import org.apache.metron.common.Constants;
-import org.apache.metron.enrichment.integration.components.ConfigUploadComponent;
-import org.apache.metron.integration.*;
-import org.apache.metron.integration.components.KafkaComponent;
-import org.apache.metron.integration.processors.KafkaMessageSet;
-import org.apache.metron.integration.components.ZKServerComponent;
-import org.apache.metron.integration.processors.KafkaProcessor;
+import org.apache.metron.integration.BaseIntegrationTest;
+import org.apache.metron.integration.ProcessorResult;
 import org.apache.metron.integration.utils.TestUtils;
-import org.apache.metron.parsers.integration.components.ParserTopologyComponent;
 import org.apache.metron.test.TestDataType;
 import org.apache.metron.test.utils.SampleDataUtils;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
-import javax.annotation.Nullable;
 import java.io.File;
 import java.io.IOException;
 import java.nio.file.Files;
-import java.util.*;
+import java.util.List;
 
 public abstract class ParserIntegrationTest extends BaseIntegrationTest {
   protected List<byte[]> inputMessages;
@@ -74,7 +62,7 @@ public abstract class ParserIntegrationTest extends BaseIntegrationTest {
     } else {
       List<ParserValidation> validations = getValidations();
       if (validations == null || validations.isEmpty()) {
-        buffer.append("No validations configured for sensorType " + sensorType + ".  Dumping parsed messages").append("\n");
+        buffer.append("No validations configured for sensorType ").append(sensorType).append(".  Dumping parsed messages").append("\n");
         dumpParsedMessages(outputMessages,buffer);
         Assert.fail(buffer.toString());
       } else {

http://git-wip-us.apache.org/repos/asf/metron/blob/6bac842d/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/json/JSONMapParserWrappedQueryTest.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/json/JSONMapParserWrappedQueryTest.java b/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/json/JSONMapParserWrappedQueryTest.java
new file mode 100644
index 0000000..0da45dd
--- /dev/null
+++ b/metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/json/JSONMapParserWrappedQueryTest.java
@@ -0,0 +1,199 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.metron.parsers.json;
+
+import com.google.common.collect.ImmutableMap;
+import org.adrianwalker.multilinestring.Multiline;
+import org.apache.log4j.Level;
+import org.apache.metron.parsers.BasicParser;
+import org.apache.metron.test.utils.UnitTestHelper;
+import org.json.simple.JSONObject;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.List;
+
+public class JSONMapParserWrappedQueryTest {
+
+  /**
+   * { "name" : "foo1", "value" : "bar", "number" : 1.0 },
+   * { "name" : "foo2", "value" : "baz", "number" : 2.0 }
+   */
+  @Multiline
+  static String JSON_LIST;
+
+  /**
+   * { "name" : "foo1", "value" : "bar", "number" : 1.0 }
+   */
+  @Multiline
+  static String JSON_SINGLE;
+
+  /**
+   * { "name" : "foo2", "value" : "baz", "number" : 2.0 }
+   */
+  @Multiline
+  static String JSON_SINGLE2;
+
+  @Test
+  public void testHappyPath() {
+    JSONMapParser parser = new JSONMapParser();
+    parser.configure(new HashMap<String, Object>() {{
+      put(JSONMapParser.WRAP_JSON,true);
+      put(JSONMapParser.WRAP_ENTITY_NAME,"foo");
+      put(JSONMapParser.JSONP_QUERY, "$.foo");
+    }});
+    List<JSONObject> output = parser.parse(JSON_LIST.getBytes());
+    Assert.assertEquals(output.size(), 2);
+    //don't forget the timestamp field!
+    Assert.assertEquals(output.get(0).size(), 5);
+    JSONObject message = output.get(0);
+    Assert.assertEquals("foo1", message.get("name"));
+    Assert.assertEquals("bar", message.get("value"));
+    Assert.assertEquals(1.0, message.get("number"));
+    Assert.assertNotNull(message.get("timestamp"));
+    Assert.assertTrue(message.get("timestamp") instanceof Number);
+    Assert.assertNotNull(message.get("number"));
+    Assert.assertTrue(message.get("number") instanceof Number);
+
+    message = output.get(1);
+    Assert.assertEquals("foo2", message.get("name"));
+    Assert.assertEquals("baz", message.get("value"));
+    Assert.assertEquals(2.0, message.get("number"));
+    Assert.assertNotNull(message.get("timestamp"));
+    Assert.assertTrue(message.get("timestamp") instanceof Number);
+    Assert.assertNotNull(message.get("number"));
+    Assert.assertTrue(message.get("number") instanceof Number);
+
+  }
+
+  @Test(expected = IllegalStateException.class)
+  public void testInvalidJSONPathThrows() {
+    JSONMapParser parser = new JSONMapParser();
+    parser.configure(new HashMap<String, Object>() {{
+      put(JSONMapParser.JSONP_QUERY, "$$..$$SDSE$#$#.");
+    }});
+    List<JSONObject> output = parser.parse(JSON_LIST.getBytes());
+
+  }
+
+  @Test
+  public void testNoMatchesNoExceptions() {
+    JSONMapParser parser = new JSONMapParser();
+    parser.configure(new HashMap<String, Object>() {{
+      put(JSONMapParser.JSONP_QUERY, "$.foo");
+    }});
+    List<JSONObject> output = parser.parse(JSON_SINGLE.getBytes());
+    Assert.assertEquals(0, output.size());
+  }
+
+  /**
+   * {
+   * "foo" :
+   * [
+   * {
+   * "collection" : { "blah" : 7, "blah2" : "foo", "bigblah" : { "innerBlah" : "baz", "reallyInnerBlah" : { "color" : "grey" }}}
+   * },
+   * {
+   * "collection" : { "blah" : 8, "blah2" : "bar", "bigblah" : { "innerBlah" : "baz2", "reallyInnerBlah" : { "color" : "blue" }}}
+   * }
+   * ]
+   * }
+   */
+  @Multiline
+  static String collectionHandlingJSON;
+
+  @Test
+  public void testCollectionHandlingDrop() {
+    JSONMapParser parser = new JSONMapParser();
+    parser.configure(new HashMap<String, Object>() {{
+      put(JSONMapParser.JSONP_QUERY, "$.foo");
+    }});
+    List<JSONObject> output = parser.parse(collectionHandlingJSON.getBytes());
+    Assert.assertEquals(output.size(), 2);
+
+    //don't forget the timestamp field!
+    Assert.assertEquals(output.get(0).size(), 2);
+
+    JSONObject message = output.get(0);
+    Assert.assertNotNull(message.get("timestamp"));
+    Assert.assertTrue(message.get("timestamp") instanceof Number);
+
+    message = output.get(1);
+    Assert.assertNotNull(message.get("timestamp"));
+    Assert.assertTrue(message.get("timestamp") instanceof Number);
+  }
+
+  @Test(expected = IllegalStateException.class)
+  public void testCollectionHandlingError() {
+    JSONMapParser parser = new JSONMapParser();
+    parser.configure(ImmutableMap
+        .of(JSONMapParser.MAP_STRATEGY_CONFIG, JSONMapParser.MapStrategy.ERROR.name(),
+            JSONMapParser.JSONP_QUERY, "$.foo"));
+    UnitTestHelper.setLog4jLevel(BasicParser.class, Level.FATAL);
+    parser.parse(collectionHandlingJSON.getBytes());
+    UnitTestHelper.setLog4jLevel(BasicParser.class, Level.ERROR);
+  }
+
+
+  @Test
+  public void testCollectionHandlingAllow() {
+    JSONMapParser parser = new JSONMapParser();
+    parser.configure(ImmutableMap
+        .of(JSONMapParser.MAP_STRATEGY_CONFIG, JSONMapParser.MapStrategy.ALLOW.name(),
+            JSONMapParser.JSONP_QUERY, "$.foo"));
+    List<JSONObject> output = parser.parse(collectionHandlingJSON.getBytes());
+    Assert.assertEquals(output.size(), 2);
+    Assert.assertEquals(output.get(0).size(), 3);
+    JSONObject message = output.get(0);
+    Assert.assertNotNull(message.get("timestamp"));
+    Assert.assertTrue(message.get("timestamp") instanceof Number);
+
+    Assert.assertEquals(output.get(1).size(), 3);
+    message = output.get(1);
+    Assert.assertNotNull(message.get("timestamp"));
+    Assert.assertTrue(message.get("timestamp") instanceof Number);
+  }
+
+  @Test
+  public void testCollectionHandlingUnfold() {
+    JSONMapParser parser = new JSONMapParser();
+    parser.configure(ImmutableMap
+        .of(JSONMapParser.MAP_STRATEGY_CONFIG, JSONMapParser.MapStrategy.UNFOLD.name(),
+            JSONMapParser.JSONP_QUERY, "$.foo"));
+    List<JSONObject> output = parser.parse(collectionHandlingJSON.getBytes());
+    Assert.assertEquals(output.size(), 2);
+    Assert.assertEquals(output.get(0).size(), 6);
+    JSONObject message = output.get(0);
+    Assert.assertEquals(message.get("collection.blah"), 7);
+    Assert.assertEquals(message.get("collection.blah2"), "foo");
+    Assert.assertEquals(message.get("collection.bigblah.innerBlah"), "baz");
+    Assert.assertEquals(message.get("collection.bigblah.reallyInnerBlah.color"), "grey");
+    Assert.assertNotNull(message.get("timestamp"));
+    Assert.assertTrue(message.get("timestamp") instanceof Number);
+
+    Assert.assertEquals(output.get(1).size(), 6);
+    message = output.get(1);
+    Assert.assertEquals(message.get("collection.blah"), 8);
+    Assert.assertEquals(message.get("collection.blah2"), "bar");
+    Assert.assertEquals(message.get("collection.bigblah.innerBlah"), "baz2");
+    Assert.assertEquals(message.get("collection.bigblah.reallyInnerBlah.color"), "blue");
+    Assert.assertNotNull(message.get("timestamp"));
+    Assert.assertTrue(message.get("timestamp") instanceof Number);
+  }
+}


[3/4] metron git commit: METRON-1687: Upgrade the rat plugin to 0.13-SNAPSHOT closes apache/incubator-metron#1126

Posted by ce...@apache.org.
METRON-1687: Upgrade the rat plugin to 0.13-SNAPSHOT closes apache/incubator-metron#1126


Project: http://git-wip-us.apache.org/repos/asf/metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/ccdbeff5
Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/ccdbeff5
Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/ccdbeff5

Branch: refs/heads/feature/METRON-1554-pcap-query-panel
Commit: ccdbeff5076553382091d4b9423ed48ccdba10ee
Parents: 44a6f6f
Author: cstella <ce...@gmail.com>
Authored: Thu Jul 26 09:44:59 2018 -0400
Committer: cstella <ce...@gmail.com>
Committed: Thu Jul 26 09:44:59 2018 -0400

----------------------------------------------------------------------
 .../e2e/utils/clean_metron_update_table.ts      | 18 ++++++++++++++++++
 .../metron-alerts/e2e/utils/e2e_util.ts         | 20 +++++++++++++++++++-
 .../alert-filters.component.spec.ts             | 18 ++++++++++++++++++
 .../alert-filters/alert-filters.component.ts    | 20 +++++++++++++++++++-
 .../table-view/table-view.component.spec.ts     | 18 ++++++++++++++++++
 .../tree-view/tree-view.component.spec.ts       | 18 ++++++++++++++++++
 .../alerts/meta-alerts/meta-alerts.module.ts    | 18 ++++++++++++++++++
 .../date-picker/date-picker.component.spec.ts   | 18 ++++++++++++++++++
 .../shared/date-picker/date-picker.component.ts | 18 ++++++++++++++++++
 .../shared/date-picker/date-picker.module.ts    | 18 ++++++++++++++++++
 .../alert-severity-hexagon.directive.spec.ts    | 18 ++++++++++++++++++
 .../app/shared/group-by/group-by.component.ts   | 18 ++++++++++++++++++
 .../metron-alerts/src/app/shared/index.ts       | 18 ++++++++++++++++++
 .../src/app/shared/pipes/map-keys.pipe.spec.ts  | 18 ++++++++++++++++++
 .../src/app/shared/pipes/map-keys.pipe.ts       | 18 ++++++++++++++++++
 .../src/app/shared/pipes/time-lapse.pipe.ts     | 18 ++++++++++++++++++
 .../time-range/time-range.component.spec.ts     | 18 ++++++++++++++++++
 .../app/shared/time-range/time-range.module.ts  | 18 ++++++++++++++++++
 metron-interface/metron-alerts/src/polyfills.ts | 18 ++++++++++++++++++
 .../metron-config/e2e/utils/e2e_util.ts         | 18 ++++++++++++++++++
 .../src/app/app.config.interface.ts             | 18 ++++++++++++++++++
 .../metron-config/src/app/app.config.ts         | 18 ++++++++++++++++++
 .../sensor-grok/sensor-grok.component.ts        | 18 ++++++++++++++++++
 .../sensor-parser-config-readonly/index.ts      | 18 ++++++++++++++++++
 .../app/sensors/sensor-parser-config/index.ts   | 18 ++++++++++++++++++
 .../shared/ace-editor/ace-editor.component.ts   | 18 ++++++++++++++++++
 .../app/shared/ace-editor/ace-editor.module.ts  | 18 ++++++++++++++++++
 .../advanced-config-form.module.ts              | 18 ++++++++++++++++++
 .../src/app/shared/metron-modal/index.ts        | 18 ++++++++++++++++++
 .../shared/metron-table/metron-sorter/index.ts  | 18 ++++++++++++++++++
 .../metron-sorter.component.spec.ts             | 18 ++++++++++++++++++
 .../metron-sorter/metron-sorter.component.ts    | 18 ++++++++++++++++++
 .../shared/metron-table/metron-table.module.ts  | 18 ++++++++++++++++++
 .../src/app/shared/multiple-input/index.ts      | 18 ++++++++++++++++++
 .../multiple-input/multiple-input.module.ts     | 18 ++++++++++++++++++
 .../src/app/shared/number-spinner/index.ts      | 18 ++++++++++++++++++
 .../number-spinner/number-spinner.module.ts     | 18 ++++++++++++++++++
 .../shared/sample-data/sample-data.module.ts    | 18 ++++++++++++++++++
 .../src/environments/environment.prod.ts        | 18 ++++++++++++++++++
 .../src/environments/environment.ts             | 18 ++++++++++++++++++
 pom.xml                                         | 19 +++++++++++++++++--
 41 files changed, 739 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/e2e/utils/clean_metron_update_table.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/e2e/utils/clean_metron_update_table.ts b/metron-interface/metron-alerts/e2e/utils/clean_metron_update_table.ts
index c6e99df..e4da2be 100644
--- a/metron-interface/metron-alerts/e2e/utils/clean_metron_update_table.ts
+++ b/metron-interface/metron-alerts/e2e/utils/clean_metron_update_table.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 declare var Promise: any;
 var chalk = require('chalk');
 var Client = require('ssh2').Client;

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/e2e/utils/e2e_util.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/e2e/utils/e2e_util.ts b/metron-interface/metron-alerts/e2e/utils/e2e_util.ts
index 428910a..5abe309 100644
--- a/metron-interface/metron-alerts/e2e/utils/e2e_util.ts
+++ b/metron-interface/metron-alerts/e2e/utils/e2e_util.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { browser, protractor, by, element, ElementFinder } from 'protractor';
 import request = require('request');
 import fs = require('fs');
@@ -250,4 +268,4 @@ export function createMetaAlertsIndex() {
 
 export function deleteMetaAlertsIndex() {
   request.delete('http://node1:9200/metaalert_index*');
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/alerts/alerts-list/alert-filters/alert-filters.component.spec.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/alerts/alerts-list/alert-filters/alert-filters.component.spec.ts b/metron-interface/metron-alerts/src/app/alerts/alerts-list/alert-filters/alert-filters.component.spec.ts
index 7cbcdcc..b6283a6 100644
--- a/metron-interface/metron-alerts/src/app/alerts/alerts-list/alert-filters/alert-filters.component.spec.ts
+++ b/metron-interface/metron-alerts/src/app/alerts/alerts-list/alert-filters/alert-filters.component.spec.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 
 import { CollapseComponent } from '../../../shared/collapse/collapse.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/alerts/alerts-list/alert-filters/alert-filters.component.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/alerts/alerts-list/alert-filters/alert-filters.component.ts b/metron-interface/metron-alerts/src/app/alerts/alerts-list/alert-filters/alert-filters.component.ts
index a448e3e..9374242 100644
--- a/metron-interface/metron-alerts/src/app/alerts/alerts-list/alert-filters/alert-filters.component.ts
+++ b/metron-interface/metron-alerts/src/app/alerts/alerts-list/alert-filters/alert-filters.component.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import {Component, OnChanges, Input, SimpleChanges, EventEmitter, Output} from '@angular/core';
 import {Facets} from '../../../model/facets';
 import {
@@ -52,4 +70,4 @@ export class AlertFiltersComponent implements OnChanges {
   onFacetFilterSelect($event) {
     this.facetFilterChange.emit($event);
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.spec.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.spec.ts b/metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.spec.ts
index 84ed557..46521e6 100644
--- a/metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.spec.ts
+++ b/metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.spec.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 import { Component, Input } from '@angular/core';
 import { HttpModule } from '@angular/http';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/alerts/alerts-list/tree-view/tree-view.component.spec.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/alerts/alerts-list/tree-view/tree-view.component.spec.ts b/metron-interface/metron-alerts/src/app/alerts/alerts-list/tree-view/tree-view.component.spec.ts
index c11cd2f..e86714c 100644
--- a/metron-interface/metron-alerts/src/app/alerts/alerts-list/tree-view/tree-view.component.spec.ts
+++ b/metron-interface/metron-alerts/src/app/alerts/alerts-list/tree-view/tree-view.component.spec.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 import { HttpModule } from '@angular/http';
 

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.module.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.module.ts b/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.module.ts
index 578063d..3f5de42 100644
--- a/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.module.ts
+++ b/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.module.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { NgModule } from '@angular/core';
 
 import {routing} from './meta-alerts.routing';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.component.spec.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.component.spec.ts b/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.component.spec.ts
index 673e598..a7765e0 100644
--- a/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.component.spec.ts
+++ b/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.component.spec.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 
 import { DatePickerComponent } from './date-picker.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.component.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.component.ts b/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.component.ts
index 3ed7df9..d58bb5f 100644
--- a/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.component.ts
+++ b/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.component.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { Component, OnInit, ViewChild, ElementRef, OnChanges, SimpleChanges, Input, Output, EventEmitter } from '@angular/core';
 import * as moment from 'moment/moment';
 import * as Pikaday from "pikaday-time";

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.module.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.module.ts b/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.module.ts
index ded9881..d59d566 100644
--- a/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.module.ts
+++ b/metron-interface/metron-alerts/src/app/shared/date-picker/date-picker.module.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { NgModule } from '@angular/core';
 import { CommonModule }        from '@angular/common';
 import { FormsModule }         from '@angular/forms';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/shared/directives/alert-severity-hexagon.directive.spec.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/shared/directives/alert-severity-hexagon.directive.spec.ts b/metron-interface/metron-alerts/src/app/shared/directives/alert-severity-hexagon.directive.spec.ts
index d0909b7..ec98ad3 100644
--- a/metron-interface/metron-alerts/src/app/shared/directives/alert-severity-hexagon.directive.spec.ts
+++ b/metron-interface/metron-alerts/src/app/shared/directives/alert-severity-hexagon.directive.spec.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { ElementRef } from '@angular/core';
 import { AlertSeverityHexagonDirective } from './alert-severity-hexagon.directive';
 

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/shared/group-by/group-by.component.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/shared/group-by/group-by.component.ts b/metron-interface/metron-alerts/src/app/shared/group-by/group-by.component.ts
index 2e034d5..de2f439 100644
--- a/metron-interface/metron-alerts/src/app/shared/group-by/group-by.component.ts
+++ b/metron-interface/metron-alerts/src/app/shared/group-by/group-by.component.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { Component, OnInit, Input, EventEmitter, Output, OnChanges, SimpleChanges } from '@angular/core';
 import { DragulaService } from 'ng2-dragula/ng2-dragula';
 import {Facets} from '../../model/facets';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/shared/index.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/shared/index.ts b/metron-interface/metron-alerts/src/app/shared/index.ts
index e69de29..a0ff001 100644
--- a/metron-interface/metron-alerts/src/app/shared/index.ts
+++ b/metron-interface/metron-alerts/src/app/shared/index.ts
@@ -0,0 +1,18 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/shared/pipes/map-keys.pipe.spec.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/shared/pipes/map-keys.pipe.spec.ts b/metron-interface/metron-alerts/src/app/shared/pipes/map-keys.pipe.spec.ts
index 193ed66..dbca9b6 100644
--- a/metron-interface/metron-alerts/src/app/shared/pipes/map-keys.pipe.spec.ts
+++ b/metron-interface/metron-alerts/src/app/shared/pipes/map-keys.pipe.spec.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { MapKeysPipe } from './map-keys.pipe';
 
 describe('MapKeysPipe', () => {

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/shared/pipes/map-keys.pipe.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/shared/pipes/map-keys.pipe.ts b/metron-interface/metron-alerts/src/app/shared/pipes/map-keys.pipe.ts
index 5bf8013..29fceb3 100644
--- a/metron-interface/metron-alerts/src/app/shared/pipes/map-keys.pipe.ts
+++ b/metron-interface/metron-alerts/src/app/shared/pipes/map-keys.pipe.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { Pipe, PipeTransform } from '@angular/core';
 
 @Pipe({

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/shared/pipes/time-lapse.pipe.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/shared/pipes/time-lapse.pipe.ts b/metron-interface/metron-alerts/src/app/shared/pipes/time-lapse.pipe.ts
index 5515ef5..1458a58 100644
--- a/metron-interface/metron-alerts/src/app/shared/pipes/time-lapse.pipe.ts
+++ b/metron-interface/metron-alerts/src/app/shared/pipes/time-lapse.pipe.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { Pipe, PipeTransform } from '@angular/core';
 import * as moment from 'moment/moment';
 

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/shared/time-range/time-range.component.spec.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/shared/time-range/time-range.component.spec.ts b/metron-interface/metron-alerts/src/app/shared/time-range/time-range.component.spec.ts
index 157bf52..4b33b1d 100644
--- a/metron-interface/metron-alerts/src/app/shared/time-range/time-range.component.spec.ts
+++ b/metron-interface/metron-alerts/src/app/shared/time-range/time-range.component.spec.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 
 import { TimeRangeComponent } from './time-range.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/app/shared/time-range/time-range.module.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/app/shared/time-range/time-range.module.ts b/metron-interface/metron-alerts/src/app/shared/time-range/time-range.module.ts
index 412ea39..e19d822 100644
--- a/metron-interface/metron-alerts/src/app/shared/time-range/time-range.module.ts
+++ b/metron-interface/metron-alerts/src/app/shared/time-range/time-range.module.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import {TimeRangeComponent} from './time-range.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-alerts/src/polyfills.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/src/polyfills.ts b/metron-interface/metron-alerts/src/polyfills.ts
index 400600c..a18604d 100644
--- a/metron-interface/metron-alerts/src/polyfills.ts
+++ b/metron-interface/metron-alerts/src/polyfills.ts
@@ -1,4 +1,22 @@
 /**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
  * This file includes polyfills needed by Angular and is loaded before the app.
  * You can add your own extra polyfills to this file.
  *

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/e2e/utils/e2e_util.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/e2e/utils/e2e_util.ts b/metron-interface/metron-config/e2e/utils/e2e_util.ts
index 7ca9960..265e75e 100644
--- a/metron-interface/metron-config/e2e/utils/e2e_util.ts
+++ b/metron-interface/metron-config/e2e/utils/e2e_util.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { browser, protractor } from 'protractor/globals';
 
 export function changeURL(url: string) {

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/app.config.interface.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/app.config.interface.ts b/metron-interface/metron-config/src/app/app.config.interface.ts
index de9d7bd..4845b46 100644
--- a/metron-interface/metron-config/src/app/app.config.interface.ts
+++ b/metron-interface/metron-config/src/app/app.config.interface.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 export interface IAppConfig {
   apiEndpoint: string;
 }

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/app.config.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/app.config.ts b/metron-interface/metron-config/src/app/app.config.ts
index af4b360..27f24c4 100644
--- a/metron-interface/metron-config/src/app/app.config.ts
+++ b/metron-interface/metron-config/src/app/app.config.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { OpaqueToken } from '@angular/core';
 import {IAppConfig} from './app.config.interface';
 

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/sensors/sensor-grok/sensor-grok.component.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/sensors/sensor-grok/sensor-grok.component.ts b/metron-interface/metron-config/src/app/sensors/sensor-grok/sensor-grok.component.ts
index c8bf513..a7d4c8c 100644
--- a/metron-interface/metron-config/src/app/sensors/sensor-grok/sensor-grok.component.ts
+++ b/metron-interface/metron-config/src/app/sensors/sensor-grok/sensor-grok.component.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { Component, OnInit, Input, OnChanges, SimpleChanges, ViewChild, EventEmitter, Output} from '@angular/core';
 import {SensorParserConfig} from '../../model/sensor-parser-config';
 import {ParseMessageRequest} from '../../model/parse-message-request';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/sensors/sensor-parser-config-readonly/index.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/sensors/sensor-parser-config-readonly/index.ts b/metron-interface/metron-config/src/app/sensors/sensor-parser-config-readonly/index.ts
index 3a63c39..20acfe3 100644
--- a/metron-interface/metron-config/src/app/sensors/sensor-parser-config-readonly/index.ts
+++ b/metron-interface/metron-config/src/app/sensors/sensor-parser-config-readonly/index.ts
@@ -1 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 export * from './sensor-parser-config-readonly.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/sensors/sensor-parser-config/index.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/sensors/sensor-parser-config/index.ts b/metron-interface/metron-config/src/app/sensors/sensor-parser-config/index.ts
index f108057..d084b9f 100644
--- a/metron-interface/metron-config/src/app/sensors/sensor-parser-config/index.ts
+++ b/metron-interface/metron-config/src/app/sensors/sensor-parser-config/index.ts
@@ -1 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 export * from './sensor-parser-config.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/ace-editor/ace-editor.component.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/ace-editor/ace-editor.component.ts b/metron-interface/metron-config/src/app/shared/ace-editor/ace-editor.component.ts
index d5edd83..45684a0 100644
--- a/metron-interface/metron-config/src/app/shared/ace-editor/ace-editor.component.ts
+++ b/metron-interface/metron-config/src/app/shared/ace-editor/ace-editor.component.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { Component, AfterViewInit, ViewChild, ElementRef, forwardRef, Input} from '@angular/core';
 import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
 import Editor = AceAjax.Editor;

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/ace-editor/ace-editor.module.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/ace-editor/ace-editor.module.ts b/metron-interface/metron-config/src/app/shared/ace-editor/ace-editor.module.ts
index 56817da..be962fd 100644
--- a/metron-interface/metron-config/src/app/shared/ace-editor/ace-editor.module.ts
+++ b/metron-interface/metron-config/src/app/shared/ace-editor/ace-editor.module.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import {NgModule} from '@angular/core';
 
 import {AceEditorComponent}   from './ace-editor.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/advanced-config-form/advanced-config-form.module.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/advanced-config-form/advanced-config-form.module.ts b/metron-interface/metron-config/src/app/shared/advanced-config-form/advanced-config-form.module.ts
index d29a369..5a33bd9 100644
--- a/metron-interface/metron-config/src/app/shared/advanced-config-form/advanced-config-form.module.ts
+++ b/metron-interface/metron-config/src/app/shared/advanced-config-form/advanced-config-form.module.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import {NgModule} from '@angular/core';
 
 import {AdvancedConfigFormComponent}   from './advanced-config-form.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/metron-modal/index.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/metron-modal/index.ts b/metron-interface/metron-config/src/app/shared/metron-modal/index.ts
index ec19caf..b08952b 100644
--- a/metron-interface/metron-config/src/app/shared/metron-modal/index.ts
+++ b/metron-interface/metron-config/src/app/shared/metron-modal/index.ts
@@ -1 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 export * from './metron-modal.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/index.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/index.ts b/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/index.ts
index 325568a..cea3692 100644
--- a/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/index.ts
+++ b/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/index.ts
@@ -1 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 export * from './metron-sorter.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/metron-sorter.component.spec.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/metron-sorter.component.spec.ts b/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/metron-sorter.component.spec.ts
index cac8667..0167e97 100644
--- a/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/metron-sorter.component.spec.ts
+++ b/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/metron-sorter.component.spec.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /* tslint:disable:no-unused-variable */
 // directiveSelectorNameRule
 

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/metron-sorter.component.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/metron-sorter.component.ts b/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/metron-sorter.component.ts
index 11ada7d..4baf46a 100644
--- a/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/metron-sorter.component.ts
+++ b/metron-interface/metron-config/src/app/shared/metron-table/metron-sorter/metron-sorter.component.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import { Component, Input } from '@angular/core';
 import {Sort} from '../../../util/enums';
 import {MetronTableDirective, SortEvent} from '../metron-table.directive';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/metron-table/metron-table.module.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/metron-table/metron-table.module.ts b/metron-interface/metron-config/src/app/shared/metron-table/metron-table.module.ts
index 57369df..786da2e 100644
--- a/metron-interface/metron-config/src/app/shared/metron-table/metron-table.module.ts
+++ b/metron-interface/metron-config/src/app/shared/metron-table/metron-table.module.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import {NgModule} from '@angular/core';
 
 import {MetronSorterComponent} from './metron-sorter/metron-sorter.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/multiple-input/index.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/multiple-input/index.ts b/metron-interface/metron-config/src/app/shared/multiple-input/index.ts
index 3697be3..9c7b20e 100644
--- a/metron-interface/metron-config/src/app/shared/multiple-input/index.ts
+++ b/metron-interface/metron-config/src/app/shared/multiple-input/index.ts
@@ -1 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 export * from './multiple-input.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/multiple-input/multiple-input.module.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/multiple-input/multiple-input.module.ts b/metron-interface/metron-config/src/app/shared/multiple-input/multiple-input.module.ts
index 39e0290..9fbacf0 100644
--- a/metron-interface/metron-config/src/app/shared/multiple-input/multiple-input.module.ts
+++ b/metron-interface/metron-config/src/app/shared/multiple-input/multiple-input.module.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import {NgModule} from '@angular/core';
 
 import {MultipleInputComponent}   from './multiple-input.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/number-spinner/index.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/number-spinner/index.ts b/metron-interface/metron-config/src/app/shared/number-spinner/index.ts
index b37c764..c6507e4 100644
--- a/metron-interface/metron-config/src/app/shared/number-spinner/index.ts
+++ b/metron-interface/metron-config/src/app/shared/number-spinner/index.ts
@@ -1 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 export * from './number-spinner.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/number-spinner/number-spinner.module.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/number-spinner/number-spinner.module.ts b/metron-interface/metron-config/src/app/shared/number-spinner/number-spinner.module.ts
index db622b6..68f9abe 100644
--- a/metron-interface/metron-config/src/app/shared/number-spinner/number-spinner.module.ts
+++ b/metron-interface/metron-config/src/app/shared/number-spinner/number-spinner.module.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import {NgModule} from '@angular/core';
 
 import {NumberSpinnerComponent}   from './number-spinner.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/app/shared/sample-data/sample-data.module.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/app/shared/sample-data/sample-data.module.ts b/metron-interface/metron-config/src/app/shared/sample-data/sample-data.module.ts
index e700903..14d036a 100644
--- a/metron-interface/metron-config/src/app/shared/sample-data/sample-data.module.ts
+++ b/metron-interface/metron-config/src/app/shared/sample-data/sample-data.module.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import {NgModule} from '@angular/core';
 
 import {SampleDataComponent}   from './sample-data.component';

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/environments/environment.prod.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/environments/environment.prod.ts b/metron-interface/metron-config/src/environments/environment.prod.ts
index 3612073..690ddb1 100644
--- a/metron-interface/metron-config/src/environments/environment.prod.ts
+++ b/metron-interface/metron-config/src/environments/environment.prod.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 export const environment = {
   production: true
 };

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/metron-interface/metron-config/src/environments/environment.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-config/src/environments/environment.ts b/metron-interface/metron-config/src/environments/environment.ts
index 00313f1..7a766d7 100644
--- a/metron-interface/metron-config/src/environments/environment.ts
+++ b/metron-interface/metron-config/src/environments/environment.ts
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 // The file contents for the current environment will overwrite these during build.
 // The build system defaults to the dev environment which uses `environment.ts`, but if you do
 // `ng build --env=prod` then `environment.prod.ts` will be used instead.

http://git-wip-us.apache.org/repos/asf/metron/blob/ccdbeff5/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index eb79e52..9a8c442 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,7 +71,22 @@
             </snapshots>
         </repository>
     </repositories>
-
+    <pluginRepositories>
+      <pluginRepository>
+            <id>apache.snapshots</id>
+            <name>Apache Development Snapshot Repository</name>
+            <url>https://repository.apache.org/content/repositories/snapshots/</url>
+            <layout>default</layout>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <updatePolicy>always</updatePolicy>
+                <enabled>true</enabled>
+                <checksumPolicy>warn</checksumPolicy>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
     <properties>
         <twitter>@ApacheMetron</twitter>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -292,7 +307,7 @@
             <plugin>
                 <groupId>org.apache.rat</groupId>
                 <artifactId>apache-rat-plugin</artifactId>
-                <version>0.12</version>
+                <version>0.13-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <phase>verify</phase>


[4/4] metron git commit: Merge branch 'master' into feature/METRON-1554-pcap-query-panel

Posted by ce...@apache.org.
Merge branch 'master' into feature/METRON-1554-pcap-query-panel


Project: http://git-wip-us.apache.org/repos/asf/metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/7dff4def
Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/7dff4def
Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/7dff4def

Branch: refs/heads/feature/METRON-1554-pcap-query-panel
Commit: 7dff4def23a7c839ea599a120ab6d4cf5b9bbbef
Parents: 6c90724 ccdbeff
Author: cstella <ce...@gmail.com>
Authored: Thu Jul 26 12:29:04 2018 -0400
Committer: cstella <ce...@gmail.com>
Committed: Thu Jul 26 12:29:04 2018 -0400

----------------------------------------------------------------------
 .../docker/rpm-docker/SPECS/metron.spec         |   1 +
 .../e2e/utils/clean_metron_update_table.ts      |  18 ++
 .../metron-alerts/e2e/utils/e2e_util.ts         |  20 +-
 .../alert-filters.component.spec.ts             |  18 ++
 .../alert-filters/alert-filters.component.ts    |  20 +-
 .../table-view/table-view.component.spec.ts     |  18 ++
 .../tree-view/tree-view.component.spec.ts       |  18 ++
 .../alerts/meta-alerts/meta-alerts.module.ts    |  18 ++
 .../date-picker/date-picker.component.spec.ts   |  18 ++
 .../shared/date-picker/date-picker.component.ts |  18 ++
 .../shared/date-picker/date-picker.module.ts    |  18 ++
 .../alert-severity-hexagon.directive.spec.ts    |  18 ++
 .../app/shared/group-by/group-by.component.ts   |  18 ++
 .../metron-alerts/src/app/shared/index.ts       |  18 ++
 .../src/app/shared/pipes/map-keys.pipe.spec.ts  |  18 ++
 .../src/app/shared/pipes/map-keys.pipe.ts       |  18 ++
 .../src/app/shared/pipes/time-lapse.pipe.ts     |  18 ++
 .../time-range/time-range.component.spec.ts     |  18 ++
 .../app/shared/time-range/time-range.module.ts  |  18 ++
 metron-interface/metron-alerts/src/polyfills.ts |  18 ++
 .../metron-config/e2e/utils/e2e_util.ts         |  18 ++
 .../src/app/app.config.interface.ts             |  18 ++
 .../metron-config/src/app/app.config.ts         |  18 ++
 .../sensor-grok/sensor-grok.component.ts        |  18 ++
 .../sensor-parser-config-readonly/index.ts      |  18 ++
 .../app/sensors/sensor-parser-config/index.ts   |  18 ++
 .../shared/ace-editor/ace-editor.component.ts   |  18 ++
 .../app/shared/ace-editor/ace-editor.module.ts  |  18 ++
 .../advanced-config-form.module.ts              |  18 ++
 .../src/app/shared/metron-modal/index.ts        |  18 ++
 .../shared/metron-table/metron-sorter/index.ts  |  18 ++
 .../metron-sorter.component.spec.ts             |  18 ++
 .../metron-sorter/metron-sorter.component.ts    |  18 ++
 .../shared/metron-table/metron-table.module.ts  |  18 ++
 .../src/app/shared/multiple-input/index.ts      |  18 ++
 .../multiple-input/multiple-input.module.ts     |  18 ++
 .../src/app/shared/number-spinner/index.ts      |  18 ++
 .../number-spinner/number-spinner.module.ts     |  18 ++
 .../shared/sample-data/sample-data.module.ts    |  18 ++
 .../src/environments/environment.prod.ts        |  18 ++
 .../src/environments/environment.ts             |  18 ++
 metron-interface/metron-rest/README.md          |  12 +-
 .../parsed/jsonMapExampleParsed                 |   6 +
 .../raw/jsonMapExampleOutput                    |   3 +
 metron-platform/metron-parsers/README.md        |   5 +
 .../zookeeper/parsers/jsonMapWrappedQuery.json  |   5 +
 .../metron/parsers/json/JSONMapParser.java      |  40 +++-
 .../JSONMapWrappedQueryIntegrationTest.java     |  37 ++++
 .../integration/ParserIntegrationTest.java      |  22 +-
 .../json/JSONMapParserWrappedQueryTest.java     | 199 +++++++++++++++++++
 pom.xml                                         |  19 +-
 51 files changed, 1044 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/metron/blob/7dff4def/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/metron/blob/7dff4def/metron-interface/metron-rest/README.md
----------------------------------------------------------------------
diff --cc metron-interface/metron-rest/README.md
index 2d9a535,caa9c78..68ec559
--- a/metron-interface/metron-rest/README.md
+++ b/metron-interface/metron-rest/README.md
@@@ -253,15 -242,8 +253,15 @@@ Request and Response objects are JSON f
  | [ `GET /api/v1/metaalert/add/alert`](#get-apiv1metaalertaddalert)|
  | [ `GET /api/v1/metaalert/remove/alert`](#get-apiv1metaalertremovealert)|
  | [ `GET /api/v1/metaalert/update/status/{guid}/{status}`](#get-apiv1metaalertupdatestatusguidstatus)|
 +| [ `POST /api/v1/pcap/fixed`](#post-apiv1pcapfixed)|
 +| [ `POST /api/v1/pcap/query`](#post-apiv1pcapquery)|
 +| [ `GET /api/v1/pcap`](#get-apiv1pcap)|
 +| [ `GET /api/v1/pcap/{jobId}`](#get-apiv1pcapjobid)|
 +| [ `GET /api/v1/pcap/{jobId}/pdml`](#get-apiv1pcapjobidpdml)|
 +| [ `GET /api/v1/pcap/{jobId}/raw`](#get-apiv1pcapjobidraw)|
 +| [ `GET /api/v1/search/search`](#get-apiv1searchsearch)|
- | [ `POST /api/v1/search/search`](#get-apiv1searchsearch)|
- | [ `POST /api/v1/search/group`](#get-apiv1searchgroup)|
+ | [ `POST /api/v1/search/search`](#post-apiv1searchsearch)|
+ | [ `POST /api/v1/search/group`](#post-apiv1searchgroup)|
  | [ `GET /api/v1/search/findOne`](#get-apiv1searchfindone)|
  | [ `GET /api/v1/search/column/metadata`](#get-apiv1searchcolumnmetadata)|
  | [ `GET /api/v1/sensor/enrichment/config`](#get-apiv1sensorenrichmentconfig)|


[2/4] metron git commit: METRON-1694: Clean up Metron REST docs closes apache/incubator-metron#1131

Posted by ce...@apache.org.
METRON-1694: Clean up Metron REST docs closes apache/incubator-metron#1131


Project: http://git-wip-us.apache.org/repos/asf/metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/44a6f6f1
Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/44a6f6f1
Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/44a6f6f1

Branch: refs/heads/feature/METRON-1554-pcap-query-panel
Commit: 44a6f6f11d8d750f176f53d6032e46c90f88d9e4
Parents: 6bac842
Author: JonZeolla <ze...@gmail.com>
Authored: Thu Jul 26 09:43:04 2018 -0400
Committer: cstella <ce...@gmail.com>
Committed: Thu Jul 26 09:43:04 2018 -0400

----------------------------------------------------------------------
 metron-interface/metron-rest/README.md | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/metron/blob/44a6f6f1/metron-interface/metron-rest/README.md
----------------------------------------------------------------------
diff --git a/metron-interface/metron-rest/README.md b/metron-interface/metron-rest/README.md
index 44594f7..caa9c78 100644
--- a/metron-interface/metron-rest/README.md
+++ b/metron-interface/metron-rest/README.md
@@ -216,7 +216,7 @@ Request and Response objects are JSON formatted.  The JSON schemas are available
 
 |            |
 | ---------- |
-| [ `POST /api/v1/alerts/ui/escalate`](#get-apiv1alertsuiescalate)|
+| [ `POST /api/v1/alerts/ui/escalate`](#post-apiv1alertsuiescalate)|
 | [ `GET /api/v1/alerts/ui/settings`](#get-apiv1alertsuisettings)|
 | [ `GET /api/v1/alerts/ui/settings/all`](#get-apiv1alertsuisettingsall)|
 | [ `DELETE /api/v1/alerts/ui/settings`](#delete-apiv1alertsuisettings)|
@@ -242,9 +242,8 @@ Request and Response objects are JSON formatted.  The JSON schemas are available
 | [ `GET /api/v1/metaalert/add/alert`](#get-apiv1metaalertaddalert)|
 | [ `GET /api/v1/metaalert/remove/alert`](#get-apiv1metaalertremovealert)|
 | [ `GET /api/v1/metaalert/update/status/{guid}/{status}`](#get-apiv1metaalertupdatestatusguidstatus)|
-| [ `GET /api/v1/search/search`](#get-apiv1searchsearch)|
-| [ `POST /api/v1/search/search`](#get-apiv1searchsearch)|
-| [ `POST /api/v1/search/group`](#get-apiv1searchgroup)|
+| [ `POST /api/v1/search/search`](#post-apiv1searchsearch)|
+| [ `POST /api/v1/search/group`](#post-apiv1searchgroup)|
 | [ `GET /api/v1/search/findOne`](#get-apiv1searchfindone)|
 | [ `GET /api/v1/search/column/metadata`](#get-apiv1searchcolumnmetadata)|
 | [ `GET /api/v1/sensor/enrichment/config`](#get-apiv1sensorenrichmentconfig)|
@@ -293,7 +292,7 @@ Request and Response objects are JSON formatted.  The JSON schemas are available
 | [ `GET /api/v1/storm/{name}`](#get-apiv1stormname)|
 | [ `GET /api/v1/storm/supervisors`](#get-apiv1stormsupervisors)|
 | [ `PATCH /api/v1/update/patch`](#patch-apiv1updatepatch)|
-| [ `PUT /api/v1/update/replace`](#patch-apiv1updatereplace)|
+| [ `PUT /api/v1/update/replace`](#put-apiv1updatereplace)|
 | [ `GET /api/v1/user`](#get-apiv1user)|
 
 ### `POST /api/v1/alerts/ui/escalate`
@@ -832,8 +831,8 @@ Request and Response objects are JSON formatted.  The JSON schemas are available
          }
         ```
   * Returns:
-    * 200 - nothing
-    * 404 - document not found
+    * 200 - Nothing
+    * 404 - Document not found
 
 ### `PUT /api/v1/update/replace`
   * Description: Replace a document