Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

METRON-503: Metron REST API #316

Closed
wants to merge 72 commits into from
Closed
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
b7d310e
Initial implementation of REST service
Oct 19, 2016
77e79ab
added newline at the end of application.yml
Oct 19, 2016
b042dfd
Added logging configuration and fixed SLF4J warnings.
Oct 24, 2016
2012369
Metron Docker implementation
Nov 18, 2016
d9ea03e
Cleaned up comments and added newlines to the end of files
Nov 18, 2016
b73e808
Merge branch 'METRON-503' into middleware
Nov 21, 2016
072f3ec
Merge remote-tracking branch 'mirror/master' into middleware
Nov 28, 2016
d4ff470
Initial middleware commit
Nov 29, 2016
50b4cf4
Added start script and fixed Maven issues
Nov 30, 2016
46d0ff3
Fixed pattern label bug
Dec 2, 2016
53c3340
Fixes to parseMessage service. Now writes temporary grok statement t…
Dec 5, 2016
0a329c7
Merge remote-tracking branch 'mirror/master' into docker
Dec 5, 2016
ce11ab5
Merge branch 'docker' into middleware
Dec 5, 2016
7db0810
Resolved licensing issues
Dec 6, 2016
8825a85
Resolved licensing issues
Dec 6, 2016
35240d2
Merge branch 'docker' into middleware
Dec 6, 2016
d38b626
Resolved licensing issues
Dec 6, 2016
f1ce2d0
Merge branch 'docker' into middleware
Dec 6, 2016
25bc44e
Updated scripts to add Hibernate and MySQL client to classpath
Dec 6, 2016
a91ce50
Created LICENSE/NOTICE files and made small adjustment to the README.
Dec 9, 2016
c916800
Added license header to docker-compose.yml
Dec 9, 2016
b8ef856
Merge branch 'METRON-622' into middleware
Dec 9, 2016
6be6a0a
Updated context paths and added assembly.xml file
Dec 9, 2016
786aa97
Changes based on PR feedback:
Dec 12, 2016
385bcb0
Updated flatfile_loader.sh to only depend on HBase
Dec 12, 2016
5d86575
Fixed rest database name
Dec 12, 2016
edd4b87
Changes based on PR feedback
Dec 16, 2016
11fa4ae
Fixed README API links
Dec 16, 2016
07f1a5f
Changes from PR feedback. Replaced install script with maven pom. A…
Dec 19, 2016
bd4b81b
Added commons-lang:2.4 to dependencies_with_url.csv
Dec 20, 2016
6b8babc
Merge branch 'METRON-622' into METRON-503
Dec 21, 2016
adce921
Removed config directory
Dec 21, 2016
8040ab3
Merge branch 'METRON-622' into METRON-503
Dec 21, 2016
2861756
Updated docker compose path in application-docker.yml
Dec 21, 2016
55fb3d0
Merge remote-tracking branch 'mirror/master' into METRON-503
Jan 10, 2017
9bab502
Moved model classes to separate metron-rest-client project. Added do…
Jan 10, 2017
2fc78d6
Updated url paths for GlobalConfig, SensorParserConfig, SensorEnrichm…
Jan 10, 2017
a76ba8e
Converted all exceptions to RestException and add an exception handler
Jan 11, 2017
b1a19d5
Merge remote-tracking branch 'mirror/master' into METRON-503
Jan 17, 2017
901a6b7
Resolved merge conflicts with METRON-652
Jan 17, 2017
0a784d5
Changes to address PR feedback. Includes:
Jan 20, 2017
88c1f7d
Converted TopologyResponse status to enum
Jan 20, 2017
98f6caf
Separated Services into interfaces and implementations
Jan 23, 2017
1253242
Fixed jdbc dependency
Jan 23, 2017
6f75348
Removed @Service annotation from interfaces and added @Override annot…
Jan 25, 2017
fd62add
Merge remote-tracking branch 'mirror/master' into METRON-503
Jan 26, 2017
7b5da86
Merge remote-tracking branch 'mirror/master' into METRON-503
Jan 27, 2017
13e3520
Resolved merge conflict
Jan 27, 2017
9b75f7e
METRON-503: added unit tests for some of the services. To make unit t…
jjmeyer0 Jan 30, 2017
8ea6ae5
METRON-503: Updated DockerStormCLIWrapper to mock all process builders.
jjmeyer0 Jan 30, 2017
e46a0f1
Added license to newly created tests.
jjmeyer0 Jan 30, 2017
45f94a8
Updated test config to create necessary admin utils class for kafka. …
jjmeyer0 Jan 30, 2017
42d0491
Merge pull request #9 from jjmeyer0/METRON-503
merrimanr Jan 30, 2017
a03f78c
Added several new tests and refactored SensorParserConfigService to r…
Jan 31, 2017
5443cd8
Added HDFS controller and renamed StellarService
Feb 6, 2017
f26c166
Renamed StormCLIWrapperTest.java
Feb 13, 2017
0ca2dc7
Added StellarService unit test
Feb 14, 2017
a354591
Removed MySQL dependency and substituted H2. Updated documentation t…
Feb 17, 2017
d07f31f
Merge remote-tracking branch 'mirror/master' into METRON-503
Feb 17, 2017
940f7ba
Documented testing on metron-docker and quick dev
Feb 17, 2017
65f5173
Updated test to match new SensorEnrichmentConfig structure
Feb 20, 2017
a3d36d2
Updated version number
Feb 20, 2017
39ffba8
Updated validateGrokStatement function to accept a patternLabel input
Feb 20, 2017
23cd26e
Added $METRON_VERSION instead of hardcoded version
Feb 20, 2017
cc84429
Added overwrite warning to HdfsController
Feb 20, 2017
11fb735
updated dependencies_with_url.csv
Feb 20, 2017
6f3fc0b
removed org.reflections dependency
Feb 20, 2017
1d397f6
Merge remote-tracking branch 'mirror/master' into METRON-503
Feb 21, 2017
de99543
Updated to match all h2 databases
Feb 23, 2017
5db12aa
Merge remote-tracking branch 'mirror/master' into METRON-503
Feb 23, 2017
3fcf123
Merge remote-tracking branch 'mirror/master' into METRON-503
Feb 27, 2017
52f87fd
Merged latest changes and excluded org.reflections from metron-common…
Feb 27, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
61 changes: 60 additions & 1 deletion dependencies_with_url.csv
Expand Up @@ -7,6 +7,7 @@ org.ow2.asm:asm:jar:5.0.3:compile,BSD,http://asm.ow2.org/
org.reflections:reflections:jar:0.9.10:compile,BSD,https://github.com/ronmamo/reflections
org.javassist:javassist:jar:3.19.0-GA:compile,Apache v2,https://github.com/jboss-javassist/javassist
org.javassist:javassist:jar:3.17.1-GA:compile,Apache v2,https://github.com/jboss-javassist/javassist
org.javassist:javassist:jar:3.20.0-GA:compile,Apache v2,https://github.com/jboss-javassist/javassist
org.fusesource.jansi:jansi:jar:1.11:compile,Apache v2,https://github.com/fusesource/jansi
de.javakaffee:kryo-serializers:jar:0.38:compile,Apache v2,https://github.com/magro/kryo-serializers
com.tdunning:t-digest:jar:3.1:compile,Apache v2,https://github.com/tdunning/t-digest
Expand Down Expand Up @@ -78,13 +79,16 @@ org.slf4j:slf4j-api:jar:1.7.10:compile,MIT,http://www.slf4j.org
org.slf4j:slf4j-api:jar:1.7.5:compile,MIT,http://www.slf4j.org
org.slf4j:slf4j-api:jar:1.7.6:compile,MIT,http://www.slf4j.org
org.slf4j:slf4j-api:jar:1.7.7:compile,MIT,http://www.slf4j.org
org.slf4j:slf4j-api:jar:1.7.21:compile,MIT,http://www.slf4j.org
org.slf4j:slf4j-log4j12:jar:1.6.1:compile,MIT,http://www.slf4j.org
org.slf4j:slf4j-log4j12:jar:1.7.10:compile,MIT,http://www.slf4j.org
org.slf4j:slf4j-log4j12:jar:1.7.10:runtime,MIT,http://www.slf4j.org
org.slf4j:slf4j-log4j12:jar:1.7.21:compile,MIT,http://www.slf4j.org
org.slf4j:slf4j-log4j12:jar:1.7.5:compile,MIT,http://www.slf4j.org
org.slf4j:slf4j-log4j12:jar:1.7.7:compile,MIT,http://www.slf4j.org
org.slf4j:slf4j-simple:jar:1.7.7:compile,MIT,http://www.slf4j.org
org.slf4j:jcl-over-slf4j:jar:1.7.21:compile,MIT,http://www.slf4j.org
org.slf4j:jul-to-slf4j:jar:1.7.21:compile,MIT,http://www.slf4j.org
aopalliance:aopalliance:jar:1.0:compile,Public Domain,http://aopalliance.sourceforge.net
com.101tec:zkclient:jar:0.8:compile,The Apache Software License, Version 2.0,https://github.com/sgroschupf/zkclient
com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1:compile,Apache License, Version 2.0,http://stephenc.github.com/findbugs-annotations
Expand All @@ -98,15 +102,21 @@ com.codahale.metrics:metrics-graphite:jar:3.0.2:compile,MIT,https://github.com/c
com.esotericsoftware.reflectasm:reflectasm:jar:shaded:1.07:compile,BSD,https://github.com/EsotericSoftware/reflectasm
com.fasterxml.jackson.core:jackson-annotations:jar:2.2.3:compile,ASLv2,http://wiki.fasterxml.com/JacksonHome
com.fasterxml.jackson.core:jackson-annotations:jar:2.7.4:compile,ASLv2,http://github.com/FasterXML/jackson
com.fasterxml.jackson.core:jackson-annotations:jar:2.8.3:compile,ASLv2,http://github.com/FasterXML/jackson
com.fasterxml.jackson.core:jackson-core:jar:2.2.3:compile,ASLv2,http://wiki.fasterxml.com/JacksonHome
com.fasterxml.jackson.core:jackson-core:jar:2.6.6:compile,ASLv2,https://github.com/FasterXML/jackson-core
com.fasterxml.jackson.core:jackson-core:jar:2.7.4:compile,ASLv2,https://github.com/FasterXML/jackson-core
com.fasterxml.jackson.core:jackson-core:jar:2.8.3:compile,ASLv2,https://github.com/FasterXML/jackson-core
com.fasterxml.jackson.core:jackson-databind:jar:2.2.3:compile,ASLv2,http://wiki.fasterxml.com/JacksonHome
com.fasterxml.jackson.core:jackson-databind:jar:2.7.4:compile,ASLv2,http://github.com/FasterXML/jackson
com.fasterxml.jackson.core:jackson-databind:jar:2.8.3:compile,ASLv2,http://github.com/FasterXML/jackson
com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.6.6:compile,ASLv2,http://wiki.fasterxml.com/JacksonForCbor
com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.6.6:compile,ASLv2,http://wiki.fasterxml.com/JacksonForSmile
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.6.6:compile,ASLv2,https://github.com/FasterXML/jackson
com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.8.1:compile,ASLv2,https://github.com/FasterXML/jackson-datatype-joda
com.fasterxml:classmate:jar:1.3.1:compile,ASLv2,http://github.com/cowtowncoder/java-classmate
com.google.code.gson:gson:jar:2.2.4:compile,The Apache Software License, Version 2.0,http://code.google.com/p/google-gson/
com.google.code.gson:gson:jar:2.7:compile,The Apache Software License, Version 2.0,http://code.google.com/p/google-gson/
com.google.guava:guava:jar:11.0.2:compile,ASLv2,
com.google.guava:guava:jar:12.0.1:compile,ASLv2,
com.google.guava:guava:jar:12.0:compile,ASLv2,
Expand All @@ -129,6 +139,7 @@ commons-beanutils:commons-beanutils-core:jar:1.8.0:compile,ASLv2,http://commons.
commons-beanutils:commons-beanutils-core:jar:1.8.0:provided,ASLv2,http://commons.apache.org/beanutils/
commons-beanutils:commons-beanutils:jar:1.7.0:compile,ASLv2,
commons-beanutils:commons-beanutils:jar:1.8.3:compile,ASLv2,http://commons.apache.org/beanutils/
commons-beanutils:commons-beanutils:jar:1.9.2:compile,ASLv2,http://commons.apache.org/beanutils/
commons-cli:commons-cli:jar:1.2:compile,ASLv2,http://commons.apache.org/cli/
commons-cli:commons-cli:jar:1.3.1:compile,ASLv2,http://commons.apache.org/proper/commons-cli/
commons-codec:commons-codec:jar:1.10:compile,ASLv2,http://commons.apache.org/proper/commons-codec/
Expand All @@ -142,12 +153,14 @@ commons-configuration:commons-configuration:jar:1.6:compile,The Apache Software
commons-daemon:commons-daemon:jar:1.0.13:compile,ASLv2,http://commons.apache.org/daemon/
commons-digester:commons-digester:jar:1.8.1:compile,ASLv2,http://commons.apache.org/digester/
commons-digester:commons-digester:jar:1.8:compile,The Apache Software License, Version 2.0,http://jakarta.apache.org/commons/digester/
commons-digester:commons-digester:jar:2.1:compile,ASLv2,http://commons.apache.org/digester/
commons-el:commons-el:jar:1.0:provided,The Apache Software License, Version 2.0,http://jakarta.apache.org/commons/el/
commons-el:commons-el:jar:1.0:runtime,The Apache Software License, Version 2.0,http://jakarta.apache.org/commons/el/
commons-httpclient:commons-httpclient:jar:3.1:compile,Apache License,http://jakarta.apache.org/httpcomponents/httpclient-3.x/
commons-io:commons-io:jar:2.4:compile,ASLv2,http://commons.apache.org/io/
commons-io:commons-io:jar:2.5:compile,ASLv2,http://commons.apache.org/io/
commons-io:commons-io:jar:2.4:provided,ASLv2,http://commons.apache.org/io/
commons-lang:commons-lang:jar:2.4:compile,ASLv2,http://commons.apache.org/lang/
commons-lang:commons-lang:jar:2.5:compile,ASLv2,http://commons.apache.org/lang/
commons-lang:commons-lang:jar:2.6:compile,ASLv2,http://commons.apache.org/lang/
commons-lang:commons-lang:jar:2.6:provided,ASLv2,http://commons.apache.org/lang/
Expand Down Expand Up @@ -204,14 +217,25 @@ org.springframework.integration:spring-integration-core:jar:3.0.0.RELEASE:compil
org.springframework.integration:spring-integration-http:jar:3.0.0.RELEASE:compile,The Apache Software License, Version 2.0,http://www.springintegration.org/
org.springframework.retry:spring-retry:jar:1.0.3.RELEASE:compile,Apache 2.0,http://www.springsource.org
org.springframework:spring-aop:jar:3.2.6.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/SpringSource/spring-framework
org.springframework:spring-aop:jar:4.3.3.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/spring-projects/spring-framework
org.springframework:spring-aspects:jar:4.3.3.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/spring-projects/spring-framework
org.springframework:spring-beans:jar:3.2.6.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/SpringSource/spring-framework
org.springframework:spring-beans:jar:4.3.3.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/spring-projects/spring-framework
org.springframework:spring-context:jar:3.2.6.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/SpringSource/spring-framework
org.springframework:spring-context:jar:4.3.3.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/spring-projects/spring-framework
org.springframework:spring-core:jar:3.2.6.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/SpringSource/spring-framework
org.springframework:spring-core:jar:4.1.4.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/spring-projects/spring-framework
org.springframework:spring-core:jar:4.3.3.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/spring-projects/spring-framework
org.springframework:spring-expression:jar:3.2.6.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/SpringSource/spring-framework
org.springframework:spring-expression:jar:4.3.3.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/spring-projects/spring-framework
org.springframework:spring-jdbc:jar:4.3.3.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/spring-projects/spring-framework
org.springframework:spring-orm:jar:4.3.3.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/spring-projects/spring-framework
org.springframework:spring-tx:jar:3.2.6.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/SpringSource/spring-framework
org.springframework:spring-tx:jar:4.3.3.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/spring-projects/spring-framework
org.springframework:spring-web:jar:3.2.6.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/SpringSource/spring-framework
org.springframework:spring-web:jar:4.3.3.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/spring-projects/spring-framework
org.springframework:spring-webmvc:jar:3.2.6.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/SpringSource/spring-framework
org.springframework:spring-webmvc:jar:4.3.3.RELEASE:compile,The Apache Software License, Version 2.0,https://github.com/spring-projects/spring-framework
org.tukaani:xz:jar:1.0:compile,Public Domain,http://tukaani.org/xz/java.html
org.xerial.snappy:snappy-java:jar:1.0.4.1:compile,The Apache Software License, Version 2.0,http://code.google.com/p/snappy-java/
org.xerial.snappy:snappy-java:jar:1.1.1.7:compile,The Apache Software License, Version 2.0,https://github.com/xerial/snappy-java
Expand All @@ -221,4 +245,39 @@ org.yaml:snakeyaml:jar:1.15:compile,Apache License Version 2.0,http://www.snakey
ring-cors:ring-cors:jar:0.1.5:compile,Eclipse Public License 1.0,https://github.com/r0man/ring-cors
xerces:xercesImpl:jar:2.9.1:compile,ASLv2,http://xerces.apache.org/xerces2-j
xml-apis:xml-apis:jar:1.3.04:compile,ASLv2,http://xml.apache.org/commons/components/external/

