-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NIFI-4345 Added a MongoDB controller service and a lookup service.
NIFI-4345: Changed Lookup Key to Lookup Value Field Signed-off-by: Matthew Burgess <mattyb149@apache.org> This closes #2123
- Loading branch information
1 parent
05b5dd1
commit 9a8e6b2
Showing
19 changed files
with
1,399 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
nifi-nar-bundles/nifi-standard-services/nifi-mongodb-client-service-api/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
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.nifi</groupId> | ||
<artifactId>nifi-standard-services</artifactId> | ||
<version>1.4.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>nifi-mongodb-client-service-api</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-utils</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mongodb</groupId> | ||
<artifactId>mongo-java-driver</artifactId> | ||
</dependency> | ||
</dependencies> | ||
</project> |
45 changes: 45 additions & 0 deletions
45
...ongodb-client-service-api/src/main/java/org/apache/nifi/mongodb/MongoDBClientService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* 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.nifi.mongodb; | ||
|
||
import org.apache.nifi.controller.ControllerService; | ||
import org.bson.Document; | ||
|
||
import java.util.List; | ||
|
||
public interface MongoDBClientService extends ControllerService { | ||
default Document convertJson(String query) { | ||
return Document.parse(query); | ||
} | ||
|
||
long count(Document query); | ||
void delete(Document query); | ||
boolean exists(Document query); | ||
Document findOne(Document query); | ||
List<Document> findMany(Document query); | ||
List<Document> findMany(Document query, int limit); | ||
List<Document> findMany(Document query, Document sort, int limit); | ||
void insert(Document doc); | ||
void insert(List<Document> docs); | ||
void update(Document query, Document update); | ||
void update(Document query, Document update, boolean multiple); | ||
void updateOne(Document query, Document update); | ||
void upsert(Document query, Document update); | ||
void dropDatabase(); | ||
void dropCollection(); | ||
} |
40 changes: 40 additions & 0 deletions
40
...les/nifi-standard-services/nifi-mongodb-services-bundle/nifi-mongodb-services-nar/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<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"> | ||
<!-- | ||
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. | ||
--> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-mongodb-services-bundle</artifactId> | ||
<version>1.4.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>nifi-mongodb-services-nar</artifactId> | ||
<packaging>nar</packaging> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-standard-services-api-nar</artifactId> | ||
<type>nar</type> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-lookup-services</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-mongodb-services</artifactId> | ||
<version>1.4.0-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
131 changes: 131 additions & 0 deletions
131
...nifi-mongodb-services-bundle/nifi-mongodb-services-nar/src/main/resources/META-INF/NOTICE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
nifi-mongodb-services-nar | ||
Copyright 2017 The Apache Software Foundation | ||
|
||
This product includes software developed at | ||
The Apache Software Foundation (http://www.apache.org/). | ||
|
||
****************** | ||
Apache Software License v2 | ||
****************** | ||
|
||
The following binary components are provided under the Apache Software License v2 | ||
|
||
(ASLv2) Apache Commons Configuration | ||
The following NOTICE information applies: | ||
Apache Commons Configuration | ||
Copyright 2001-2017 The Apache Software Foundation | ||
|
||
This product includes software developed at | ||
The Apache Software Foundation (http://www.apache.org/). | ||
|
||
(ASLv2) Apache Commons CSV | ||
The following NOTICE information applies: | ||
Apache Commons CSV | ||
Copyright 2005-2016 The Apache Software Foundation | ||
|
||
This product includes software developed at | ||
The Apache Software Foundation (http://www.apache.org/). | ||
|
||
(ASLv2) Apache Commons BeanUtils | ||
The following NOTICE information applies: | ||
Apache Commons BeanUtils | ||
Copyright 2000-2016 The Apache Software Foundation | ||
|
||
This product includes software developed at | ||
The Apache Software Foundation (http://www.apache.org/). | ||
|
||
(ASLv2) Apache Commons Lang | ||
The following NOTICE information applies: | ||
Apache Commons Lang | ||
Copyright 2001-2015 The Apache Software Foundation | ||
|
||
This product includes software from the Spring Framework, | ||
under the Apache License 2.0 (see: StringUtils.containsWhitespace()) | ||
|
||
(ASLv2) Apache HttpComponents | ||
The following NOTICE information applies: | ||
Apache HttpClient | ||
Copyright 1999-2014 The Apache Software Foundation | ||
|
||
Apache HttpCore | ||
Copyright 2005-2014 The Apache Software Foundation | ||
|
||
This project contains annotations derived from JCIP-ANNOTATIONS | ||
Copyright (c) 2005 Brian Goetz and Tim Peierls. See http://www.jcip.net | ||
|
||
(ASLv2) Apache Commons Codec | ||
The following NOTICE information applies: | ||
Apache Commons Codec | ||
Copyright 2002-2014 The Apache Software Foundation | ||
|
||
src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.java | ||
contains test data from http://aspell.net/test/orig/batch0.tab. | ||
Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org) | ||
|
||
=============================================================================== | ||
|
||
The content of package org.apache.commons.codec.language.bm has been translated | ||
from the original php source code available at http://stevemorse.org/phoneticinfo.htm | ||
with permission from the original authors. | ||
Original source copyright: | ||
Copyright (c) 2008 Alexander Beider & Stephen P. Morse. | ||
|
||
(ASLv2) Apache Commons Logging | ||
The following NOTICE information applies: | ||
Apache Commons Logging | ||
Copyright 2003-2013 The Apache Software Foundation | ||
|
||
(ASLv2) Apache Commons Net | ||
The following NOTICE information applies: | ||
Apache Commons Net | ||
Copyright 2001-2016 The Apache Software Foundation | ||
|
||
(ASLv2) Apache Commons Collections | ||
The following NOTICE information applies: | ||
Apache Commons Collections | ||
Copyright 2001-2016 The Apache Software Foundation | ||
|
||
(ASLv2) Apache Commons IO | ||
The following NOTICE information applies: | ||
Apache Commons IO | ||
Copyright 2002-2016 The Apache Software Foundation | ||
|
||
(ASLv2) GeoIP2 Java API | ||
The following NOTICE information applies: | ||
GeoIP2 Java API | ||
This software is Copyright (c) 2013 by MaxMind, Inc. | ||
|
||
(ASLv2) Google HTTP Client Library for Java | ||
The following NOTICE information applies: | ||
Copyright 2011 Google Inc. | ||
|
||
(ASLv2) Jackson JSON processor | ||
The following NOTICE information applies: | ||
# Jackson JSON processor | ||
|
||
Jackson is a high-performance, Free/Open Source JSON processing library. | ||
It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has | ||
been in development since 2007. | ||
It is currently developed by a community of developers, as well as supported | ||
commercially by FasterXML.com. | ||
|
||
## Licensing | ||
|
||
Jackson core and extension components may licensed under different licenses. | ||
To find the details that apply to this artifact see the accompanying LICENSE file. | ||
For more information, including possible other licensing options, contact | ||
FasterXML.com (http://fasterxml.com). | ||
|
||
## Credits | ||
|
||
A list of contributors may be found from CREDITS file, which is included | ||
in some artifacts (usually source distributions); but is always available | ||
from the source code management (SCM) system project uses. | ||
|
||
************************ | ||
Creative Commons Attribution-ShareAlike 3.0 | ||
************************ | ||
|
||
The following binary components are provided under the Creative Commons Attribution-ShareAlike 3.0. See project link for details. | ||
|
||
(CCAS 3.0) MaxMind DB (https://github.com/maxmind/MaxMind-DB) |
89 changes: 89 additions & 0 deletions
89
...bundles/nifi-standard-services/nifi-mongodb-services-bundle/nifi-mongodb-services/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<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"> | ||
<!-- 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. --> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-mongodb-services-bundle</artifactId> | ||
<version>1.4.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>nifi-mongodb-services</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-processor-utils</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-lookup-service-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-utils</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-record</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-mongodb-client-service-api</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mongodb</groupId> | ||
<artifactId>mongo-java-driver</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-mock</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-simple</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.nifi</groupId> | ||
<artifactId>nifi-ssl-context-service-api</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.rat</groupId> | ||
<artifactId>apache-rat-plugin</artifactId> | ||
<configuration> | ||
<excludes combine.children="append"> | ||
<exclude>src/test/resources/test.csv</exclude> | ||
<exclude>src/test/resources/test.properties</exclude> | ||
<exclude>src/test/resources/test.xml</exclude> | ||
</excludes> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
Oops, something went wrong.