xml-apis:xml-apis:jar:1.4.01:compile,ASLv2,http://xml.apache.org/commons/components/external/
dom4j:dom4j:jar:1.6.1:compile,dom4j,https://github.com/dom4j/dom4j
io.springfox:springfox-core:jar:2.5.0:compile,ASLv2,https://github.com/springfox/springfox
io.springfox:springfox-schema:jar:2.5.0:compile,ASLv2,https://github.com/springfox/springfox
io.springfox:springfox-spi:jar:2.5.0:compile,ASLv2,https://github.com/springfox/springfox
io.springfox:springfox-spring-web:jar:2.5.0:compile,ASLv2,https://github.com/springfox/springfox
io.springfox:springfox-swagger-common:jar:2.5.0:compile,ASLv2,https://github.com/springfox/springfox
io.springfox:springfox-swagger-ui:jar:2.5.0:compile,ASLv2,https://github.com/springfox/springfox
io.springfox:springfox-swagger2:jar:2.5.0:compile,ASLv2,https://github.com/springfox/springfox
io.swagger:swagger-annotations:jar:1.5.9:compile,ASLv2,https://github.com/swagger-api/swagger-core
io.swagger:swagger-models:jar:1.5.9:compile,ASLv2,https://github.com/swagger-api/swagger-core
javax.transaction:javax.transaction-api:jar:1.2:compile,CDDL-1.0,https://java.net/projects/jta-spec/
javax.validation:validation-api:jar:1.1.0.Final:compile,ASLv2,http://beanvalidation.org
joda-time:joda-time:jar:2.9.4:compile,ASLv2,https://github.com/JodaOrg/joda-time
org.aspectj:aspectjweaver:jar:1.8.9:compile,EPL 1.0,https://eclipse.org/aspectj
org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile,ASLv2,https://github.com/jboss-logging
org.jboss:jandex:jar:2.0.0.Final:compile,ASLv2,https://github.com/wildfly/jandex
org.mapstruct:mapstruct:jar:1.0.0.Final:compile,ASLv2,https://github.com/mapstruct/mapstruct
org.springframework.boot:spring-boot-autoconfigure:jar:1.4.1.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-boot
org.springframework.boot:spring-boot-starter-aop:jar:1.4.1.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-boot
org.springframework.boot:spring-boot-starter-data-jpa:jar:1.4.1.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-boot
org.springframework.boot:spring-boot-starter-jdbc:jar:1.4.1.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-boot
org.springframework.boot:spring-boot-starter-logging:jar:1.4.1.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-boot
org.springframework.boot:spring-boot-starter-security:jar:1.4.1.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-boot
org.springframework.boot:spring-boot-starter-tomcat:jar:1.4.1.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-boot
org.springframework.boot:spring-boot-starter-web:jar:1.4.1.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-boot
org.springframework.boot:spring-boot-starter:jar:1.4.1.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-boot
org.springframework.boot:spring-boot:jar:1.4.1.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-boot
org.springframework.data:spring-data-commons:jar:1.12.3.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-data-commons
org.springframework.data:spring-data-jpa:jar:1.10.3.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-data-jpa
org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-plugin
org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-plugin
org.springframework.security:spring-security-config:jar:4.1.3.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-security
org.springframework.security:spring-security-core:jar:4.1.3.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-security
org.springframework.security:spring-security-web:jar:4.1.3.RELEASE:compile,ASLv2,https://github.com/spring-projects/spring-security
antlr:antlr:jar:2.7.7:compile,BSD 3-Clause License,http://www.antlr2.org
40 changes: 40 additions & 0 deletions metron-interface/metron-rest-client/pom.xml
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is very minor, but are we doing the 2 space indent rule? If so this looks to be 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 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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.metron</groupId>
<artifactId>metron-interface</artifactId>
<version>0.3.0</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we need to update this to 0.3.1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

</parent>
<artifactId>metron-rest-client</artifactId>
<properties>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.metron</groupId>
<artifactId>metron-common</artifactId>
<version>${project.parent.version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

</project>
@@ -0,0 +1,75 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 spaces instead of 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized after I opened the PR that there were files that had different spacing. I was planning on waiting until we finished the review process to do this because it will make it easier for you to review the incremental changes. Is that ok?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@merrimanr i think that's a really good idea. You're right, changing the spaces would add a lot of distractions.

* 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.rest.model;

import java.util.HashMap;
import java.util.Map;

public class GrokValidation {

private String statement;
private String sampleData;
private Map<String, Object> results;

public String getStatement() {
return statement;
}

public void setStatement(String statement) {
this.statement = statement;
}

public String getSampleData() {
return sampleData;
}

public void setSampleData(String sampleData) {
this.sampleData = sampleData;
}

public Map<String, Object> getResults() {
if (results == null) {
return new HashMap<>();
}
return results;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could possible result in a NPE. Does it make sense to check for this and return an empty map if that is the case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

}

public void setResults(Map<String, Object> results) {
this.results = results;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

GrokValidation that = (GrokValidation) o;

if (statement != null ? !statement.equals(that.statement) : that.statement != null) return false;
if (sampleData != null ? !sampleData.equals(that.sampleData) : that.sampleData != null) return false;
return results != null ? results.equals(that.results) : that.results == null;
}

@Override
public int hashCode() {
int result = statement != null ? statement.hashCode() : 0;
result = 31 * result + (sampleData != null ? sampleData.hashCode() : 0);
result = 31 * result + (results != null ? results.hashCode() : 0);
return result;
}
}