You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jp...@apache.org on 2016/11/27 17:54:53 UTC
[1/6] nifi-minifi git commit: MINIFI-115 Bump NiFi versions to 1.0.0
Repository: nifi-minifi
Updated Branches:
refs/heads/master c999f0731 -> aeea72b71
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f44d6aa..d167191 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,7 +82,7 @@ limitations under the License.
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/nifi-minifi.git</developerConnection>
<url>https://git-wip-us.apache.org/repos/asf?p=nifi-minifi.git</url>
<tag>HEAD</tag>
- </scm>
+ </scm>
<issueManagement>
<system>JIRA</system>
<url>https://issues.apache.org/jira/browse/MINIFI</url>
@@ -95,8 +95,23 @@ limitations under the License.
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<inceptionYear>2016</inceptionYear>
<org.slf4j.version>1.7.12</org.slf4j.version>
- <org.apache.nifi.version>0.6.1</org.apache.nifi.version>
+ <logback.version>1.1.3</logback.version>
+ <org.apache.nifi.version>1.0.0</org.apache.nifi.version>
<jetty.version>9.2.11.v20150529</jetty.version>
+ <jetty.version>9.3.9.v20160517</jetty.version>
+ <lucene.version>4.10.4</lucene.version>
+ <spring.version>4.2.4.RELEASE</spring.version>
+ <spring.security.version>4.0.3.RELEASE</spring.security.version>
+ <jersey.version>1.19</jersey.version>
+ <hadoop.version>2.6.2</hadoop.version>
+ <hadoop.guava.version>12.0.1</hadoop.guava.version>
+ <hadoop.http.client.version>4.2.5</hadoop.http.client.version>
+ <yammer.metrics.version>2.2.0</yammer.metrics.version>
+ <ranger.version>0.6.0</ranger.version>
+ <hive.version>1.2.1</hive.version>
+ <hive.hadoop.version>2.6.2</hive.hadoop.version>
+ <hbase.version>1.1.2</hbase.version>
+ <storm.version>1.0.1</storm.version>
</properties>
<dependencies>
@@ -168,12 +183,6 @@ limitations under the License.
</dependency>
<dependency>
<groupId>org.apache.nifi.minifi</groupId>
- <artifactId>minifi-provenance-reporting-nar</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- <type>nar</type>
- </dependency>
- <dependency>
- <groupId>org.apache.nifi.minifi</groupId>
<artifactId>minifi-resources</artifactId>
<classifier>resources</classifier>
<type>zip</type>
@@ -186,18 +195,45 @@ limitations under the License.
</dependency>
<dependency>
<groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-persistent-provenance-repository</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-framework-bundle</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-framework-nar</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
<artifactId>minifi-standard-nar</artifactId>
<version>0.1.0-SNAPSHOT</version>
<type>nar</type>
</dependency>
<dependency>
<groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-standard-services-api-nar</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <type>nar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
<artifactId>minifi-update-attribute-nar</artifactId>
<version>0.1.0-SNAPSHOT</version>
<type>nar</type>
</dependency>
<dependency>
<groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-ssl-context-service-nar</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <type>nar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
<artifactId>minifi-docs</artifactId>
<version>0.1.0-SNAPSHOT</version>
<classifier>resources</classifier>
@@ -208,12 +244,12 @@ limitations under the License.
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
- <version>1.1.3</version>
+ <version>${logback.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>jcl-over-slf4j</artifactId>
- <version>1.1.3</version>
+ <version>${logback.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
@@ -248,6 +284,12 @@ limitations under the License.
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <version>${jetty.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty.version}</version>
<scope>provided</scope>
@@ -315,6 +357,11 @@ limitations under the License.
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-framework-api</artifactId>
+ <version>${org.apache.nifi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
<artifactId>nifi-utils</artifactId>
<version>${org.apache.nifi.version}</version>
</dependency>
@@ -499,10 +546,41 @@ limitations under the License.
<version>${org.apache.nifi.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-ssl-context-service</artifactId>
+ <version>${org.apache.nifi.version}</version>
+ </dependency>
+ <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-site-to-site-reporting-nar</artifactId>
+ <version>${org.apache.nifi.version}</version>
+ <type>nar</type>
+ </dependency>
+
+ <!-- Manage provided dependencies in lib -->
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15on</artifactId>
+ <version>1.54</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpg-jdk15on</artifactId>
+ <version>1.54</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpkix-jdk15on</artifactId>
+ <version>1.54</version>
+ <scope>provided</scope>
+ </dependency>
<!-- Test Dependencies -->
<dependency>
@@ -526,6 +604,560 @@ limitations under the License.
<artifactId>okhttp</artifactId>
<version>3.4.1</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ <version>1.11</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr-runtime</artifactId>
+ <version>3.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mongodb</groupId>
+ <artifactId>mongo-java-driver</artifactId>
+ <version>3.2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>com.wordnik</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>1.5.3-M1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-core</artifactId>
+ <version>1.6.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-spring</artifactId>
+ <version>1.6.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-log4j2</artifactId>
+ <version>1.6.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>1.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.10</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-net</groupId>
+ <artifactId>commons-net</artifactId>
+ <version>3.3</version>
+ </dependency>
+ <dependency>
+ <groupId>com.jcraft</groupId>
+ <artifactId>jsch</artifactId>
+ <version>0.1.52</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4.7</version>
+ </dependency>
+ <dependency>
+ <groupId>com.github.jponge</groupId>
+ <artifactId>lzma-java</artifactId>
+ <version>1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.tukaani</groupId>
+ <artifactId>xz</artifactId>
+ <version>1.5</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.saxon</groupId>
+ <artifactId>Saxon-HE</artifactId>
+ <version>9.6.0-5</version>
+ </dependency>
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.quartz-scheduler</groupId>
+ <artifactId>quartz</artifactId>
+ <version>2.2.1</version>
+ <exclusions>
+ <!-- | Exclude the quartz 2.2.1 bundled version of c3p0 because it is
+ lgpl licensed | We also don't use the JDBC related features of quartz for
+ which the dependency would matter -->
+ <exclusion>
+ <groupId>c3p0</groupId>
+ <artifactId>c3p0</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey.contribs</groupId>
+ <artifactId>jersey-spring</artifactId>
+ <version>${jersey.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey.contribs</groupId>
+ <artifactId>jersey-multipart</artifactId>
+ <version>${jersey.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context-support</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-expression</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-core</artifactId>
+ <version>${spring.security.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-expression</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-web</artifactId>
+ <version>${spring.security.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-expression</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-acl</artifactId>
+ <version>${spring.security.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-config</artifactId>
+ <version>${spring.security.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-ldap</artifactId>
+ <version>${spring.security.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security.kerberos</groupId>
+ <artifactId>spring-security-kerberos-core</artifactId>
+ <version>1.0.1.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjweaver</artifactId>
+ <version>1.8.5</version>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib-nodep</artifactId>
+ <version>3.2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-collections4</artifactId>
+ <version>4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-pool2</artifactId>
+ <version>2.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.jcraft</groupId>
+ <artifactId>jzlib</artifactId>
+ <version>1.1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>2.8.2</version>
+ </dependency>
+ <dependency>
+ <groupId>com.yammer.metrics</groupId>
+ <artifactId>metrics-ganglia</artifactId>
+ <version>${yammer.metrics.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.yammer.metrics</groupId>
+ <artifactId>metrics-core</artifactId>
+ <version>${yammer.metrics.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.jms</groupId>
+ <artifactId>javax.jms-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-client</artifactId>
+ <version>5.12.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-broker</artifactId>
+ <version>5.12.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-common</artifactId>
+ <version>${hadoop.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-hdfs</artifactId>
+ <version>${hadoop.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-yarn-api</artifactId>
+ <version>${hadoop.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-mapreduce-client-core</artifactId>
+ <version>${hadoop.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-annotations</artifactId>
+ <version>${hadoop.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-client</artifactId>
+ <version>${hadoop.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro</artifactId>
+ <version>1.7.7</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${jersey.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ <version>${jersey.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-json</artifactId>
+ <version>${jersey.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-servlet</artifactId>
+ <version>${jersey.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-client</artifactId>
+ <version>${jersey.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-annotations</artifactId>
+ <version>${jetty.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>apache-jstl</artifactId>
+ <version>${jetty.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>18.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <version>1.3.176</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jasypt</groupId>
+ <artifactId>jasypt</artifactId>
+ <version>1.9.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <version>1.9.13</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.spark</groupId>
+ <artifactId>spark-streaming_2.10</artifactId>
+ <version>1.6.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.zookeeper</groupId>
+ <artifactId>zookeeper</artifactId>
+ <version>3.4.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-framework</artifactId>
+ <version>2.11.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-recipes</artifactId>
+ <version>2.11.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${org.slf4j.version}</version>
+ </dependency>
+
+
+ <!-- Test Dependencies for testing interactions with ZooKeeper -->
+ <dependency>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-test</artifactId>
+ <version>2.9.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>6.8.8</version>
+ <scope>test</scope>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.jsoup</groupId>
+ <artifactId>jsoup</artifactId>
+ <version>1.8.3</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <version>2.4.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.spockframework</groupId>
+ <artifactId>spock-core</artifactId>
+ <version>1.0-groovy-2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-all</artifactId>
+ <version>1.3</version>
+ </dependency>
</dependencies>
</dependencyManagement>
[3/6] nifi-minifi git commit: MINIFI-115 Bump NiFi versions to 1.0.0
Posted by jp...@apache.org.
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-nar/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-nar/src/main/resources/META-INF/NOTICE b/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-nar/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index be55e59..0000000
--- a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-nar/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,15 +0,0 @@
-minifi-provenance-reporting-task-nar
-Copyright 2015-2016 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-************************
-Common Development and Distribution License 1.1
-************************
-
-The following binary components are provided under the Common Development and Distribution License 1.1. See project link for details.
-
- (CDDL 1.1) (GPL2 w/ CPE) JSON Processing API (javax.json:javax.json-api:jar:1.0 - http://json-processing-spec.java.net)
- (CDDL 1.1) (GPL2 w/ CPE) JSON Processing Default Provider (org.glassfish:javax.json:jar:1.0.4 - https://jsonp.java.net)
-
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/pom.xml b/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/pom.xml
deleted file mode 100644
index 837b94f..0000000
--- a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/pom.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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/maven-v4_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.minifi</groupId>
- <artifactId>minifi-provenance-reporting-bundle</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>minifi-provenance-reporting-task</artifactId>
- <description>Publishes MiNiFi metrics to NiFi via S2S</description>
- <version>0.1.0-SNAPSHOT</version>
-
- <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-utils</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-ssl-context-service-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-site-to-site-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.json</artifactId>
- <version>1.0.4</version>
- </dependency>
- <dependency>
- <groupId>javax.json</groupId>
- <artifactId>javax.json-api</artifactId>
- <version>1.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-data-provenance-utils</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-mock</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/src/main/java/org/apache/nifi/minifi/provenance/reporting/ProvenanceReportingTask.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/src/main/java/org/apache/nifi/minifi/provenance/reporting/ProvenanceReportingTask.java b/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/src/main/java/org/apache/nifi/minifi/provenance/reporting/ProvenanceReportingTask.java
deleted file mode 100644
index a0d1776..0000000
--- a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/src/main/java/org/apache/nifi/minifi/provenance/reporting/ProvenanceReportingTask.java
+++ /dev/null
@@ -1,462 +0,0 @@
-/*
- * 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.minifi.provenance.reporting;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.nio.charset.StandardCharsets;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TimeZone;
-import java.util.UUID;
-import java.util.concurrent.TimeUnit;
-
-import javax.json.Json;
-import javax.json.JsonArray;
-import javax.json.JsonArrayBuilder;
-import javax.json.JsonBuilderFactory;
-import javax.json.JsonObject;
-import javax.json.JsonObjectBuilder;
-import javax.net.ssl.SSLContext;
-
-import org.apache.nifi.annotation.behavior.Stateful;
-import org.apache.nifi.annotation.documentation.CapabilityDescription;
-import org.apache.nifi.annotation.documentation.Tags;
-import org.apache.nifi.annotation.lifecycle.OnScheduled;
-import org.apache.nifi.annotation.lifecycle.OnStopped;
-import org.apache.nifi.components.PropertyDescriptor;
-import org.apache.nifi.components.ValidationContext;
-import org.apache.nifi.components.ValidationResult;
-import org.apache.nifi.components.Validator;
-import org.apache.nifi.components.state.Scope;
-import org.apache.nifi.components.state.StateManager;
-import org.apache.nifi.components.state.StateMap;
-import org.apache.nifi.controller.ConfigurationContext;
-import org.apache.nifi.controller.status.PortStatus;
-import org.apache.nifi.controller.status.ProcessGroupStatus;
-import org.apache.nifi.controller.status.ProcessorStatus;
-import org.apache.nifi.controller.status.RemoteProcessGroupStatus;
-import org.apache.nifi.events.EventReporter;
-import org.apache.nifi.processor.exception.ProcessException;
-import org.apache.nifi.processor.util.StandardValidators;
-import org.apache.nifi.provenance.ProvenanceEventRecord;
-import org.apache.nifi.remote.Transaction;
-import org.apache.nifi.remote.TransferDirection;
-import org.apache.nifi.remote.client.SiteToSiteClient;
-import org.apache.nifi.reporting.AbstractReportingTask;
-import org.apache.nifi.reporting.ReportingContext;
-import org.apache.nifi.reporting.Severity;
-import org.apache.nifi.ssl.SSLContextService;
-import org.apache.nifi.ssl.SSLContextService.ClientAuth;
-
-@Tags({"provenance", "lineage", "tracking", "site", "site to site"})
-@CapabilityDescription("Publishes Provenance events using the Site To Site protocol.")
-@Stateful(scopes = Scope.LOCAL, description = "Stores the Reporting Task's last event Id so that on restart of MiNiFi the task knows where it left off.")
-public class ProvenanceReportingTask extends AbstractReportingTask {
- private static final String TIMESTAMP_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
- private static final String LAST_EVENT_ID_KEY = "last_event_id";
-
- static final PropertyDescriptor DESTINATION_URL = new PropertyDescriptor.Builder()
- .name("Destination URL")
- .description("The URL to post the Provenance Events to.")
- .required(true)
- .expressionLanguageSupported(true)
- .addValidator(StandardValidators.URL_VALIDATOR)
- .build();
- static final PropertyDescriptor PORT_NAME = new PropertyDescriptor.Builder()
- .name("Input Port Name")
- .description("The name of the Input Port to delivery Provenance Events to.")
- .required(true)
- .expressionLanguageSupported(true)
- .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
- .build();
- static final PropertyDescriptor SSL_CONTEXT = new PropertyDescriptor.Builder()
- .name("SSL Context Service")
- .description("The SSL Context Service to use when communicating with the destination. If not specified, communications will not be secure.")
- .required(false)
- .identifiesControllerService(SSLContextService.class)
- .build();
- static final PropertyDescriptor MINIFI_URL = new PropertyDescriptor.Builder()
- .name("MiNiFi URL")
- .description("The URL of this MiNiFi instance. This is used to include the Content URI to send to the destination.")
- .required(true)
- .expressionLanguageSupported(true)
- .defaultValue("http://${hostname(true)}:8080/nifi")
- .addValidator(new NiFiUrlValidator())
- .build();
- static final PropertyDescriptor COMPRESS = new PropertyDescriptor.Builder()
- .name("Compress Events")
- .description("Indicates whether or not to compress the events when being sent.")
- .required(true)
- .allowableValues("true", "false")
- .defaultValue("true")
- .build();
- static final PropertyDescriptor TIMEOUT = new PropertyDescriptor.Builder()
- .name("Communications Timeout")
- .description("Specifies how long to wait to a response from the destination before deciding that an error has occurred and canceling the transaction")
- .required(true)
- .defaultValue("30 secs")
- .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR)
- .build();
- static final PropertyDescriptor BATCH_SIZE = new PropertyDescriptor.Builder()
- .name("Batch Size")
- .description("Specifies how many records to send in a single batch, at most.")
- .required(true)
- .defaultValue("1000")
- .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
- .build();
-
- private volatile long firstEventId = -1L;
- private volatile SiteToSiteClient siteToSiteClient;
-
- @Override
- protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
- final List<PropertyDescriptor> properties = new ArrayList<>();
- properties.add(DESTINATION_URL);
- properties.add(PORT_NAME);
- properties.add(SSL_CONTEXT);
- properties.add(MINIFI_URL);
- properties.add(COMPRESS);
- properties.add(TIMEOUT);
- properties.add(BATCH_SIZE);
- return properties;
- }
-
- @OnScheduled
- public void setup(final ConfigurationContext context) throws IOException {
- final SSLContextService sslContextService = context.getProperty(SSL_CONTEXT).asControllerService(SSLContextService.class);
- final SSLContext sslContext = sslContextService == null ? null : sslContextService.createSSLContext(ClientAuth.REQUIRED);
- final EventReporter eventReporter = new EventReporter() {
- @Override
- public void reportEvent(final Severity severity, final String category, final String message) {
- switch (severity) {
- case WARNING:
- getLogger().warn(message);
- break;
- case ERROR:
- getLogger().error(message);
- break;
- default:
- break;
- }
- }
- };
-
- final String destinationUrlPrefix = context.getProperty(DESTINATION_URL).evaluateAttributeExpressions().getValue();
- final String destinationUrl = destinationUrlPrefix + (destinationUrlPrefix.endsWith("/") ? "nifi" : "/nifi");
-
- siteToSiteClient = new SiteToSiteClient.Builder()
- .url(destinationUrl)
- .portName(context.getProperty(PORT_NAME).getValue())
- .useCompression(context.getProperty(COMPRESS).asBoolean())
- .eventReporter(eventReporter)
- .sslContext(sslContext)
- .timeout(context.getProperty(TIMEOUT).asTimePeriod(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS)
- .build();
- }
-
- @OnStopped
- public void shutdown() throws IOException {
- final SiteToSiteClient client = getClient();
- if (client != null) {
- client.close();
- }
- }
-
- // this getter is intended explicitly for testing purposes
- protected SiteToSiteClient getClient() {
- return this.siteToSiteClient;
- }
-
- private String getComponentName(final ProcessGroupStatus status, final ProvenanceEventRecord event) {
- if (status == null) {
- return null;
- }
-
- final String componentId = event.getComponentId();
- if (status.getId().equals(componentId)) {
- return status.getName();
- }
-
- for (final ProcessorStatus procStatus : status.getProcessorStatus()) {
- if (procStatus.getId().equals(componentId)) {
- return procStatus.getName();
- }
- }
-
- for (final PortStatus portStatus : status.getInputPortStatus()) {
- if (portStatus.getId().equals(componentId)) {
- return portStatus.getName();
- }
- }
-
- for (final PortStatus portStatus : status.getOutputPortStatus()) {
- if (portStatus.getId().equals(componentId)) {
- return portStatus.getName();
- }
- }
-
- for (final RemoteProcessGroupStatus rpgStatus : status.getRemoteProcessGroupStatus()) {
- if (rpgStatus.getId().equals(componentId)) {
- return rpgStatus.getName();
- }
- }
-
- for (final ProcessGroupStatus childGroup : status.getProcessGroupStatus()) {
- final String componentName = getComponentName(childGroup, event);
- if (componentName != null) {
- return componentName;
- }
- }
-
- return null;
- }
-
- @Override
- public void onTrigger(final ReportingContext context) {
- final ProcessGroupStatus procGroupStatus = context.getEventAccess().getControllerStatus();
- final String rootGroupName = procGroupStatus == null ? null : procGroupStatus.getName();
-
- Long currMaxId = context.getEventAccess().getProvenanceRepository().getMaxEventId();
-
- if(currMaxId == null) {
- getLogger().debug("No events to send because no events have been created yet.");
- return;
- }
-
- if (firstEventId < 0) {
- Map<String, String> state;
- try {
- state = context.getStateManager().getState(Scope.LOCAL).toMap();
- } catch (IOException e) {
- getLogger().error("Failed to get state at start up due to {}:"+e.getMessage(), e);
- return;
- }
- if (state.containsKey(LAST_EVENT_ID_KEY)) {
- firstEventId = Long.parseLong(state.get(LAST_EVENT_ID_KEY)) + 1;
- }
-
- if(currMaxId < firstEventId){
- getLogger().debug("Current provenance max id is {} which is less than what was stored in state as the last queried event, which was {}. This means the provenance restarted its " +
- "ids. Restarting querying from the beginning.", new Object[]{currMaxId, firstEventId});
- firstEventId = -1;
- }
- }
-
- if (currMaxId == (firstEventId - 1)) {
- getLogger().debug("No events to send due to the current max id being equal to the last id that was queried.");
- return;
- }
-
- final List<ProvenanceEventRecord> events;
- try {
- events = context.getEventAccess().getProvenanceEvents(firstEventId, context.getProperty(BATCH_SIZE).asInteger());
- } catch (final IOException ioe) {
- getLogger().error("Failed to retrieve Provenance Events from repository due to {}:"+ioe.getMessage(), ioe);
- return;
- }
-
- if (events == null || events.isEmpty()) {
- getLogger().debug("No events to send due to 'events' being null or empty.");
- return;
- }
-
- final long start = System.nanoTime();
- final Map<String, ?> config = Collections.emptyMap();
- final JsonBuilderFactory factory = Json.createBuilderFactory(config);
- final JsonObjectBuilder builder = factory.createObjectBuilder();
-
- final String nifiUrl = context.getProperty(MINIFI_URL).evaluateAttributeExpressions().getValue();
- URL url;
- try {
- url = new URL(nifiUrl);
- } catch (final MalformedURLException e1) {
- // already validated
- throw new AssertionError();
- }
-
- final String hostname = url.getHost();
-
- final JsonArrayBuilder arrayBuilder = factory.createArrayBuilder();
- for (final ProvenanceEventRecord event : events) {
- arrayBuilder.add(serialize(factory, builder, event, getComponentName(procGroupStatus, event), hostname, url, rootGroupName));
- }
- final JsonArray jsonArray = arrayBuilder.build();
-
- try {
- final Transaction transaction = getClient().createTransaction(TransferDirection.SEND);
- if (transaction == null) {
- getLogger().debug("All destination nodes are penalized; will attempt to send data later");
- return;
- }
-
- final Map<String, String> attributes = new HashMap<>();
- final String transactionId = UUID.randomUUID().toString();
- attributes.put("reporting.task.transaction.id", transactionId);
-
- final byte[] data = jsonArray.toString().getBytes(StandardCharsets.UTF_8);
- transaction.send(data, attributes);
- transaction.confirm();
- transaction.complete();
-
- final long transferMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start);
- getLogger().info("Successfully sent {} Provenance Events to destination in {} ms; Transaction ID = {}; First Event ID = {}",
- new Object[] {events.size(), transferMillis, transactionId, events.get(0).getEventId()});
- } catch (final IOException e) {
- throw new ProcessException("Failed to send Provenance Events to destination due to IOException:" + e.getMessage(), e);
- }
-
- final ProvenanceEventRecord lastEvent = events.get(events.size() - 1);
- final String lastEventId = String.valueOf(lastEvent.getEventId());
- try {
- StateManager stateManager = context.getStateManager();
- StateMap stateMap = stateManager.getState(Scope.LOCAL);
- Map<String, String> newMapOfState = new HashMap<>();
- newMapOfState.put(LAST_EVENT_ID_KEY, lastEventId);
- stateManager.replace(stateMap, newMapOfState, Scope.LOCAL);
- } catch (final IOException ioe) {
- getLogger().error("Failed to update state to {} due to {}; this could result in events being re-sent after a restart of MiNiFi. The message of {} was: {}",
- new Object[] {lastEventId, ioe, ioe, ioe.getMessage()}, ioe);
- }
-
- firstEventId = lastEvent.getEventId() + 1;
- }
-
- static JsonObject serialize(final JsonBuilderFactory factory, final JsonObjectBuilder builder, final ProvenanceEventRecord event,
- final String componentName, final String hostname, final URL nifiUrl, final String applicationName) {
- addField(builder, "eventId", UUID.randomUUID().toString());
- addField(builder, "eventOrdinal", event.getEventId());
- addField(builder, "eventType", event.getEventType().name());
- addField(builder, "timestampMillis", event.getEventTime());
-
- final DateFormat df = new SimpleDateFormat(TIMESTAMP_FORMAT);
- df.setTimeZone(TimeZone.getTimeZone("Z"));
- addField(builder, "timestamp", df.format(event.getEventTime()));
-
- addField(builder, "durationMillis", event.getEventDuration());
- addField(builder, "lineageStart", event.getLineageStartDate());
-
- final Set<String> lineageIdentifiers = new HashSet<>();
- if (event.getLineageIdentifiers() != null) {
- lineageIdentifiers.addAll(event.getLineageIdentifiers());
- }
- lineageIdentifiers.add(event.getFlowFileUuid());
- addField(builder, factory, "lineageIdentifiers", lineageIdentifiers);
- addField(builder, "details", event.getDetails());
- addField(builder, "componentId", event.getComponentId());
- addField(builder, "componentType", event.getComponentType());
- addField(builder, "componentName", componentName);
- addField(builder, "entityId", event.getFlowFileUuid());
- addField(builder, "entityType", "org.apache.nifi.flowfile.FlowFile");
- addField(builder, "entitySize", event.getFileSize());
- addField(builder, "previousEntitySize", event.getPreviousFileSize());
- addField(builder, factory, "updatedAttributes", event.getUpdatedAttributes());
- addField(builder, factory, "previousAttributes", event.getPreviousAttributes());
-
- addField(builder, "actorHostname", hostname);
- if (nifiUrl != null) {
- final String urlPrefix = nifiUrl.toString().replace(nifiUrl.getPath(), "");
- final String contentUriBase = urlPrefix + "/nifi-api/controller/provenance/events/" + event.getEventId() + "/content/";
- addField(builder, "contentURI", contentUriBase + "output");
- addField(builder, "previousContentURI", contentUriBase + "input");
- }
-
- addField(builder, factory, "parentIds", event.getParentUuids());
- addField(builder, factory, "childIds", event.getChildUuids());
- addField(builder, "transitUri", event.getTransitUri());
- addField(builder, "remoteIdentifier", event.getSourceSystemFlowFileIdentifier());
- addField(builder, "alternateIdentifier", event.getAlternateIdentifierUri());
- addField(builder, "platform", "minifi");
- addField(builder, "application", applicationName);
-
- return builder.build();
- }
-
- private static void addField(final JsonObjectBuilder builder, final JsonBuilderFactory factory, final String key, final Map<String, String> values) {
- if (values == null) {
- return;
- }
-
- final JsonObjectBuilder mapBuilder = factory.createObjectBuilder();
- for (final Map.Entry<String, String> entry : values.entrySet()) {
- if (entry.getKey() == null || entry.getValue() == null) {
- continue;
- }
-
- mapBuilder.add(entry.getKey(), entry.getValue());
- }
-
- builder.add(key, mapBuilder);
- }
-
- private static void addField(final JsonObjectBuilder builder, final String key, final Long value) {
- if (value != null) {
- builder.add(key, value.longValue());
- }
- }
-
- private static void addField(final JsonObjectBuilder builder, final JsonBuilderFactory factory, final String key, final Collection<String> values) {
- if (values == null) {
- return;
- }
-
- builder.add(key, createJsonArray(factory, values));
- }
-
- private static void addField(final JsonObjectBuilder builder, final String key, final String value) {
- if (value == null) {
- return;
- }
-
- builder.add(key, value);
- }
-
- private static JsonArrayBuilder createJsonArray(JsonBuilderFactory factory, final Collection<String> values) {
- final JsonArrayBuilder builder = factory.createArrayBuilder();
- for (final String value : values) {
- if (value != null) {
- builder.add(value);
- }
- }
- return builder;
- }
-
-
- private static class NiFiUrlValidator implements Validator {
- @Override
- public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
- final String value = context.newPropertyValue(input).evaluateAttributeExpressions().getValue();
- try {
- new URL(value);
- } catch (final Exception e) {
- return new ValidationResult.Builder().input(input).subject(subject).valid(false).explanation("Not a valid URL").build();
- }
-
- return new ValidationResult.Builder().input(input).subject(subject).valid(true).build();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/src/main/resources/META-INF/services/org.apache.nifi.reporting.ReportingTask
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/src/main/resources/META-INF/services/org.apache.nifi.reporting.ReportingTask b/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/src/main/resources/META-INF/services/org.apache.nifi.reporting.ReportingTask
deleted file mode 100644
index 331d759..0000000
--- a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/src/main/resources/META-INF/services/org.apache.nifi.reporting.ReportingTask
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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.
-
-org.apache.nifi.minifi.provenance.reporting.ProvenanceReportingTask
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/src/test/java/org/apache/nifi/minifi/provenance/reporting/TestProvenanceReportingTask.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/src/test/java/org/apache/nifi/minifi/provenance/reporting/TestProvenanceReportingTask.java b/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/src/test/java/org/apache/nifi/minifi/provenance/reporting/TestProvenanceReportingTask.java
deleted file mode 100644
index 97291c0..0000000
--- a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-task/src/test/java/org/apache/nifi/minifi/provenance/reporting/TestProvenanceReportingTask.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * 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.minifi.provenance.reporting;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import org.apache.nifi.components.PropertyDescriptor;
-import org.apache.nifi.components.PropertyValue;
-import org.apache.nifi.flowfile.FlowFile;
-import org.apache.nifi.logging.ComponentLog;
-import org.apache.nifi.provenance.ProvenanceEventBuilder;
-import org.apache.nifi.provenance.ProvenanceEventRecord;
-import org.apache.nifi.provenance.ProvenanceEventRepository;
-import org.apache.nifi.provenance.ProvenanceEventType;
-import org.apache.nifi.provenance.StandardProvenanceEventRecord;
-import org.apache.nifi.remote.Transaction;
-import org.apache.nifi.remote.TransferDirection;
-import org.apache.nifi.remote.client.SiteToSiteClient;
-import org.apache.nifi.reporting.EventAccess;
-import org.apache.nifi.reporting.InitializationException;
-import org.apache.nifi.reporting.ReportingContext;
-import org.apache.nifi.reporting.ReportingInitializationContext;
-import org.apache.nifi.state.MockStateManager;
-import org.apache.nifi.stream.io.ByteArrayInputStream;
-import org.apache.nifi.util.MockFlowFile;
-import org.apache.nifi.util.MockPropertyValue;
-import org.junit.Assert;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-import javax.json.Json;
-import javax.json.JsonObject;
-import javax.json.JsonReader;
-
-public class TestProvenanceReportingTask {
-
- @Test
- public void testSerializedForm() throws IOException, InitializationException {
- final String uuid = "10000000-0000-0000-0000-000000000000";
- final Map<String, String> attributes = new HashMap<>();
- attributes.put("abc", "xyz");
- attributes.put("xyz", "abc");
- attributes.put("filename", "file-" + uuid);
-
- final Map<String, String> prevAttrs = new HashMap<>();
- attributes.put("filename", "1234.xyz");
-
- final Set<String> lineageIdentifiers = new HashSet<>();
- lineageIdentifiers.add("123");
- lineageIdentifiers.add("321");
-
- final ProvenanceEventBuilder builder = new StandardProvenanceEventRecord.Builder();
- builder.setEventTime(System.currentTimeMillis());
- builder.setEventType(ProvenanceEventType.RECEIVE);
- builder.setTransitUri("nifi://unit-test");
- attributes.put("uuid", uuid);
- builder.fromFlowFile(createFlowFile(3L, attributes));
- builder.setAttributes(prevAttrs, attributes);
- builder.setComponentId("1234");
- builder.setComponentType("dummy processor");
- builder.setLineageIdentifiers(lineageIdentifiers);
- final ProvenanceEventRecord event = builder.build();
-
- final List<byte[]> dataSent = new ArrayList<>();
- final ProvenanceReportingTask task = new ProvenanceReportingTask() {
- @SuppressWarnings("unchecked")
- @Override
- protected SiteToSiteClient getClient() {
- final SiteToSiteClient client = Mockito.mock(SiteToSiteClient.class);
- final Transaction transaction = Mockito.mock(Transaction.class);
-
- try {
- Mockito.doAnswer(new Answer<Object>() {
- @Override
- public Object answer(final InvocationOnMock invocation) throws Throwable {
- final byte[] data = invocation.getArgumentAt(0, byte[].class);
- dataSent.add(data);
- return null;
- }
- }).when(transaction).send(Mockito.any(byte[].class), Mockito.any(Map.class));
-
- Mockito.when(client.createTransaction(Mockito.any(TransferDirection.class))).thenReturn(transaction);
- } catch (final Exception e) {
- e.printStackTrace();
- Assert.fail(e.toString());
- }
-
- return client;
- }
- };
-
- final List<ProvenanceEventRecord> events = new ArrayList<>();
- events.add(event);
-
- final Map<PropertyDescriptor, String> properties = new HashMap<>();
- for (final PropertyDescriptor descriptor : task.getSupportedPropertyDescriptors()) {
- properties.put(descriptor, descriptor.getDefaultValue());
- }
- properties.put(ProvenanceReportingTask.BATCH_SIZE, "1000");
-
- final ReportingContext context = Mockito.mock(ReportingContext.class);
- Mockito.when(context.getStateManager())
- .thenReturn(new MockStateManager(task));
- Mockito.doAnswer(new Answer<PropertyValue>() {
- @Override
- public PropertyValue answer(final InvocationOnMock invocation) throws Throwable {
- final PropertyDescriptor descriptor = invocation.getArgumentAt(0, PropertyDescriptor.class);
- return new MockPropertyValue(properties.get(descriptor), null);
- }
- }).when(context).getProperty(Mockito.any(PropertyDescriptor.class));
-
- final EventAccess eventAccess = Mockito.mock(EventAccess.class);
- Mockito.doAnswer(new Answer<List<ProvenanceEventRecord>>() {
- @Override
- public List<ProvenanceEventRecord> answer(final InvocationOnMock invocation) throws Throwable {
- final long startId = invocation.getArgumentAt(0, long.class);
- final int maxRecords = invocation.getArgumentAt(1, int.class);
-
- final List<ProvenanceEventRecord> eventsToReturn = new ArrayList<>();
- for (int i = (int) Math.max(0, startId); i < (int) (startId + maxRecords) && i < events.size(); i++) {
- eventsToReturn.add(events.get(i));
- }
- return eventsToReturn;
- }
- }).when(eventAccess).getProvenanceEvents(Mockito.anyLong(), Mockito.anyInt());
-
- final ProvenanceEventRepository provenanceRepository = Mockito.mock(ProvenanceEventRepository.class);
- Mockito.doAnswer(new Answer<Long>() {
- @Override
- public Long answer(final InvocationOnMock invocation) throws Throwable {
- return 1L;
- }
- }).when(provenanceRepository).getMaxEventId();
-
- Mockito.when(context.getEventAccess()).thenReturn(eventAccess);
- Mockito.when(eventAccess.getProvenanceRepository()).thenReturn(provenanceRepository);
-
- final ComponentLog logger = Mockito.mock(ComponentLog.class);
- final ReportingInitializationContext initContext = Mockito.mock(ReportingInitializationContext.class);
- Mockito.when(initContext.getIdentifier()).thenReturn(UUID.randomUUID().toString());
- Mockito.when(initContext.getLogger()).thenReturn(logger);
-
-
- task.initialize(initContext);
- task.onTrigger(context);
-
- assertEquals(1, dataSent.size());
- final String msg = new String(dataSent.get(0), StandardCharsets.UTF_8);
- JsonReader jsonReader = Json.createReader(new ByteArrayInputStream(msg.getBytes()));
- JsonObject msgArray = jsonReader.readArray().getJsonObject(0).getJsonObject("updatedAttributes");
- assertEquals(msgArray.getString("abc"), events.get(0).getAttributes().get("abc"));
- }
-
- public static FlowFile createFlowFile(final long id, final Map<String, String> attributes) {
- MockFlowFile mockFlowFile = new MockFlowFile(id);
- mockFlowFile.putAttributes(attributes);
- return mockFlowFile;
- }
-}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-provenance-reporting-bundle/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-reporting-bundle/pom.xml b/minifi-nar-bundles/minifi-provenance-reporting-bundle/pom.xml
deleted file mode 100644
index f3e70c7..0000000
--- a/minifi-nar-bundles/minifi-provenance-reporting-bundle/pom.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-<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/maven-v4_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.minifi</groupId>
- <artifactId>minifi-nar-bundles</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>minifi-provenance-reporting-bundle</artifactId>
- <packaging>pom</packaging>
-
- <modules>
- <module>minifi-provenance-reporting-task</module>
- <module>minifi-provenance-reporting-nar</module>
- </modules>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.nifi.minifi</groupId>
- <artifactId>minifi-provenance-reporting-task</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.core</groupId>
- <artifactId>jersey-client</artifactId>
- <version>2.19</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-</project>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/MiNiFiPersistentProvenanceRepository.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/MiNiFiPersistentProvenanceRepository.java b/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/MiNiFiPersistentProvenanceRepository.java
index ea66c38..a015dca 100644
--- a/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/MiNiFiPersistentProvenanceRepository.java
+++ b/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/MiNiFiPersistentProvenanceRepository.java
@@ -54,11 +54,14 @@ import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.regex.Pattern;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.authorization.Authorizer;
+import org.apache.nifi.authorization.user.NiFiUser;
import org.apache.nifi.events.EventReporter;
import org.apache.nifi.processor.DataUnit;
import org.apache.nifi.provenance.expiration.ExpirationAction;
import org.apache.nifi.provenance.expiration.FileRemovalAction;
-import org.apache.nifi.provenance.lucene.LuceneUtil;
+import org.apache.nifi.provenance.lineage.ComputeLineageSubmission;
import org.apache.nifi.provenance.search.Query;
import org.apache.nifi.provenance.search.QuerySubmission;
import org.apache.nifi.provenance.search.SearchableField;
@@ -77,7 +80,7 @@ import org.slf4j.LoggerFactory;
// TODO: When API, FlowController, and supporting classes are refactored/reimplemented migrate this class and its accompanying imports to minifi package structure
-public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepository {
+public class MiNiFiPersistentProvenanceRepository implements ProvenanceRepository {
public static final String EVENT_CATEGORY = "Provenance Repository";
private static final String FILE_EXTENSION = ".prov";
@@ -132,7 +135,20 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
private Long maxId = null;
public MiNiFiPersistentProvenanceRepository() throws IOException {
- this(createRepositoryConfiguration(), 10000);
+ maxPartitionMillis = 0;
+ maxPartitionBytes = 0;
+ writers = null;
+ configuration = null;
+ alwaysSync = false;
+ rolloverCheckMillis = 0;
+ maxAttributeChars = 0;
+ scheduledExecService = null;
+ rolloverExecutor = null;
+ eventReporter = null;
+ }
+
+ public MiNiFiPersistentProvenanceRepository(final NiFiProperties nifiProperties) throws IOException {
+ this(createRepositoryConfiguration(nifiProperties), 10000);
}
public MiNiFiPersistentProvenanceRepository(final RepositoryConfiguration configuration, final int rolloverCheckMillis) throws IOException {
@@ -170,7 +186,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
}
@Override
- public void initialize(final EventReporter eventReporter) throws IOException {
+ public void initialize(final EventReporter eventReporter, final Authorizer authorizer, final ProvenanceAuthorizableFactory resourceFactory) throws IOException {
writeLock.lock();
try {
if (initialized.getAndSet(true)) {
@@ -237,8 +253,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
}
}
- private static RepositoryConfiguration createRepositoryConfiguration() throws IOException {
- final NiFiProperties properties = NiFiProperties.getInstance();
+ private static RepositoryConfiguration createRepositoryConfiguration(final NiFiProperties properties) throws IOException {
final Map<String, Path> storageDirectories = properties.getProvenanceRepositoryPaths();
if (storageDirectories.isEmpty()) {
storageDirectories.put("provenance_repository", Paths.get("provenance_repository"));
@@ -337,6 +352,11 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
}
@Override
+ public List<ProvenanceEventRecord> getEvents(final long firstRecordId, final int maxRecords, final NiFiUser user) throws IOException {
+ throw new MethodNotSupportedException("Cannot list events for a specified user.");
+ }
+
+ @Override
public List<ProvenanceEventRecord> getEvents(final long firstRecordId, final int maxRecords) throws IOException {
final List<ProvenanceEventRecord> records = new ArrayList<>(maxRecords);
@@ -511,7 +531,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
continue;
}
- final String basename = LuceneUtil.substringBefore(recoveredJournal.getName(), ".");
+ final String basename = StringUtils.substringBefore(recoveredJournal.getName(), ".");
try {
final long minId = Long.parseLong(basename);
@@ -586,7 +606,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
final int numDirty = dirtyWriterCount.get();
if (numDirty >= recordWriters.length) {
throw new IllegalStateException("Cannot update repository because all partitions are unusable at this time. Writing to the repository would cause corruption. "
- + "This most often happens as a result of the repository running out of disk space or the JMV running out of memory.");
+ + "This most often happens as a result of the repository running out of disk space or the JMV running out of memory.");
}
final long idx = writerIndex.getAndIncrement();
@@ -754,8 +774,8 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
final Comparator<File> sortByBasenameComparator = new Comparator<File>() {
@Override
public int compare(final File o1, final File o2) {
- final String baseName1 = LuceneUtil.substringBefore(o1.getName(), ".");
- final String baseName2 = LuceneUtil.substringBefore(o2.getName(), ".");
+ final String baseName1 = StringUtils.substringBefore(o1.getName(), ".");
+ final String baseName2 = StringUtils.substringBefore(o2.getName(), ".");
Long id1 = null;
Long id2 = null;
@@ -809,7 +829,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
// Age off the data.
final Set<String> removed = new LinkedHashSet<>();
for (File file : uniqueFilesToPurge) {
- final String baseName = LuceneUtil.substringBefore(file.getName(), ".");
+ final String baseName = StringUtils.substringBefore(file.getName(), ".");
ExpirationAction currentAction = null;
try {
for (final ExpirationAction action : expirationActions) {
@@ -826,15 +846,15 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
removed.add(baseName);
} catch (final FileNotFoundException fnf) {
logger.warn("Failed to perform Expiration Action {} on Provenance Event file {} because the file no longer exists; will not "
- + "perform additional Expiration Actions on this file", currentAction, file);
+ + "perform additional Expiration Actions on this file", currentAction, file);
removed.add(baseName);
} catch (final Throwable t) {
logger.warn("Failed to perform Expiration Action {} on Provenance Event file {} due to {}; will not perform additional "
- + "Expiration Actions on this file at this time", currentAction, file, t.toString());
+ + "Expiration Actions on this file at this time", currentAction, file, t.toString());
logger.warn("", t);
eventReporter.reportEvent(Severity.WARNING, EVENT_CATEGORY, "Failed to perform Expiration Action " + currentAction +
- " on Provenance Event file " + file + " due to " + t.toString() + "; will not perform additional Expiration Actions " +
- "on this file at this time");
+ " on Provenance Event file " + file + " due to " + t.toString() + "; will not perform additional Expiration Actions " +
+ "on this file at this time");
}
}
@@ -852,7 +872,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
while (itr.hasNext()) {
final Map.Entry<Long, Path> entry = itr.next();
final String filename = entry.getValue().toFile().getName();
- final String baseName = LuceneUtil.substringBefore(filename, ".");
+ final String baseName = StringUtils.substringBefore(filename, ".");
if (removed.contains(baseName)) {
itr.remove();
@@ -972,7 +992,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
if (journalsToMerge.isEmpty()) {
logger.debug("No journals to merge; all RecordWriters were already closed");
} else {
- logger.debug("Going to merge {} files for journals starting with ID {}", journalsToMerge.size(), LuceneUtil.substringBefore(journalsToMerge.get(0).getName(), "."));
+ logger.debug("Going to merge {} files for journals starting with ID {}", journalsToMerge.size(), StringUtils.substringBefore(journalsToMerge.get(0).getName(), "."));
}
}
@@ -1010,7 +1030,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
// We need to make sure that another thread doesn't also update the map at the same time. We cannot
// use the write lock when purging old events, and we want to use the same approach here.
boolean updated = false;
- final Long fileFirstEventId = Long.valueOf(LuceneUtil.substringBefore(fileRolledOver.getName(), "."));
+ final Long fileFirstEventId = Long.valueOf(StringUtils.substringBefore(fileRolledOver.getName(), "."));
while (!updated) {
final SortedMap<Long, Path> existingPathMap = idToPathMap.get();
final SortedMap<Long, Path> newIdToPathMap = new TreeMap<>(new PathMapComparator());
@@ -1064,10 +1084,10 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
// that is no longer the case.
if (journalFileCount > journalCountThreshold || repoSize > sizeThreshold) {
logger.warn("The rate of the dataflow is exceeding the provenance recording rate. "
- + "Slowing down flow to accommodate. Currently, there are {} journal files ({} bytes) and "
- + "threshold for blocking is {} ({} bytes)", journalFileCount, repoSize, journalCountThreshold, sizeThreshold);
+ + "Slowing down flow to accommodate. Currently, there are {} journal files ({} bytes) and "
+ + "threshold for blocking is {} ({} bytes)", journalFileCount, repoSize, journalCountThreshold, sizeThreshold);
eventReporter.reportEvent(Severity.WARNING, "Provenance Repository", "The rate of the dataflow is "
- + "exceeding the provenance recording rate. Slowing down flow to accommodate");
+ + "exceeding the provenance recording rate. Slowing down flow to accommodate");
while (journalFileCount > journalCountThreshold || repoSize > sizeThreshold) {
// if a shutdown happens while we are in this loop, kill the rollover thread and break
@@ -1097,15 +1117,15 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
}
logger.debug("Provenance Repository is still behind. Keeping flow slowed down "
- + "to accommodate. Currently, there are {} journal files ({} bytes) and "
- + "threshold for blocking is {} ({} bytes)", journalFileCount, repoSize, journalCountThreshold, sizeThreshold);
+ + "to accommodate. Currently, there are {} journal files ({} bytes) and "
+ + "threshold for blocking is {} ({} bytes)", journalFileCount, repoSize, journalCountThreshold, sizeThreshold);
journalFileCount = getJournalCount();
repoSize = getSize(getLogFiles(), 0L);
}
logger.info("Provenance Repository has now caught up with rolling over journal files. Current number of "
- + "journal files to be rolled over is {}", journalFileCount);
+ + "journal files to be rolled over is {}", journalFileCount);
}
// we've finished rolling over successfully. Create new writers and reset state.
@@ -1143,7 +1163,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
continue;
}
- final String basename = LuceneUtil.substringBefore(journalFile.getName(), ".");
+ final String basename = StringUtils.substringBefore(journalFile.getName(), ".");
List<File> files = journalMap.get(basename);
if (files == null) {
files = new ArrayList<>();
@@ -1171,7 +1191,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
// verify that all Journal files have the same basename
String canonicalBaseName = null;
for (final File journal : journalFiles) {
- final String basename = LuceneUtil.substringBefore(journal.getName(), ".");
+ final String basename = StringUtils.substringBefore(journal.getName(), ".");
if (canonicalBaseName == null) {
canonicalBaseName = basename;
}
@@ -1203,7 +1223,6 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
* @throws IOException if a problem occurs writing to the mergedFile, reading from a journal
*/
File mergeJournals(final List<File> journalFiles, final File suggestedMergeFile, final EventReporter eventReporter) throws IOException {
- logger.warn("Merging {} to {}", journalFiles, suggestedMergeFile);
if (this.closed.get()) {
logger.info("Provenance Repository has been closed; will not merge journal files to {}", suggestedMergeFile);
return null;
@@ -1217,8 +1236,8 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
Collections.sort(journalFiles, new Comparator<File>() {
@Override
public int compare(final File o1, final File o2) {
- final String suffix1 = LuceneUtil.substringAfterLast(o1.getName(), ".");
- final String suffix2 = LuceneUtil.substringAfterLast(o2.getName(), ".");
+ final String suffix1 = StringUtils.substringAfterLast(o1.getName(), ".");
+ final String suffix2 = StringUtils.substringAfterLast(o2.getName(), ".");
try {
final int journalIndex1 = Integer.parseInt(suffix1);
@@ -1231,7 +1250,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
});
final String firstJournalFile = journalFiles.get(0).getName();
- final String firstFileSuffix = LuceneUtil.substringAfterLast(firstJournalFile, ".");
+ final String firstFileSuffix = StringUtils.substringAfterLast(firstJournalFile, ".");
final boolean allPartialFiles = firstFileSuffix.equals("0");
// check if we have all of the "partial" files for the journal.
@@ -1240,26 +1259,26 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
// we have all "partial" files and there is already a merged file. Delete the data from the index
// because the merge file may not be fully merged. We will re-merge.
logger.warn("Merged Journal File {} already exists; however, all partial journal files also exist "
- + "so assuming that the merge did not finish. Repeating procedure in order to ensure consistency.");
+ + "so assuming that the merge did not finish. Repeating procedure in order to ensure consistency.");
// Since we only store the file's basename, block offset, and event ID, and because the newly created file could end up on
// a different Storage Directory than the original, we need to ensure that we delete both the partially merged
// file and the TOC file. Otherwise, we could get the wrong copy and have issues retrieving events.
if (!suggestedMergeFile.delete()) {
logger.error("Failed to delete partially written Provenance Journal File {}. This may result in events from this journal "
- + "file not being able to be displayed. This file should be deleted manually.", suggestedMergeFile);
+ + "file not being able to be displayed. This file should be deleted manually.", suggestedMergeFile);
}
final File tocFile = TocUtil.getTocFile(suggestedMergeFile);
if (tocFile.exists() && !tocFile.delete()) {
logger.error("Failed to delete .toc file {}; this may result in not being able to read the Provenance Events from the {} Journal File. "
- + "This can be corrected by manually deleting the {} file", tocFile, suggestedMergeFile, tocFile);
+ + "This can be corrected by manually deleting the {} file", tocFile, suggestedMergeFile, tocFile);
}
}
} else {
logger.warn("Cannot merge journal files {} because expected first file to end with extension '.0' "
- + "but it did not; assuming that the files were already merged but only some finished deletion "
- + "before restart. Deleting remaining partial journal files.", journalFiles);
+ + "but it did not; assuming that the files were already merged but only some finished deletion "
+ + "before restart. Deleting remaining partial journal files.", journalFiles);
for (final File file : journalFiles) {
if (!file.delete() && file.exists()) {
@@ -1320,14 +1339,14 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
} catch (final EOFException eof) {
} catch (final Exception e) {
logger.warn("Failed to generate Provenance Event Record from Journal due to " + e + "; it's possible that the record wasn't "
- + "completely written to the file. This record will be skipped.");
+ + "completely written to the file. This record will be skipped.");
if (logger.isDebugEnabled()) {
logger.warn("", e);
}
if (eventReporter != null) {
eventReporter.reportEvent(Severity.WARNING, EVENT_CATEGORY, "Failed to read Provenance Event Record from Journal due to " + e +
- "; it's possible that hte record wasn't completely written to the file. This record will be skipped.");
+ "; it's possible that hte record wasn't completely written to the file. This record will be skipped.");
}
}
@@ -1393,7 +1412,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
if (eventReporter != null) {
eventReporter.reportEvent(Severity.WARNING, EVENT_CATEGORY, "Failed to remove temporary journal file " +
- journalFile.getAbsolutePath() + "; this file should be cleaned up manually");
+ journalFile.getAbsolutePath() + "; this file should be cleaned up manually");
}
}
@@ -1403,7 +1422,7 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
if (eventReporter != null) {
eventReporter.reportEvent(Severity.WARNING, EVENT_CATEGORY, "Failed to remove temporary journal TOC file " +
- tocFile.getAbsolutePath() + "; this file should be cleaned up manually");
+ tocFile.getAbsolutePath() + "; this file should be cleaned up manually");
}
}
}
@@ -1598,12 +1617,12 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
}
@Override
- public QuerySubmission submitQuery(Query query) {
+ public QuerySubmission submitQuery(Query query, NiFiUser niFiUser) {
throw new MethodNotSupportedException("Querying and indexing is not available for implementation " + this.getClass().getName());
}
@Override
- public QuerySubmission retrieveQuerySubmission(String queryIdentifier) {
+ public QuerySubmission retrieveQuerySubmission(String queryIdentifier, NiFiUser niFiUser) {
throw new MethodNotSupportedException("Querying and indexing is not available for implementation " + this.getClass().getName());
}
@@ -1618,23 +1637,37 @@ public class MiNiFiPersistentProvenanceRepository implements ProvenanceEventRepo
}
@Override
- public AsyncLineageSubmission submitLineageComputation(final String flowFileUuid) {
+ public AsyncLineageSubmission submitLineageComputation(final String flowFileUuid, NiFiUser niFiUser) {
+ throw new MethodNotSupportedException("Computation of lineage is not available for implementation " + this.getClass().getName());
+ }
+
+ @Override
+ public ComputeLineageSubmission submitLineageComputation(long eventId, NiFiUser user) {
throw new MethodNotSupportedException("Computation of lineage is not available for implementation " + this.getClass().getName());
}
@Override
- public AsyncLineageSubmission submitExpandChildren(final long eventId) {
+ public AsyncLineageSubmission submitExpandChildren(final long eventId, NiFiUser niFiUser) {
throw new MethodNotSupportedException("Computation of lineage is not available for implementation " + this.getClass().getName());
}
@Override
- public AsyncLineageSubmission submitExpandParents(final long eventId) {
+ public AsyncLineageSubmission submitExpandParents(final long eventId, NiFiUser niFiUser) {
throw new MethodNotSupportedException("Computation of lineage is not available for implementation " + this.getClass().getName());
}
@Override
- public AsyncLineageSubmission retrieveLineageSubmission(final String lineageIdentifier) {
+ public AsyncLineageSubmission retrieveLineageSubmission(final String lineageIdentifier, NiFiUser niFiUser) {
throw new MethodNotSupportedException("Computation of lineage is not available for implementation " + this.getClass().getName());
}
+ @Override
+ public ProvenanceEventRecord getEvent(final long id, final NiFiUser user) throws IOException {
+ throw new MethodNotSupportedException("Cannot handle user authorization requests.");
+ }
+
+ @Override
+ public ProvenanceEventRepository getProvenanceEventRepository() {
+ return this;
+ }
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/main/resources/META-INF/services/org.apache.nifi.provenance.ProvenanceRepository
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/main/resources/META-INF/services/org.apache.nifi.provenance.ProvenanceRepository b/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/main/resources/META-INF/services/org.apache.nifi.provenance.ProvenanceRepository
new file mode 100644
index 0000000..71f8c06
--- /dev/null
+++ b/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/main/resources/META-INF/services/org.apache.nifi.provenance.ProvenanceRepository
@@ -0,0 +1,15 @@
+# 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.
+org.apache.nifi.provenance.MiNiFiPersistentProvenanceRepository
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestMiNiFiPersistentProvenanceRepository.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestMiNiFiPersistentProvenanceRepository.java b/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestMiNiFiPersistentProvenanceRepository.java
index 118a2a6..fbeeeb6 100644
--- a/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestMiNiFiPersistentProvenanceRepository.java
+++ b/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestMiNiFiPersistentProvenanceRepository.java
@@ -148,7 +148,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
config.setMaxEventFileCapacity(1L);
config.setMaxEventFileLife(1, TimeUnit.SECONDS);
repo = new MiNiFiPersistentProvenanceRepository(config, DEFAULT_ROLLOVER_MILLIS);
- repo.initialize(getEventReporter());
+ repo.initialize(getEventReporter(), null, null);
final Map<String, String> attributes = new HashMap<>();
attributes.put("abc", "xyz");
@@ -176,7 +176,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
Thread.sleep(500L); // Give the repo time to shutdown (i.e., close all file handles, etc.)
repo = new MiNiFiPersistentProvenanceRepository(config, DEFAULT_ROLLOVER_MILLIS);
- repo.initialize(getEventReporter());
+ repo.initialize(getEventReporter(), null, null);
final List<ProvenanceEventRecord> recoveredRecords = repo.getEvents(0L, 12);
Assert.assertEquals("Did not establish the correct, Max Event Id through recovery after reloading", 9, repo.getMaxEventId().intValue());
@@ -198,7 +198,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
config.setMaxEventFileLife(500, TimeUnit.MILLISECONDS);
config.setCompressOnRollover(true);
repo = new MiNiFiPersistentProvenanceRepository(config, DEFAULT_ROLLOVER_MILLIS);
- repo.initialize(getEventReporter());
+ repo.initialize(getEventReporter(), null, null);
final String uuid = "00000000-0000-0000-0000-000000000000";
final Map<String, String> attributes = new HashMap<>();
@@ -236,7 +236,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
config.setSearchableFields(new ArrayList<>(SearchableFields.getStandardFields()));
repo = new MiNiFiPersistentProvenanceRepository(config, DEFAULT_ROLLOVER_MILLIS);
- repo.initialize(getEventReporter());
+ repo.initialize(getEventReporter(), null, null);
final String uuid = "00000000-0000-0000-0000-000000000001";
final Map<String, String> attributes = new HashMap<>();
@@ -244,7 +244,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
attributes.put("uuid", uuid);
attributes.put("filename", "file-" + uuid);
- repo.submitLineageComputation(uuid);
+ repo.submitLineageComputation(uuid, null);
}
@@ -253,7 +253,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
final RepositoryConfiguration config = createConfiguration();
config.setMaxEventFileLife(1, TimeUnit.SECONDS);
repo = new MiNiFiPersistentProvenanceRepository(config, DEFAULT_ROLLOVER_MILLIS);
- repo.initialize(getEventReporter());
+ repo.initialize(getEventReporter(), null, null);
final String uuid = "00000000-0000-0000-0000-000000000000";
final Map<String, String> attributes = new HashMap<>();
@@ -279,7 +279,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
repo.close();
final MiNiFiPersistentProvenanceRepository secondRepo = new MiNiFiPersistentProvenanceRepository(config, DEFAULT_ROLLOVER_MILLIS);
- secondRepo.initialize(getEventReporter());
+ secondRepo.initialize(getEventReporter(), null, null);
try {
final ProvenanceEventRecord event11 = builder.build();
@@ -336,7 +336,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
config.setDesiredIndexSize(10);
repo = new MiNiFiPersistentProvenanceRepository(config, DEFAULT_ROLLOVER_MILLIS);
- repo.initialize(getEventReporter());
+ repo.initialize(getEventReporter(), null, null);
String uuid = UUID.randomUUID().toString();
for (int i = 0; i < 20; i++) {
@@ -369,7 +369,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
return journalCountRef.get();
}
};
- repo.initialize(getEventReporter());
+ repo.initialize(getEventReporter(), null, null);
final Map<String, String> attributes = new HashMap<>();
final ProvenanceEventBuilder builder = new StandardProvenanceEventRecord.Builder();
@@ -422,7 +422,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
final RepositoryConfiguration config = createConfiguration();
config.setMaxEventFileLife(3, TimeUnit.SECONDS);
repo = new MiNiFiPersistentProvenanceRepository(config, DEFAULT_ROLLOVER_MILLIS);
- repo.initialize(getEventReporter());
+ repo.initialize(getEventReporter(), null, null);
final Map<String, String> attributes = new HashMap<>();
@@ -473,7 +473,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
config.setMaxAttributeChars(50);
config.setMaxEventFileLife(3, TimeUnit.SECONDS);
repo = new MiNiFiPersistentProvenanceRepository(config, DEFAULT_ROLLOVER_MILLIS);
- repo.initialize(getEventReporter());
+ repo.initialize(getEventReporter(), null, null);
final Map<String, String> attributes = new HashMap<>();
attributes.put("75chars", "123456789012345678901234567890123456789012345678901234567890123456789012345");
@@ -520,7 +520,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
};
// initialize with our event reporter
- repo.initialize(getEventReporter());
+ repo.initialize(getEventReporter(), null, null);
// create some events in the journal files.
final Map<String, String> attributes = new HashMap<>();
@@ -597,7 +597,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
return spiedWriters;
}
};
- repo.initialize(getEventReporter());
+ repo.initialize(getEventReporter(), null, null);
final Map<String, String> attributes = new HashMap<>();
attributes.put("75chars", "123456789012345678901234567890123456789012345678901234567890123456789012345");
@@ -658,7 +658,7 @@ public class TestMiNiFiPersistentProvenanceRepository {
};
try {
- recoveryRepo.initialize(getEventReporter());
+ recoveryRepo.initialize(getEventReporter(), null, null);
} finally {
recoveryRepo.close();
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestUtil.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestUtil.java b/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestUtil.java
index 26766d6..935d439 100644
--- a/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestUtil.java
+++ b/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestUtil.java
@@ -17,9 +17,7 @@
package org.apache.nifi.provenance;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Map;
-import java.util.Set;
import org.apache.nifi.flowfile.FlowFile;
@@ -39,13 +37,13 @@ public class TestUtil {
}
@Override
- public Set<String> getLineageIdentifiers() {
- return new HashSet<String>();
+ public long getLineageStartDate() {
+ return System.currentTimeMillis();
}
@Override
- public long getLineageStartDate() {
- return System.currentTimeMillis();
+ public long getLineageStartIndex() {
+ return 0;
}
@Override
@@ -54,6 +52,11 @@ public class TestUtil {
}
@Override
+ public long getQueueDateIndex() {
+ return 0;
+ }
+
+ @Override
public boolean isPenalized() {
return false;
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-provenance-repository-nar/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-provenance-repository-nar/pom.xml b/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-provenance-repository-nar/pom.xml
index ee397e2..20c0f77 100644
--- a/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-provenance-repository-nar/pom.xml
+++ b/minifi-nar-bundles/minifi-provenance-repository-bundle/minifi-provenance-repository-nar/pom.xml
@@ -25,14 +25,12 @@ limitations under the License.
<groupId>org.apache.nifi.minifi</groupId>
<artifactId>minifi-provenance-repository-nar</artifactId>
- <version>0.1.0-SNAPSHOT</version>
<packaging>nar</packaging>
<dependencies>
<dependency>
<groupId>org.apache.nifi.minifi</groupId>
<artifactId>minifi-persistent-provenance-repository</artifactId>
- <version>0.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-ssl-context-service-nar/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-ssl-context-service-nar/pom.xml b/minifi-nar-bundles/minifi-ssl-context-service-nar/pom.xml
new file mode 100644
index 0000000..35f27fa
--- /dev/null
+++ b/minifi-nar-bundles/minifi-ssl-context-service-nar/pom.xml
@@ -0,0 +1,61 @@
+<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.minifi</groupId>
+ <artifactId>minifi-nar-bundles</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-ssl-context-service-nar</artifactId>
+ <packaging>nar</packaging>
+ <properties>
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ <source.skip>true</source.skip>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-standard-services-api-nar</artifactId>
+ <type>nar</type>
+ <exclusions>
+ <exclusion>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15on</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpg-jdk15on</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-ssl-context-service</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15on</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpg-jdk15on</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+</project>
[4/6] nifi-minifi git commit: MINIFI-115 Bump NiFi versions to 1.0.0
Posted by jp...@apache.org.
MINIFI-115 Bump NiFi versions to 1.0.0
MINIFI-115 Remove provenance reporting bundle to use the NiFi equivalent.
Add dependency on nifi-framework-api and change AuthorityProvider to Authorizer.
work in progress
removing references to provenance reporting bundle. this should default to the bundle introduced in NiFi
Adjust provenance repository to new API.
Adjusting ConfigMain to use ComponentDTO.
Adjusting handling of remote authorization failures for RPGs and updating status code.
Completed all code changes to support libraries. Now issues at runtime with needed dependencies.
Provide nifi-framework-api to provide FlowFilePrioritizer interface.
Adjusting classloading and adjusting Persistent Prov repo.
Include httpclient as it is needed for Site to Site.
Creating a configexception to allow removal of ZooKeeper dependency.
Excluding lucene-analyzers-common.
Removing reliance on LuceneUtil.
Including lucene core needed for utility methods. Removing extraneous logging message.
Adding site-to-site-reporting nar to assembly.
Removing unused imports causing contrib-check to fail.
Adding comment and SuppressWarning for unused QuorumPeerConfig
Removing remaining references to authorization issues in docs and associated status classes.
Revert "MINIFI-115 Remove provenance reporting bundle to use the NiFi equivalent."
This reverts commit a2ffa018d4b8c80d35f8cf18532843d63e19a7a9.
Reverting back to including a separate minifi-provenance-reporting nar that makes use of the nifi-site-to-site reporting jar. Marking dependencies provided that are provided by lib.
Creating custom bundles to reuse libs already provided at the root instead of duplicates with each NAR.
Removing duplicated libraries and reusing bootstrap libraries where possible/compatible.
Migrating shared libraries out of bootstrap into lib.
Adjusting dependencies.
Converting NiFiComponentDTO to ComponentDTO as part of 1.0 API change.
Adjusting dependency management and assembly inclusions.
Removing extraneous provenance reporting files as we are using the
standard NiFi reporter.
Signed-off-by: Joseph Percivall <JP...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi/commit/52888507
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi/tree/52888507
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi/diff/52888507
Branch: refs/heads/master
Commit: 52888507f8ace399e6cfd0872a39f7b677cbfb9a
Parents: c999f07
Author: Aldrin Piri <al...@apache.org>
Authored: Wed Oct 5 16:47:14 2016 -0400
Committer: Joseph Percivall <JP...@apache.org>
Committed: Sun Nov 27 12:53:32 2016 -0500
----------------------------------------------------------------------
minifi-api/pom.xml | 4 +
minifi-assembly/pom.xml | 46 +-
.../src/main/assembly/dependencies.xml | 26 +-
.../status/rpg/RemoteProcessGroupHealth.java | 12 -
.../rpg/RemoteProcessGroupStatusBean.java | 15 +-
.../status/util/StatusReportPopulator.java | 6 +-
.../minifi/commons/status/TestStatusReport.java | 4 +-
.../src/main/markdown/System_Admin_Guide.md | 5 +-
.../minifi-framework-nar/pom.xml | 60 +-
.../minifi-framework-core/pom.xml | 42 ++
.../org/apache/nifi/minifi/MiNiFiServer.java | 56 +-
.../nifi/minifi/status/StatusRequestParser.java | 5 -
.../server/quorum/QuorumPeerConfig.java | 41 ++
.../minifi/status/TestStatusConfigReporter.java | 36 +-
.../minifi-framework/minifi-nar-utils/pom.xml | 7 +-
.../org/apache/nifi/nar/ExtensionManager.java | 31 +-
.../org/apache/nifi/nar/NarClassLoaders.java | 131 ++--
.../java/org/apache/nifi/nar/NarCloseable.java | 51 +-
.../nifi/nar/NarThreadContextClassLoader.java | 39 +-
.../org/apache/nifi/nar/NarUnpackerTest.java | 56 +-
.../src/main/resources/bin/minifi.sh | 11 +-
.../java/org/apache/nifi/minifi/MiNiFi.java | 8 +-
.../minifi-framework-bundle/pom.xml | 1 -
.../minifi-provenance-reporting-nar/pom.xml | 40 --
.../src/main/resources/META-INF/NOTICE | 15 -
.../minifi-provenance-reporting-task/pom.xml | 82 ---
.../reporting/ProvenanceReportingTask.java | 462 -------------
.../org.apache.nifi.reporting.ReportingTask | 16 -
.../reporting/TestProvenanceReportingTask.java | 186 ------
.../minifi-provenance-reporting-bundle/pom.xml | 46 --
.../MiNiFiPersistentProvenanceRepository.java | 123 ++--
....apache.nifi.provenance.ProvenanceRepository | 15 +
...estMiNiFiPersistentProvenanceRepository.java | 28 +-
.../org/apache/nifi/provenance/TestUtil.java | 15 +-
.../minifi-provenance-repository-nar/pom.xml | 2 -
.../minifi-ssl-context-service-nar/pom.xml | 61 ++
.../src/main/resources/META-INF/LICENSE | 337 ++++++++++
.../src/main/resources/META-INF/NOTICE | 196 ++++++
minifi-nar-bundles/minifi-standard-nar/pom.xml | 52 +-
.../minifi-standard-services-api-nar/pom.xml | 79 +++
.../src/main/resources/META-INF/LICENSE | 337 ++++++++++
.../src/main/resources/META-INF/NOTICE | 196 ++++++
minifi-nar-bundles/pom.xml | 3 +-
.../toolkit/configuration/ConfigMain.java | 8 +-
pom.xml | 652 ++++++++++++++++++-
45 files changed, 2471 insertions(+), 1173 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-api/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-api/pom.xml b/minifi-api/pom.xml
index 111144b..98a78af 100644
--- a/minifi-api/pom.xml
+++ b/minifi-api/pom.xml
@@ -30,5 +30,9 @@ limitations under the License.
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-framework-api</artifactId>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-assembly/pom.xml b/minifi-assembly/pom.xml
index ac5ed31..89ed9e4 100644
--- a/minifi-assembly/pom.xml
+++ b/minifi-assembly/pom.xml
@@ -113,12 +113,11 @@ limitations under the License.
</dependency>
<dependency>
<groupId>org.apache.nifi.minifi</groupId>
- <artifactId>minifi-framework-nar</artifactId>
- <type>nar</type>
+ <artifactId>minifi-framework-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.nifi.minifi</groupId>
- <artifactId>minifi-provenance-reporting-nar</artifactId>
+ <artifactId>minifi-framework-nar</artifactId>
<type>nar</type>
</dependency>
<dependency>
@@ -150,16 +149,24 @@ limitations under the License.
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
- <artifactId>nifi-framework-core-api</artifactId>
+ <artifactId>nifi-ssl-context-service-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
- <artifactId>nifi-standard-services-api-nar</artifactId>
- <type>nar</type>
+ <artifactId>nifi-framework-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
- <artifactId>nifi-ssl-context-service-nar</artifactId>
+ <artifactId>nifi-framework-core-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-standard-services-api-nar</artifactId>
+ <type>nar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-ssl-context-service-nar</artifactId>
<type>nar</type>
</dependency>
<dependency>
@@ -177,23 +184,40 @@ limitations under the License.
<!-- Provided in NiFi so must include here too -->
<dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15on</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlet</artifactId>
+ <artifactId>jetty-util</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
+ <artifactId>jetty-servlet</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlets</artifactId>
+ <artifactId>jetty-webapp</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-jsp</artifactId>
+ <artifactId>jetty-servlets</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-assembly/src/main/assembly/dependencies.xml
----------------------------------------------------------------------
diff --git a/minifi-assembly/src/main/assembly/dependencies.xml b/minifi-assembly/src/main/assembly/dependencies.xml
index a774e49..d77b098 100644
--- a/minifi-assembly/src/main/assembly/dependencies.xml
+++ b/minifi-assembly/src/main/assembly/dependencies.xml
@@ -33,24 +33,24 @@
<fileMode>0660</fileMode>
<useTransitiveFiltering>true</useTransitiveFiltering>
<excludes>
- <exclude>minifi-bootstrap</exclude>
+ <exclude>minifi-bootstrap</exclude>
<exclude>minifi-resources</exclude>
<!-- Filter items introduced via transitive dependencies that are provided in associated NARs -->
+ <exclude>zookeeper</exclude>
<exclude>spring-aop</exclude>
<exclude>spring-context</exclude>
- <exclude>spring-security-core</exclude>
<exclude>spring-beans</exclude>
<exclude>swagger-annotations</exclude>
- <exclude>slf4j-log4j12</exclude>
<exclude>aspectjweaver</exclude>
<exclude>h2</exclude>
- <exclude>netty</exclude>
<exclude>jaxb-impl</exclude>
- <exclude>httpclient</exclude>
<exclude>mail</exclude>
<exclude>log4j</exclude>
+ <exclude>lucene-analyzers-common</exclude>
<exclude>lucene-queryparser</exclude>
<exclude>commons-net</exclude>
+ <exclude>spring-context</exclude>
+ <exclude>spring-security-core</exclude>
</excludes>
</dependencySet>
@@ -63,18 +63,10 @@
<fileMode>0660</fileMode>
<useTransitiveFiltering>true</useTransitiveFiltering>
<includes>
- <include>minifi-bootstrap</include>
- <include>slf4j-api</include>
- <include>logback-classic</include>
- <include>nifi-api</include>
+ <include>minifi-bootstrap</include>
+ <include>minifi-utils</include>
<include>nifi-utils</include>
- <include>jetty-server</include>
- <include>jetty-util</include>
- <include>jetty-http</include>
- <include>jetty-io</include>
- <include>javax.servlet-api</include>
<include>commons-io</include>
- <include>okhttp</include>
</includes>
</dependencySet>
@@ -87,7 +79,7 @@
<fileMode>0664</fileMode>
<useTransitiveFiltering>true</useTransitiveFiltering>
<includes>
- <include>minifi-resources</include>
+ <include>minifi-resources</include>
</includes>
<unpack>true</unpack>
<unpackOptions>
@@ -113,7 +105,7 @@
<fileMode>0770</fileMode>
<useTransitiveFiltering>true</useTransitiveFiltering>
<includes>
- <include>minifi-resources</include>
+ <include>minifi-resources</include>
</includes>
<unpack>true</unpack>
<unpackOptions>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/rpg/RemoteProcessGroupHealth.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/rpg/RemoteProcessGroupHealth.java b/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/rpg/RemoteProcessGroupHealth.java
index 0994b53..0853e92 100644
--- a/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/rpg/RemoteProcessGroupHealth.java
+++ b/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/rpg/RemoteProcessGroupHealth.java
@@ -20,7 +20,6 @@ package org.apache.nifi.minifi.commons.status.rpg;
public class RemoteProcessGroupHealth implements java.io.Serializable {
private String transmissionStatus;
private boolean hasBulletins;
- private boolean hasAuthorizationIssues;
private int activePortCount;
private int inactivePortCount;
@@ -43,14 +42,6 @@ public class RemoteProcessGroupHealth implements java.io.Serializable {
this.hasBulletins = hasBulletins;
}
- public boolean isHasAuthorizationIssues() {
- return hasAuthorizationIssues;
- }
-
- public void setHasAuthorizationIssues(boolean hasAuthorizationIssues) {
- this.hasAuthorizationIssues = hasAuthorizationIssues;
- }
-
public int getActivePortCount() {
return activePortCount;
}
@@ -75,7 +66,6 @@ public class RemoteProcessGroupHealth implements java.io.Serializable {
RemoteProcessGroupHealth that = (RemoteProcessGroupHealth) o;
if (isHasBulletins() != that.isHasBulletins()) return false;
- if (isHasAuthorizationIssues() != that.isHasAuthorizationIssues()) return false;
if (getActivePortCount() != that.getActivePortCount()) return false;
if (getInactivePortCount() != that.getInactivePortCount()) return false;
return getTransmissionStatus() != null ? getTransmissionStatus().equals(that.getTransmissionStatus()) : that.getTransmissionStatus() == null;
@@ -86,7 +76,6 @@ public class RemoteProcessGroupHealth implements java.io.Serializable {
public int hashCode() {
int result = getTransmissionStatus() != null ? getTransmissionStatus().hashCode() : 0;
result = 31 * result + (isHasBulletins() ? 1 : 0);
- result = 31 * result + (isHasAuthorizationIssues() ? 1 : 0);
result = 31 * result + getActivePortCount();
result = 31 * result + getInactivePortCount();
return result;
@@ -97,7 +86,6 @@ public class RemoteProcessGroupHealth implements java.io.Serializable {
return "{" +
"transmissionStatus='" + transmissionStatus + '\'' +
", hasBulletins=" + hasBulletins +
- ", hasAuthorizationIssues=" + hasAuthorizationIssues +
", activePortCount=" + activePortCount +
", inactivePortCount=" + inactivePortCount +
'}';
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/rpg/RemoteProcessGroupStatusBean.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/rpg/RemoteProcessGroupStatusBean.java b/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/rpg/RemoteProcessGroupStatusBean.java
index b4ee5ce..3acedc0 100644
--- a/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/rpg/RemoteProcessGroupStatusBean.java
+++ b/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/rpg/RemoteProcessGroupStatusBean.java
@@ -19,13 +19,13 @@ package org.apache.nifi.minifi.commons.status.rpg;
import org.apache.nifi.minifi.commons.status.common.BulletinStatus;
+import java.io.Serializable;
import java.util.List;
-public class RemoteProcessGroupStatusBean implements java.io.Serializable {
+public class RemoteProcessGroupStatusBean implements Serializable {
private String name;
private RemoteProcessGroupHealth remoteProcessGroupHealth;
private List<BulletinStatus> bulletinList;
- private List<String> authorizationIssues;
private List<InputPortStatus> inputPortStatusList;
private RemoteProcessGroupStats remoteProcessGroupStats;
@@ -56,14 +56,6 @@ public class RemoteProcessGroupStatusBean implements java.io.Serializable {
this.bulletinList = bulletinList;
}
- public List<String> getAuthorizationIssues() {
- return authorizationIssues;
- }
-
- public void setAuthorizationIssues(List<String> authorizationIssues) {
- this.authorizationIssues = authorizationIssues;
- }
-
public List<InputPortStatus> getInputPortStatusList() {
return inputPortStatusList;
}
@@ -90,7 +82,6 @@ public class RemoteProcessGroupStatusBean implements java.io.Serializable {
if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) return false;
if (getRemoteProcessGroupHealth() != null ? !getRemoteProcessGroupHealth().equals(that.getRemoteProcessGroupHealth()) : that.getRemoteProcessGroupHealth() != null) return false;
if (getBulletinList() != null ? !getBulletinList().equals(that.getBulletinList()) : that.getBulletinList() != null) return false;
- if (getAuthorizationIssues() != null ? !getAuthorizationIssues().equals(that.getAuthorizationIssues()) : that.getAuthorizationIssues() != null) return false;
if (getInputPortStatusList() != null ? !getInputPortStatusList().equals(that.getInputPortStatusList()) : that.getInputPortStatusList() != null) return false;
return getRemoteProcessGroupStats() != null ? getRemoteProcessGroupStats().equals(that.getRemoteProcessGroupStats()) : that.getRemoteProcessGroupStats() == null;
@@ -101,7 +92,6 @@ public class RemoteProcessGroupStatusBean implements java.io.Serializable {
int result = getName() != null ? getName().hashCode() : 0;
result = 31 * result + (getRemoteProcessGroupHealth() != null ? getRemoteProcessGroupHealth().hashCode() : 0);
result = 31 * result + (getBulletinList() != null ? getBulletinList().hashCode() : 0);
- result = 31 * result + (getAuthorizationIssues() != null ? getAuthorizationIssues().hashCode() : 0);
result = 31 * result + (getInputPortStatusList() != null ? getInputPortStatusList().hashCode() : 0);
result = 31 * result + (getRemoteProcessGroupStats() != null ? getRemoteProcessGroupStats().hashCode() : 0);
return result;
@@ -113,7 +103,6 @@ public class RemoteProcessGroupStatusBean implements java.io.Serializable {
"name='" + name + '\'' +
", remoteProcessGroupHealth=" + remoteProcessGroupHealth +
", bulletinList=" + bulletinList +
- ", authorizationIssues=" + authorizationIssues +
", inputPortStatusList=" + inputPortStatusList +
", remoteProcessGroupStats=" + remoteProcessGroupStats +
'}';
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/util/StatusReportPopulator.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/util/StatusReportPopulator.java b/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/util/StatusReportPopulator.java
index ff3d2cc..8bdee99 100644
--- a/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/util/StatusReportPopulator.java
+++ b/minifi-commons/minifi-utils/src/main/java/org/apache/nifi/minifi/commons/status/util/StatusReportPopulator.java
@@ -134,19 +134,15 @@ public class StatusReportPopulator {
flowStatusReport.setConnectionStatusList(Collections.singletonList(expectedConnectionStatus));
}
- public static void addExpectedRemoteProcessGroupStatus(FlowStatusReport flowStatusReport, boolean addHealth, boolean addAuthorizationIssues, boolean addInputPort,
+ public static void addExpectedRemoteProcessGroupStatus(FlowStatusReport flowStatusReport, boolean addHealth, boolean addInputPort,
boolean addStats, boolean addBulletins, boolean populateBulletins) {
RemoteProcessGroupStatusBean expectedRemoteProcessGroupStatus = new RemoteProcessGroupStatusBean();
expectedRemoteProcessGroupStatus.setName("rpg1");
- if (addAuthorizationIssues) {
- expectedRemoteProcessGroupStatus.setAuthorizationIssues(Collections.singletonList("auth issue"));
- }
if (addHealth) {
RemoteProcessGroupHealth remoteProcessGroupHealth = new RemoteProcessGroupHealth();
remoteProcessGroupHealth.setTransmissionStatus("Transmitting");
remoteProcessGroupHealth.setHasBulletins(populateBulletins);
- remoteProcessGroupHealth.setHasAuthorizationIssues(addAuthorizationIssues);
remoteProcessGroupHealth.setActivePortCount(1);
remoteProcessGroupHealth.setInactivePortCount(2);
expectedRemoteProcessGroupStatus.setRemoteProcessGroupHealth(remoteProcessGroupHealth);
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-commons/minifi-utils/src/test/java/org/apache/nifi/minifi/commons/status/TestStatusReport.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-utils/src/test/java/org/apache/nifi/minifi/commons/status/TestStatusReport.java b/minifi-commons/minifi-utils/src/test/java/org/apache/nifi/minifi/commons/status/TestStatusReport.java
index fc697e3..cae5b3a 100644
--- a/minifi-commons/minifi-utils/src/test/java/org/apache/nifi/minifi/commons/status/TestStatusReport.java
+++ b/minifi-commons/minifi-utils/src/test/java/org/apache/nifi/minifi/commons/status/TestStatusReport.java
@@ -47,7 +47,7 @@ public class TestStatusReport {
addReportingTaskStatus(original, true, true, true, true);
addConnectionStatus(original, true, true);
addProcessorStatus(original, true, true, true, true, true);
- addExpectedRemoteProcessGroupStatus(original, true, true, true, true, true, true);
+ addExpectedRemoteProcessGroupStatus(original, true, true, true, true, true);
byte[] byteArrayCopy = serialize(original);
FlowStatusReport copy = unSerialize(byteArrayCopy, FlowStatusReport.class);
@@ -63,7 +63,7 @@ public class TestStatusReport {
addInstanceStatus(original, true, true, true, true);
addSystemDiagnosticStatus(original, true, true, true, true, true);
addProcessorStatus(original, true, true, true, true, true);
- addExpectedRemoteProcessGroupStatus(original, true, true, true, true, true, true);
+ addExpectedRemoteProcessGroupStatus(original, true, true, true, true, true);
byte[] byteArrayCopy = serialize(original);
FlowStatusReport copy = unSerialize(byteArrayCopy, FlowStatusReport.class);
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-docs/src/main/markdown/System_Admin_Guide.md
----------------------------------------------------------------------
diff --git a/minifi-docs/src/main/markdown/System_Admin_Guide.md b/minifi-docs/src/main/markdown/System_Admin_Guide.md
index eaa8697..361e601 100644
--- a/minifi-docs/src/main/markdown/System_Admin_Guide.md
+++ b/minifi-docs/src/main/markdown/System_Admin_Guide.md
@@ -229,14 +229,13 @@ Option | Description
------ | -----------
health | The connections's queued bytes and queued FlowFile count.
bulletins | A list of all the current bulletins (if there are any).
-authorizationIssues | A list of all the current authorization issues (if there are any).
inputPorts | A list of every input port for this RPG and their status. Their status includes it's name, whether the target exit and whether it's currently running.
stats | The current stats of the RPG. This includes the active threads, sent content size and count.
-An example query to get the health, bulletins, authorization issues, input ports and stats of all the RPGS is below.
+An example query to get the health, bulletins, input ports and stats of all the RPGS is below.
```
-minifi.sh flowStatus remoteprocessinggroup:all:health,bulletins,authorizationIssues,inputports,stats
+minifi.sh flowStatus remoteprocessinggroup:all:health,bulletins,inputports,stats
```
### Controller Services
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework-nar/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework-nar/pom.xml b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework-nar/pom.xml
index b460043..3815952 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework-nar/pom.xml
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework-nar/pom.xml
@@ -25,7 +25,6 @@ limitations under the License.
<groupId>org.apache.nifi.minifi</groupId>
<artifactId>minifi-framework-nar</artifactId>
- <version>0.1.0-SNAPSHOT</version>
<packaging>nar</packaging>
<description>MiNiFi: Framework NAR</description>
@@ -34,51 +33,70 @@ limitations under the License.
<source.skip>true</source.skip>
</properties>
<dependencies>
- <!-- mark these nifi artifacts as provided since it is included in the lib -->
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-framework-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- NiFi Framework level dependencies -->
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-api</artifactId>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-runtime</artifactId>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-nar-utils</artifactId>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-properties</artifactId>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
- <groupId>org.apache.nifi.minifi</groupId>
- <artifactId>minifi-framework-core</artifactId>
- <scope>provided</scope>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-security</artifactId>
+ <scope>compile</scope>
+ <version>1.0.0</version>
</dependency>
<dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-administration</artifactId>
- <scope>provided</scope>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.nifi.minifi</groupId>
- <artifactId>minifi-api</artifactId>
- <scope>provided</scope>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-framework-core</artifactId>
- <scope>provided</scope>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-webapp</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-framework-core-api</artifactId>
- <scope>provided</scope>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlets</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib-nodep</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
</dependencies>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/pom.xml b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/pom.xml
index 1900ca7..d89f1c5 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/pom.xml
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/pom.xml
@@ -27,6 +27,48 @@ limitations under the License.
<dependencies>
<dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <version>9.3.9.v20160517</version>
+
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ <version>9.3.9.v20160517</version>
+
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-webapp</artifactId>
+ <version>9.3.9.v20160517</version>
+
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlets</artifactId>
+ <version>9.3.9.v20160517</version>
+
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-annotations</artifactId>
+ <version>9.3.9.v20160517</version>
+
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>apache-jsp</artifactId>
+ <version>9.3.9.v20160517</version>
+
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>apache-jstl</artifactId>
+ <version>9.3.9.v20160517</version>
+
+ </dependency>
+ <dependency>
<groupId>org.apache.nifi.minifi</groupId>
<artifactId>minifi-nar-utils</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/nifi/minifi/MiNiFiServer.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/nifi/minifi/MiNiFiServer.java b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/nifi/minifi/MiNiFiServer.java
index ba22826..ad82039 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/nifi/minifi/MiNiFiServer.java
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/nifi/minifi/MiNiFiServer.java
@@ -17,18 +17,28 @@
package org.apache.nifi.minifi;
import org.apache.nifi.admin.service.AuditService;
-import org.apache.nifi.admin.service.UserService;
import org.apache.nifi.admin.service.impl.StandardAuditService;
-import org.apache.nifi.admin.service.impl.StandardUserService;
+import org.apache.nifi.authorization.AuthorizationRequest;
+import org.apache.nifi.authorization.AuthorizationResult;
+import org.apache.nifi.authorization.Authorizer;
+import org.apache.nifi.authorization.AuthorizerConfigurationContext;
+import org.apache.nifi.authorization.AuthorizerInitializationContext;
+import org.apache.nifi.authorization.exception.AuthorizationAccessException;
+import org.apache.nifi.authorization.exception.AuthorizerCreationException;
+import org.apache.nifi.authorization.exception.AuthorizerDestructionException;
import org.apache.nifi.controller.FlowController;
import org.apache.nifi.controller.StandardFlowService;
import org.apache.nifi.controller.repository.FlowFileEventRepository;
import org.apache.nifi.controller.repository.RingBufferEventRepository;
import org.apache.nifi.encrypt.StringEncryptor;
+import org.apache.nifi.events.VolatileBulletinRepository;
import org.apache.nifi.minifi.commons.status.FlowStatusReport;
import org.apache.nifi.minifi.status.StatusConfigReporter;
import org.apache.nifi.minifi.status.StatusRequestException;
+import org.apache.nifi.registry.VariableRegistry;
+import org.apache.nifi.reporting.BulletinRepository;
import org.apache.nifi.services.FlowService;
+import org.apache.nifi.util.FileBasedVariableRegistry;
import org.apache.nifi.util.NiFiProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -40,6 +50,7 @@ public class MiNiFiServer {
private static final Logger logger = LoggerFactory.getLogger(MiNiFiServer.class);
private final NiFiProperties props;
private FlowService flowService;
+ private FlowController flowController;
/**
*
@@ -55,20 +66,47 @@ public class MiNiFiServer {
FlowFileEventRepository flowFileEventRepository = new RingBufferEventRepository(5);
AuditService auditService = new StandardAuditService();
- UserService userService = new StandardUserService();
- StringEncryptor encryptor = StringEncryptor.createEncryptor();
+ Authorizer authorizer = new Authorizer() {
+ @Override
+ public AuthorizationResult authorize(AuthorizationRequest request) throws AuthorizationAccessException {
+ return AuthorizationResult.approved();
+ }
+
+ @Override
+ public void initialize(AuthorizerInitializationContext initializationContext) throws AuthorizerCreationException {
+ // do nothing
+ }
+
+ @Override
+ public void onConfigured(AuthorizerConfigurationContext configurationContext) throws AuthorizerCreationException {
+ // do nothing
+ }
+
+ @Override
+ public void preDestruction() throws AuthorizerDestructionException {
+ // do nothing
+ }
+ };
+ StringEncryptor encryptor = StringEncryptor.createEncryptor(props);
+ VariableRegistry variableRegistry = new FileBasedVariableRegistry(props.getVariableRegistryPropertiesPaths());
+ BulletinRepository bulletinRepository = new VolatileBulletinRepository();
FlowController flowController = FlowController.createStandaloneInstance(
flowFileEventRepository,
props,
- userService,
+ authorizer,
auditService,
- encryptor);
+ encryptor,
+ bulletinRepository,
+ variableRegistry
+ );
flowService = StandardFlowService.createStandaloneInstance(
flowController,
props,
- encryptor);
+ encryptor,
+ null, // revision manager
+ authorizer);
// start and load the flow
flowService.start();
@@ -76,6 +114,8 @@ public class MiNiFiServer {
flowController.onFlowInitialized(true);
flowController.getGroup(flowController.getRootGroupId()).startProcessing();
+ this.flowController = flowController;
+
logger.info("Flow loaded successfully.");
} catch (Exception e) {
// ensure the flow service is terminated
@@ -107,6 +147,6 @@ public class MiNiFiServer {
}
public FlowStatusReport getStatusReport(String requestString) throws StatusRequestException {
- return StatusConfigReporter.getStatus(flowService.getController(), requestString, logger);
+ return StatusConfigReporter.getStatus(this.flowController, requestString, logger);
}
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/nifi/minifi/status/StatusRequestParser.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/nifi/minifi/status/StatusRequestParser.java b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/nifi/minifi/status/StatusRequestParser.java
index 061120c..74d3b1f 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/nifi/minifi/status/StatusRequestParser.java
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/nifi/minifi/status/StatusRequestParser.java
@@ -122,7 +122,6 @@ public final class StatusRequestParser {
new BulletinQuery.Builder()
.sourceIdMatches(inputRemoteProcessGroupStatus.getId())
.build());
- List<String> authorizationIssues = inputRemoteProcessGroupStatus.getAuthorizationIssues();
for (String statusType : statusSplits) {
switch (statusType.toLowerCase().trim()) {
@@ -130,7 +129,6 @@ public final class StatusRequestParser {
RemoteProcessGroupHealth remoteProcessGroupHealth = new RemoteProcessGroupHealth();
remoteProcessGroupHealth.setTransmissionStatus(inputRemoteProcessGroupStatus.getTransmissionStatus().name());
- remoteProcessGroupHealth.setHasAuthorizationIssues(!authorizationIssues.isEmpty());
remoteProcessGroupHealth.setActivePortCount(inputRemoteProcessGroupStatus.getActiveRemotePortCount());
remoteProcessGroupHealth.setInactivePortCount(inputRemoteProcessGroupStatus.getInactiveRemotePortCount());
remoteProcessGroupHealth.setHasBulletins(!bulletinList.isEmpty());
@@ -140,9 +138,6 @@ public final class StatusRequestParser {
case "bulletins":
remoteProcessGroupStatusBean.setBulletinList(transformBulletins(bulletinList));
break;
- case "authorizationissues":
- remoteProcessGroupStatusBean.setAuthorizationIssues(authorizationIssues);
- break;
case "inputports":
List<InputPortStatus> inputPortStatusList = new LinkedList<>();
RemoteProcessGroup remoteProcessGroup = flowController.getGroup(rootGroupId).getRemoteProcessGroup(inputRemoteProcessGroupStatus.getId());
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
new file mode 100644
index 0000000..294b66f
--- /dev/null
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
@@ -0,0 +1,41 @@
+/**
+ * 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.zookeeper.server.quorum;
+
+
+/**
+ * This class is provided such that the ConfigException can be provided to the FlowController currently reused from NiFi.
+ * By creating the class within the MiNiFi codebase it is possible to remove the dependency on ZooKeeper.
+ *
+ * This totality of this class is eligible for removal when a FlowController explicitly for MiNiFi is introduced.
+ */
+@SuppressWarnings(value = "unused")
+public class QuorumPeerConfig {
+
+ @SuppressWarnings("serial")
+ public static class ConfigException extends Exception {
+ public ConfigException(String msg) {
+ super(msg);
+ }
+ public ConfigException(String msg, Exception e) {
+ super(msg, e);
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/test/java/org/apache/nifi/minifi/status/TestStatusConfigReporter.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/test/java/org/apache/nifi/minifi/status/TestStatusConfigReporter.java b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/test/java/org/apache/nifi/minifi/status/TestStatusConfigReporter.java
index 027d685..37483af 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/test/java/org/apache/nifi/minifi/status/TestStatusConfigReporter.java
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/test/java/org/apache/nifi/minifi/status/TestStatusConfigReporter.java
@@ -435,7 +435,7 @@ public class TestStatusConfigReporter {
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
- addExpectedRemoteProcessGroupStatus(expected, true, false, false, false, false, false);
+ addExpectedRemoteProcessGroupStatus(expected, true, false, false, false, false);
assertEquals(expected, actual);
}
@@ -450,22 +450,7 @@ public class TestStatusConfigReporter {
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
- addExpectedRemoteProcessGroupStatus(expected, false, false, false, false, true, true);
-
- assertEquals(expected, actual);
- }
-
- @Test
- public void remoteProcessGroupStatusAuthorizationIssues() throws Exception {
- populateRemoteProcessGroup(false, true);
-
- String statusRequest = "remoteProcessGroup:all:authorizationissues";
- FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(TestStatusConfigReporter.class));
-
- FlowStatusReport expected = new FlowStatusReport();
- expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
-
- addExpectedRemoteProcessGroupStatus(expected, false, true, false, false, false, false);
+ addExpectedRemoteProcessGroupStatus(expected, false, false, false, true, true);
assertEquals(expected, actual);
}
@@ -480,7 +465,7 @@ public class TestStatusConfigReporter {
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
- addExpectedRemoteProcessGroupStatus(expected, false, false, true, false, false, false);
+ addExpectedRemoteProcessGroupStatus(expected, false, true, false, false, false);
assertEquals(expected, actual);
}
@@ -495,7 +480,7 @@ public class TestStatusConfigReporter {
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
- addExpectedRemoteProcessGroupStatus(expected, false, false, false, true, false, false);
+ addExpectedRemoteProcessGroupStatus(expected, false, false, true, false, false);
assertEquals(expected, actual);
}
@@ -505,13 +490,13 @@ public class TestStatusConfigReporter {
public void remoteProcessGroupStatusAll() throws Exception {
populateRemoteProcessGroup(true, true);
- String statusRequest = "remoteProcessGroup:all:health, authorizationissues, bulletins, inputPorts, stats";
+ String statusRequest = "remoteProcessGroup:all:health, bulletins, inputPorts, stats";
FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(TestStatusConfigReporter.class));
FlowStatusReport expected = new FlowStatusReport();
expected.setErrorsGeneratingReport(Collections.EMPTY_LIST);
- addExpectedRemoteProcessGroupStatus(expected, true, true, true, true, true, true);
+ addExpectedRemoteProcessGroupStatus(expected, true, true, true, true, true);
assertEquals(expected, actual);
}
@@ -530,7 +515,7 @@ public class TestStatusConfigReporter {
String statusRequest = "controllerServices:bulletins,health; processor:all:health,stats,bulletins; instance:bulletins,health,stats ; systemDiagnostics:garbagecollection, heap, " +
"processorstats, contentrepositoryusage, flowfilerepositoryusage; connection:all:health,stats; provenanceReporting:health,bulletins; remoteProcessGroup:all:health, " +
- "authorizationissues, bulletins, inputPorts, stats";
+ "bulletins, inputPorts, stats";
FlowStatusReport actual = StatusConfigReporter.getStatus(mockFlowController, statusRequest, LoggerFactory.getLogger(TestStatusConfigReporter.class));
@@ -543,7 +528,7 @@ public class TestStatusConfigReporter {
addReportingTaskStatus(expected, true, true, true, false);
addConnectionStatus(expected, true, true);
addProcessorStatus(expected, true, true, true, true, false);
- addExpectedRemoteProcessGroupStatus(expected, true, true, true, true, true, false);
+ addExpectedRemoteProcessGroupStatus(expected, true, true, true, true, false);
assertEquals(expected, actual);
}
@@ -714,11 +699,6 @@ public class TestStatusConfigReporter {
RemoteProcessGroupStatus remoteProcessGroupStatus = new RemoteProcessGroupStatus();
addRemoteProcessGroupStatus(remoteProcessGroupStatus);
- if (addAuthIssues) {
- remoteProcessGroupStatus.setAuthorizationIssues(Collections.singletonList("auth issue"));
- } else {
- remoteProcessGroupStatus.setAuthorizationIssues(Collections.EMPTY_LIST);
- }
if (addBulletins) {
addBulletins("Bulletin message", remoteProcessGroupStatus.getId());
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/pom.xml b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/pom.xml
index ad9cf8d..50fdeb5 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/pom.xml
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/pom.xml
@@ -15,7 +15,8 @@ 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">
+<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">
<parent>
<artifactId>minifi-framework</artifactId>
<groupId>org.apache.nifi.minifi</groupId>
@@ -35,6 +36,10 @@ limitations under the License.
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-framework-api</artifactId>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/ExtensionManager.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/ExtensionManager.java b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/ExtensionManager.java
index db0b35e..787fb3c 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/ExtensionManager.java
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/ExtensionManager.java
@@ -24,7 +24,7 @@ import java.util.ServiceLoader;
import java.util.Set;
import org.apache.nifi.authentication.LoginIdentityProvider;
-import org.apache.nifi.authorization.AuthorityProvider;
+import org.apache.nifi.authorization.Authorizer;
import org.apache.nifi.controller.ControllerService;
import org.apache.nifi.controller.repository.ContentRepository;
import org.apache.nifi.controller.repository.FlowFileRepository;
@@ -32,7 +32,7 @@ import org.apache.nifi.controller.repository.FlowFileSwapManager;
import org.apache.nifi.controller.status.history.ComponentStatusRepository;
import org.apache.nifi.flowfile.FlowFilePrioritizer;
import org.apache.nifi.processor.Processor;
-import org.apache.nifi.provenance.ProvenanceEventRepository;
+import org.apache.nifi.provenance.ProvenanceRepository;
import org.apache.nifi.reporting.ReportingTask;
import org.slf4j.Logger;
@@ -54,23 +54,24 @@ public class ExtensionManager {
private static final Map<String, ClassLoader> extensionClassloaderLookup = new HashMap<>();
static {
- definitionMap.put(Processor.class, new HashSet<Class>());
- definitionMap.put(FlowFilePrioritizer.class, new HashSet<Class>());
- definitionMap.put(ReportingTask.class, new HashSet<Class>());
- definitionMap.put(ControllerService.class, new HashSet<Class>());
- definitionMap.put(AuthorityProvider.class, new HashSet<Class>());
- definitionMap.put(LoginIdentityProvider.class, new HashSet<Class>());
- definitionMap.put(ProvenanceEventRepository.class, new HashSet<Class>());
- definitionMap.put(ComponentStatusRepository.class, new HashSet<Class>());
- definitionMap.put(FlowFileRepository.class, new HashSet<Class>());
- definitionMap.put(FlowFileSwapManager.class, new HashSet<Class>());
- definitionMap.put(ContentRepository.class, new HashSet<Class>());
+ definitionMap.put(Processor.class, new HashSet<>());
+ definitionMap.put(FlowFilePrioritizer.class, new HashSet<>());
+ definitionMap.put(ReportingTask.class, new HashSet<>());
+ definitionMap.put(ControllerService.class, new HashSet<>());
+ definitionMap.put(Authorizer.class, new HashSet<>());
+ definitionMap.put(LoginIdentityProvider.class, new HashSet<>());
+ definitionMap.put(ProvenanceRepository.class, new HashSet<>());
+ definitionMap.put(ComponentStatusRepository.class, new HashSet<>());
+ definitionMap.put(FlowFileRepository.class, new HashSet<>());
+ definitionMap.put(FlowFileSwapManager.class, new HashSet<>());
+ definitionMap.put(ContentRepository.class, new HashSet<>());
}
/**
* Loads all FlowFileProcessor, FlowFileComparator, ReportingTask class types that can be found on the bootstrap classloader and by creating classloaders for all NARs found within the classpath.
+ * @param extensionLoaders the loaders to scan through in search of extensions
*/
- public static void discoverExtensions() {
+ public static void discoverExtensions(final Set<ClassLoader> extensionLoaders) {
final ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
// get the current context class loader
@@ -80,7 +81,7 @@ public class ExtensionManager {
loadExtensions(systemClassLoader);
// consider each nar class loader
- for (final ClassLoader ncl : NarClassLoaders.getExtensionClassLoaders()) {
+ for (final ClassLoader ncl : extensionLoaders) {
// Must set the context class loader to the nar classloader itself
// so that static initialization techniques that depend on the context class loader will work properly
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarClassLoaders.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarClassLoaders.java b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarClassLoaders.java
index a4525b0..9219721 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarClassLoaders.java
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarClassLoaders.java
@@ -28,12 +28,9 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
import org.apache.nifi.util.FileUtils;
-import org.apache.nifi.util.NiFiProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,28 +41,85 @@ public final class NarClassLoaders {
public static final String FRAMEWORK_NAR_ID = "minifi-framework-nar";
+ private static volatile NarClassLoaders ncl;
+ private volatile InitContext initContext;
private static final Logger logger = LoggerFactory.getLogger(NarClassLoaders.class);
- private static final AtomicBoolean initialized = new AtomicBoolean(false);
- private static final AtomicReference<Map<String, ClassLoader>> extensionClassLoaders = new AtomicReference<>();
- private static final AtomicReference<ClassLoader> frameworkClassLoader = new AtomicReference<>();
+
+ private final static class InitContext {
+
+ private final File frameworkWorkingDir;
+ private final File extensionWorkingDir;
+ private final ClassLoader frameworkClassLoader;
+ private final Map<String, ClassLoader> extensionClassLoaders;
+
+ private InitContext(
+ final File frameworkDir,
+ final File extensionDir,
+ final ClassLoader frameworkClassloader,
+ final Map<String, ClassLoader> extensionClassLoaders) {
+ this.frameworkWorkingDir = frameworkDir;
+ this.extensionWorkingDir = extensionDir;
+ this.frameworkClassLoader = frameworkClassloader;
+ this.extensionClassLoaders = extensionClassLoaders;
+ }
+ }
+
+ private NarClassLoaders() {
+ }
/**
- * Loads the extensions class loaders from the specified working directory.
- * Loading is only performed during the initial invocation of load.
- * Subsequent attempts will be ignored.
- *
+ * @return The singleton instance of the NarClassLoaders
+ */
+ public static NarClassLoaders getInstance() {
+ NarClassLoaders result = ncl;
+ if (result == null) {
+ synchronized (NarClassLoaders.class) {
+ result = ncl;
+ if (result == null) {
+ ncl = result = new NarClassLoaders();
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Initializes and loads the NarClassLoaders. This method must be called
+ * before the rest of the methods to access the classloaders are called and
+ * it can be safely called any number of times provided the same framework
+ * and extension working dirs are used.
*
- * @param properties properties object to initialize with
- * @throws java.io.IOException ioe
- * @throws java.lang.ClassNotFoundException cfne
- * @throws IllegalStateException if the class loaders have already been
- * created
+ * @param frameworkWorkingDir where to find framework artifacts
+ * @param extensionsWorkingDir where to find extension artifacts
+ * @throws java.io.IOException if any issue occurs while exploding nar working directories.
+ * @throws java.lang.ClassNotFoundException if unable to load class definition
+ * @throws IllegalStateException already initialized with a given pair of
+ * directories cannot reinitialize or use a different pair of directories.
*/
- public static void load(final NiFiProperties properties) throws IOException, ClassNotFoundException {
- if (initialized.getAndSet(true)) {
- throw new IllegalStateException("Extensions class loaders have already been loaded.");
+ public void init(final File frameworkWorkingDir, final File extensionsWorkingDir) throws IOException, ClassNotFoundException {
+ if (frameworkWorkingDir == null || extensionsWorkingDir == null) {
+ throw new NullPointerException("cannot have empty arguments");
}
+ InitContext ic = initContext;
+ if (ic == null) {
+ synchronized (this) {
+ ic = initContext;
+ if (ic == null) {
+ initContext = ic = load(frameworkWorkingDir, extensionsWorkingDir);
+ }
+ }
+ }
+ boolean matching = initContext.extensionWorkingDir.equals(extensionsWorkingDir)
+ && initContext.frameworkWorkingDir.equals(frameworkWorkingDir);
+ if (!matching) {
+ throw new IllegalStateException("Cannot reinitialize and extension/framework directories cannot change");
+ }
+ }
+ /**
+ * Should be called at most once.
+ */
+ private InitContext load(final File frameworkWorkingDir, final File extensionsWorkingDir) throws IOException, ClassNotFoundException {
// get the system classloader
final ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
@@ -76,19 +130,16 @@ public final class NarClassLoaders {
final Map<String, ClassLoader> extensionDirectoryClassLoaderLookup = new LinkedHashMap<>();
final Map<String, ClassLoader> narIdClassLoaderLookup = new HashMap<>();
- final File frameworkWorkingDirectory = properties.getFrameworkWorkingDirectory();
- final File extensionsWorkingDirectory = properties.getExtensionsWorkingDirectory();
-
// make sure the nar directory is there and accessible
- FileUtils.ensureDirectoryExistAndCanAccess(frameworkWorkingDirectory);
- FileUtils.ensureDirectoryExistAndCanAccess(extensionsWorkingDirectory);
+ FileUtils.ensureDirectoryExistAndCanAccess(frameworkWorkingDir);
+ FileUtils.ensureDirectoryExistAndCanAccess(extensionsWorkingDir);
final List<File> narWorkingDirContents = new ArrayList<>();
- final File[] frameworkWorkingDirContents = frameworkWorkingDirectory.listFiles();
+ final File[] frameworkWorkingDirContents = frameworkWorkingDir.listFiles();
if (frameworkWorkingDirContents != null) {
narWorkingDirContents.addAll(Arrays.asList(frameworkWorkingDirContents));
}
- final File[] extensionsWorkingDirContents = extensionsWorkingDirectory.listFiles();
+ final File[] extensionsWorkingDirContents = extensionsWorkingDir.listFiles();
if (extensionsWorkingDirContents != null) {
narWorkingDirContents.addAll(Arrays.asList(extensionsWorkingDirContents));
}
@@ -145,11 +196,7 @@ public final class NarClassLoaders {
}
}
- // set the framework class loader
- frameworkClassLoader.set(narIdClassLoaderLookup.get(FRAMEWORK_NAR_ID));
-
- // set the extensions class loader map
- extensionClassLoaders.set(new LinkedHashMap<>(extensionDirectoryClassLoaderLookup));
+ return new InitContext(frameworkWorkingDir, extensionsWorkingDir, narIdClassLoaderLookup.get(FRAMEWORK_NAR_ID), new LinkedHashMap<>(extensionDirectoryClassLoaderLookup));
}
/**
@@ -199,12 +246,12 @@ public final class NarClassLoaders {
* @throws IllegalStateException if the frame class loader has not been
* loaded
*/
- public static ClassLoader getFrameworkClassLoader() {
- if (!initialized.get()) {
+ public ClassLoader getFrameworkClassLoader() {
+ if (initContext == null) {
throw new IllegalStateException("Framework class loader has not been loaded.");
}
- return frameworkClassLoader.get();
+ return initContext.frameworkClassLoader;
}
/**
@@ -213,14 +260,17 @@ public final class NarClassLoaders {
* null when no class loader exists for the specified working directory
* @throws IllegalStateException if the class loaders have not been loaded
*/
- public static ClassLoader getExtensionClassLoader(final File extensionWorkingDirectory) {
- if (!initialized.get()) {
+ public ClassLoader getExtensionClassLoader(final File extensionWorkingDirectory) {
+ if (initContext == null) {
throw new IllegalStateException("Extensions class loaders have not been loaded.");
}
try {
- return extensionClassLoaders.get().get(extensionWorkingDirectory.getCanonicalPath());
+ return initContext.extensionClassLoaders.get(extensionWorkingDirectory.getCanonicalPath());
} catch (final IOException ioe) {
+ if(logger.isDebugEnabled()){
+ logger.debug("Unable to get extension classloader for working directory '{}'", extensionWorkingDirectory);
+ }
return null;
}
}
@@ -229,12 +279,12 @@ public final class NarClassLoaders {
* @return the extension class loaders
* @throws IllegalStateException if the class loaders have not been loaded
*/
- public static Set<ClassLoader> getExtensionClassLoaders() {
- if (!initialized.get()) {
+ public Set<ClassLoader> getExtensionClassLoaders() {
+ if (initContext == null) {
throw new IllegalStateException("Extensions class loaders have not been loaded.");
}
- return new LinkedHashSet<>(extensionClassLoaders.get().values());
+ return new LinkedHashSet<>(initContext.extensionClassLoaders.values());
}
private static class NarDetails {
@@ -267,7 +317,4 @@ public final class NarClassLoaders {
this.narWorkingDirectory = narWorkingDirectory;
}
}
-
- private NarClassLoaders() {
- }
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarCloseable.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarCloseable.java b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarCloseable.java
index c0b43dc..639d032 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarCloseable.java
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarCloseable.java
@@ -16,6 +16,9 @@
*/
package org.apache.nifi.nar;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.io.Closeable;
/**
@@ -23,10 +26,54 @@ import java.io.Closeable;
*/
public class NarCloseable implements Closeable {
- public static org.apache.nifi.nar.NarCloseable withNarLoader() {
+ private static final Logger logger = LoggerFactory.getLogger(NarCloseable.class);
+
+ public static NarCloseable withNarLoader() {
final ClassLoader current = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(NarThreadContextClassLoader.getInstance());
- return new org.apache.nifi.nar.NarCloseable(current);
+ return new NarCloseable(current);
+ }
+
+ /**
+ * Sets the current thread context class loader to the specific appropriate
+ * Nar class loader for the given configurable component. Restores to the
+ * previous classloader once complete. If the given class is not assignable
+ * from ConfigurableComponent then the NarThreadContextClassLoader is used.
+ *
+ * @param componentClass componentClass
+ * @return NarCloseable with current thread context classloader jailed to
+ * the nar of the component
+ */
+ public static NarCloseable withComponentNarLoader(final Class componentClass) {
+ final ClassLoader current = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(componentClass.getClassLoader());
+ return new NarCloseable(current);
+ }
+
+ /**
+ * Creates a Closeable object that can be used to to switch to current class
+ * loader to the framework class loader and will automatically set the
+ * ClassLoader back to the previous class loader when closed
+ *
+ * @return a NarCloseable
+ */
+ public static NarCloseable withFrameworkNar() {
+ final ClassLoader frameworkClassLoader;
+ try {
+ frameworkClassLoader = NarClassLoaders.getInstance().getFrameworkClassLoader();
+ } catch (final Exception e) {
+ // This should never happen in a running instance, but it will occur in unit tests
+ logger.error("Unable to access Framework ClassLoader due to " + e + ". Will continue without changing ClassLoaders.");
+ if (logger.isDebugEnabled()) {
+ logger.error("", e);
+ }
+
+ return new NarCloseable(null);
+ }
+
+ final ClassLoader current = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(frameworkClassLoader);
+ return new NarCloseable(current);
}
private final ClassLoader toSet;
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarThreadContextClassLoader.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarThreadContextClassLoader.java b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarThreadContextClassLoader.java
index c3b17fd..5c70927 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarThreadContextClassLoader.java
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/main/java/org/apache/nifi/nar/NarThreadContextClassLoader.java
@@ -17,7 +17,7 @@
package org.apache.nifi.nar;
import org.apache.nifi.authentication.LoginIdentityProvider;
-import org.apache.nifi.authorization.AuthorityProvider;
+import org.apache.nifi.authorization.Authorizer;
import org.apache.nifi.components.Validator;
import org.apache.nifi.controller.ControllerService;
import org.apache.nifi.controller.repository.ContentRepository;
@@ -29,11 +29,14 @@ import org.apache.nifi.processor.Processor;
import org.apache.nifi.processor.io.InputStreamCallback;
import org.apache.nifi.processor.io.OutputStreamCallback;
import org.apache.nifi.processor.io.StreamCallback;
-import org.apache.nifi.provenance.ProvenanceEventRepository;
+import org.apache.nifi.provenance.ProvenanceRepository;
import org.apache.nifi.reporting.ReportingTask;
+import org.apache.nifi.util.NiFiProperties;
import java.io.IOException;
import java.io.InputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
@@ -58,9 +61,9 @@ public class NarThreadContextClassLoader extends URLClassLoader {
narSpecificClasses.add(OutputStreamCallback.class);
narSpecificClasses.add(StreamCallback.class);
narSpecificClasses.add(ControllerService.class);
- narSpecificClasses.add(AuthorityProvider.class);
+ narSpecificClasses.add(Authorizer.class);
narSpecificClasses.add(LoginIdentityProvider.class);
- narSpecificClasses.add(ProvenanceEventRepository.class);
+ narSpecificClasses.add(ProvenanceRepository.class);
narSpecificClasses.add(ComponentStatusRepository.class);
narSpecificClasses.add(FlowFileRepository.class);
narSpecificClasses.add(FlowFileSwapManager.class);
@@ -165,7 +168,22 @@ public class NarThreadContextClassLoader extends URLClassLoader {
}
}
- public static <T> T createInstance(final String implementationClassName, final Class<T> typeDefinition) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
+ /**
+ * Constructs an instance of the given type using either default no args
+ * constructor or a constructor which takes a NiFiProperties object
+ * (preferred).
+ *
+ * @param <T> the type to create an instance for
+ * @param implementationClassName the implementation class name
+ * @param typeDefinition the type definition
+ * @param nifiProperties the NiFiProperties instance
+ * @return constructed instance
+ * @throws InstantiationException if there is an error instantiating the class
+ * @throws IllegalAccessException if there is an error accessing the type
+ * @throws ClassNotFoundException if the class cannot be found
+ */
+ public static <T> T createInstance(final String implementationClassName, final Class<T> typeDefinition, final NiFiProperties nifiProperties)
+ throws InstantiationException, IllegalAccessException, ClassNotFoundException {
final ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(NarThreadContextClassLoader.getInstance());
try {
@@ -181,7 +199,16 @@ public class NarThreadContextClassLoader extends URLClassLoader {
Thread.currentThread().setContextClassLoader(detectedClassLoaderForType);
final Class<?> desiredClass = rawClass.asSubclass(typeDefinition);
- return typeDefinition.cast(desiredClass.newInstance());
+ if(nifiProperties == null){
+ return typeDefinition.cast(desiredClass.newInstance());
+ }
+ Constructor<?> constructor = null;
+ try {
+ constructor = desiredClass.getConstructor(NiFiProperties.class);
+ return typeDefinition.cast(constructor.newInstance(nifiProperties));
+ } catch (final NoSuchMethodException | InvocationTargetException ex) {
+ return typeDefinition.cast(desiredClass.newInstance());
+ }
} finally {
Thread.currentThread().setContextClassLoader(originalClassLoader);
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/test/java/org/apache/nifi/nar/NarUnpackerTest.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/test/java/org/apache/nifi/nar/NarUnpackerTest.java b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/test/java/org/apache/nifi/nar/NarUnpackerTest.java
index 882c8c6..4587e5e 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/test/java/org/apache/nifi/nar/NarUnpackerTest.java
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-nar-utils/src/test/java/org/apache/nifi/nar/NarUnpackerTest.java
@@ -21,11 +21,8 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
-import java.io.BufferedInputStream;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
-import java.io.InputStream;
import java.net.URISyntaxException;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
@@ -33,7 +30,10 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
+import java.util.Collections;
+import java.util.HashMap;
import java.util.HashSet;
+import java.util.Map;
import java.util.Set;
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
@@ -81,7 +81,7 @@ public class NarUnpackerTest {
@Test
public void testUnpackNars() {
- NiFiProperties properties = loadSpecifiedProperties("/NarUnpacker/conf/nifi.properties");
+ NiFiProperties properties = loadSpecifiedProperties("/NarUnpacker/conf/nifi.properties", Collections.EMPTY_MAP);
assertEquals("./target/NarUnpacker/lib/",
properties.getProperty("nifi.nar.library.directory"));
@@ -112,14 +112,14 @@ public class NarUnpackerTest {
@Test
public void testUnpackNarsFromEmptyDir() throws IOException {
- NiFiProperties properties = loadSpecifiedProperties("/NarUnpacker/conf/nifi.properties");
-
final File emptyDir = new File("./target/empty/dir");
emptyDir.delete();
emptyDir.deleteOnExit();
assertTrue(emptyDir.mkdirs());
- properties.setProperty("nifi.nar.library.directory.alt", emptyDir.toString());
+ final Map<String, String> others = new HashMap<>();
+ others.put("nifi.nar.library.directory.alt", emptyDir.toString());
+ NiFiProperties properties = loadSpecifiedProperties("/NarUnpacker/conf/nifi.properties", others);
final ExtensionMapping extensionMapping = NarUnpacker.unpackNars(properties);
@@ -141,8 +141,9 @@ public class NarUnpackerTest {
nonExistantDir.delete();
nonExistantDir.deleteOnExit();
- NiFiProperties properties = loadSpecifiedProperties("/NarUnpacker/conf/nifi.properties");
- properties.setProperty("nifi.nar.library.directory.alt", nonExistantDir.toString());
+ final Map<String, String> others = new HashMap<>();
+ others.put("nifi.nar.library.directory.alt", nonExistantDir.toString());
+ NiFiProperties properties = loadSpecifiedProperties("/NarUnpacker/conf/nifi.properties", others);
final ExtensionMapping extensionMapping = NarUnpacker.unpackNars(properties);
@@ -165,15 +166,16 @@ public class NarUnpackerTest {
nonDir.createNewFile();
nonDir.deleteOnExit();
- NiFiProperties properties = loadSpecifiedProperties("/NarUnpacker/conf/nifi.properties");
- properties.setProperty("nifi.nar.library.directory.alt", nonDir.toString());
+ final Map<String, String> others = new HashMap<>();
+ others.put("nifi.nar.library.directory.alt", nonDir.toString());
+ NiFiProperties properties = loadSpecifiedProperties("/NarUnpacker/conf/nifi.properties", others);
final ExtensionMapping extensionMapping = NarUnpacker.unpackNars(properties);
assertNull(extensionMapping);
}
- private NiFiProperties loadSpecifiedProperties(String propertiesFile) {
+ private NiFiProperties loadSpecifiedProperties(final String propertiesFile, final Map<String, String> others) {
String filePath;
try {
filePath = NarUnpackerTest.class.getResource(propertiesFile).toURI().getPath();
@@ -181,34 +183,6 @@ public class NarUnpackerTest {
throw new RuntimeException("Cannot load properties file due to "
+ ex.getLocalizedMessage(), ex);
}
- System.setProperty(NiFiProperties.PROPERTIES_FILE_PATH, filePath);
-
- NiFiProperties properties = NiFiProperties.getInstance();
-
- // clear out existing properties
- for (String prop : properties.stringPropertyNames()) {
- properties.remove(prop);
- }
-
- InputStream inStream = null;
- try {
- inStream = new BufferedInputStream(new FileInputStream(filePath));
- properties.load(inStream);
- } catch (final Exception ex) {
- throw new RuntimeException("Cannot load properties file due to "
- + ex.getLocalizedMessage(), ex);
- } finally {
- if (null != inStream) {
- try {
- inStream.close();
- } catch (final Exception ex) {
- /**
- * do nothing *
- */
- }
- }
- }
-
- return properties;
+ return NiFiProperties.createBasicNiFiProperties(filePath, others);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh
index 0482472..45fabc7 100755
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh
@@ -162,6 +162,7 @@ install() {
run() {
BOOTSTRAP_CONF_DIR="${MINIFI_HOME}/conf"
BOOTSTRAP_CONF="${BOOTSTRAP_CONF_DIR}/bootstrap.conf";
+ MINIFI_LIBS="${MINIFI_HOME}/lib/*"
BOOTSTRAP_LIBS="${MINIFI_HOME}/lib/bootstrap/*"
run_as=$(grep run.as "${BOOTSTRAP_CONF}" | cut -d'=' -f2)
@@ -181,10 +182,11 @@ run() {
BOOTSTRAP_CONF=$(cygpath --path --windows "${BOOTSTRAP_CONF}")
BOOTSTRAP_CONF_DIR=$(cygpath --path --windows "${BOOTSTRAP_CONF_DIR}")
BOOTSTRAP_LIBS=$(cygpath --path --windows "${BOOTSTRAP_LIBS}")
- BOOTSTRAP_CLASSPATH="${BOOTSTRAP_CONF_DIR};${BOOTSTRAP_LIBS}"
+ MINIFI_LIBS=$(cygpath --path --windows "${MINIFI_LIBS}")
+ BOOTSTRAP_CLASSPATH="${BOOTSTRAP_CONF_DIR};${BOOTSTRAP_LIBS};${MINIFI_LIBS}"
if [ -n "${TOOLS_JAR}" ]; then
TOOLS_JAR=$(cygpath --path --windows "${TOOLS_JAR}")
- BOOTSTRAP_CLASSPATH="${TOOLS_JAR};${BOOTSTRAP_CLASSPATH}"
+ BOOTSTRAP_CLASSPATH="${TOOLS_JAR};${BOOTSTRAP_CLASSPATH};${MINIFI_LIBS}"
fi
else
if [ -n "${run_as}" ]; then
@@ -195,13 +197,14 @@ run() {
exit 1
fi
fi;
- BOOTSTRAP_CLASSPATH="${BOOTSTRAP_CONF_DIR}:${BOOTSTRAP_LIBS}"
+ BOOTSTRAP_CLASSPATH="${BOOTSTRAP_CONF_DIR}:${BOOTSTRAP_LIBS}:${MINIFI_LIBS}"
if [ -n "${TOOLS_JAR}" ]; then
- BOOTSTRAP_CLASSPATH="${TOOLS_JAR}:${BOOTSTRAP_CLASSPATH}"
+ BOOTSTRAP_CLASSPATH="${TOOLS_JAR}:${BOOTSTRAP_CLASSPATH}:${MINIFI_LIBS}"
fi
fi
echo
+ echo "Bootstrap Classpath: ${BOOTSTRAP_CLASSPATH}"
echo "Java home: ${JAVA_HOME}"
echo "MiNiFi home: ${MINIFI_HOME}"
echo
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-runtime/src/main/java/org/apache/nifi/minifi/MiNiFi.java
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-runtime/src/main/java/org/apache/nifi/minifi/MiNiFi.java b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-runtime/src/main/java/org/apache/nifi/minifi/MiNiFi.java
index b2b025b..573b139 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-runtime/src/main/java/org/apache/nifi/minifi/MiNiFi.java
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-runtime/src/main/java/org/apache/nifi/minifi/MiNiFi.java
@@ -108,16 +108,16 @@ public class MiNiFi {
NarUnpacker.unpackNars(properties);
// load the extensions classloaders
- NarClassLoaders.load(properties);
+ NarClassLoaders.getInstance().init(properties.getFrameworkWorkingDirectory(), properties.getExtensionsWorkingDirectory());
// load the framework classloader
- final ClassLoader frameworkClassLoader = NarClassLoaders.getFrameworkClassLoader();
+ final ClassLoader frameworkClassLoader = NarClassLoaders.getInstance().getFrameworkClassLoader();
if (frameworkClassLoader == null) {
throw new IllegalStateException("Unable to find the framework NAR ClassLoader.");
}
// discover the extensions
- ExtensionManager.discoverExtensions();
+ ExtensionManager.discoverExtensions(NarClassLoaders.getInstance().getExtensionClassLoaders());
ExtensionManager.logClassLoaderMapping();
// load the server from the framework classloader
@@ -229,7 +229,7 @@ public class MiNiFi {
public static void main(String[] args) {
logger.info("Launching MiNiFi...");
try {
- NiFiProperties niFiProperties = NiFiProperties.getInstance();
+ NiFiProperties niFiProperties = NiFiProperties.createBasicNiFiProperties(null, null);
new MiNiFi(niFiProperties);
} catch (final Throwable t) {
logger.error("Failure to launch MiNiFi due to " + t, t);
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-framework-bundle/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/pom.xml b/minifi-nar-bundles/minifi-framework-bundle/pom.xml
index 57fbc07..73a545c 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/pom.xml
+++ b/minifi-nar-bundles/minifi-framework-bundle/pom.xml
@@ -26,7 +26,6 @@ limitations under the License.
<groupId>org.apache.nifi.minifi</groupId>
<artifactId>minifi-framework-bundle</artifactId>
<packaging>pom</packaging>
- <version>0.1.0-SNAPSHOT</version>
<modules>
<module>minifi-framework-nar</module>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-nar/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-nar/pom.xml b/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-nar/pom.xml
deleted file mode 100644
index 88b5b90..0000000
--- a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-nar/pom.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<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/maven-v4_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.minifi</groupId>
- <artifactId>minifi-provenance-reporting-bundle</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>minifi-provenance-reporting-nar</artifactId>
- <packaging>nar</packaging>
- <properties>
- <maven.javadoc.skip>true</maven.javadoc.skip>
- <source.skip>true</source.skip>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.apache.nifi.minifi</groupId>
- <artifactId>minifi-provenance-reporting-task</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-standard-services-api-nar</artifactId>
- <type>nar</type>
- </dependency>
- </dependencies>
-</project>
[2/6] nifi-minifi git commit: MINIFI-115 Bump NiFi versions to 1.0.0
Posted by jp...@apache.org.
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-ssl-context-service-nar/src/main/resources/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-ssl-context-service-nar/src/main/resources/META-INF/LICENSE b/minifi-nar-bundles/minifi-ssl-context-service-nar/src/main/resources/META-INF/LICENSE
new file mode 100644
index 0000000..a38d06b
--- /dev/null
+++ b/minifi-nar-bundles/minifi-ssl-context-service-nar/src/main/resources/META-INF/LICENSE
@@ -0,0 +1,337 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
+APACHE NIFI SUBCOMPONENTS:
+
+The Apache NiFi project contains subcomponents with separate copyright
+notices and license terms. Your use of the source code for the these
+subcomponents is subject to the terms and conditions of the following
+licenses.
+
+The binary distribution of this product bundles 'Bouncy Castle JDK 1.5 Provider'
+under an MIT style license.
+
+ Copyright (c) 2000 - 2015 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org)
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+This product bundes 'JCraft Jsch' which is available under a 3-Clause BSD
+License.
+
+ Copyright (c) 2002-2015 Atsuhiko Yamanaka, JCraft,Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. The names of the authors may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
+ INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+This product bundles 'JCraft Jzlib' which is available under a 3-Clause BSD License.
+
+ Copyright (c) 2002-2014 Atsuhiko Yamanaka, JCraft,Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. The names of the authors may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
+ INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+This product bundles 'asm' which is available under a 3-Clause BSD style license.
+For details see http://asm.ow2.org/asmdex-license.html
+
+ Copyright (c) 2012 France T�l�com
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the copyright holders nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
+
+The binary distribution of this product bundles 'jBCrypt' which is available under a BSD license. For details see https://github.com/svenkubiak/jBCrypt/blob/0.4.1/LICENSE
+
+ Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
+
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-ssl-context-service-nar/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-ssl-context-service-nar/src/main/resources/META-INF/NOTICE b/minifi-nar-bundles/minifi-ssl-context-service-nar/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..5718321
--- /dev/null
+++ b/minifi-nar-bundles/minifi-ssl-context-service-nar/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,196 @@
+minifi-standard-nar
+Copyright 2014-2016 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 IO
+ The following NOTICE information applies:
+ Apache Commons IO
+ Copyright 2002-2012 The Apache Software Foundation
+
+ (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 Commons Net
+ The following NOTICE information applies:
+ Apache Commons Net
+ Copyright 2001-2013 The Apache Software Foundation
+
+ (ASLv2) Apache Commons Compress
+ The following NOTICE information applies:
+ Apache Commons Compress
+ Copyright 2002-2014 The Apache Software Foundation
+
+ The files in the package org.apache.commons.compress.archivers.sevenz
+ were derived from the LZMA SDK, version 9.20 (C/ and CPP/7zip/),
+ which has been placed in the public domain:
+
+ "LZMA SDK is placed in the public domain." (http://www.7-zip.org/sdk.html)
+
+ (ASLv2) Apache HttpComponents
+ The following NOTICE information applies:
+ Apache HttpClient
+ Copyright 1999-2015 The Apache Software Foundation
+
+ Apache HttpCore
+ Copyright 2005-2015 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 Logging
+ The following NOTICE information applies:
+ Apache Commons Logging
+ Copyright 2003-2014 The Apache Software Foundation
+
+ (ASLv2) Joda Time
+ The following NOTICE information applies:
+ This product includes software developed by
+ Joda.org (http://www.joda.org/).
+
+ (ASLv2) Apache ActiveMQ
+ The following NOTICE information applies:
+ ActiveMQ :: Client
+ Copyright 2005-2015 The Apache Software Foundation
+
+ (ASLv2) Apache Geronimo
+ The following NOTICE information applies:
+ Apache Geronimo
+ Copyright 2003-2008 The Apache Software Foundation
+
+ (ASLv2) Yammer Metrics
+ The following NOTICE information applies:
+ Metrics
+ Copyright 2010-2012 Coda Hale and Yammer, Inc.
+
+ This product includes software developed by Coda Hale and Yammer, Inc.
+
+ This product includes code derived from the JSR-166 project (ThreadLocalRandom), which was released
+ with the following comments:
+
+ Written by Doug Lea with assistance from members of JCP JSR-166
+ Expert Group and released to the public domain, as explained at
+ http://creativecommons.org/publicdomain/zero/1.0/
+
+ (ASLv2) JSON-SMART
+ The following NOTICE information applies:
+ Copyright 2011 JSON-SMART authors
+
+ (ASLv2) JsonPath
+ The following NOTICE information applies:
+ Copyright 2011 JsonPath authors
+
+ (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 Tika
+ The following NOTICE information applies:
+ Apache Tika Core
+ Copyright 2007-2015 The Apache Software Foundation
+
+ (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.
+
+ (ASLv2) Apache Avro
+ The following NOTICE information applies:
+ Apache Avro
+ Copyright 2009-2013 The Apache Software Foundation
+
+ (ASLv2) Snappy Java
+ The following NOTICE information applies:
+ This product includes software developed by Google
+ Snappy: http://code.google.com/p/snappy/ (New BSD License)
+
+ This product includes software developed by Apache
+ PureJavaCrc32C from apache-hadoop-common http://hadoop.apache.org/
+ (Apache 2.0 license)
+
+ This library containd statically linked libstdc++. This inclusion is allowed by
+ "GCC RUntime Library Exception"
+ http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html
+
+************************
+Common Development and Distribution License 1.1
+************************
+
+The following binary components are provided under the Common Development and Distribution License 1.1. See project link for details.
+
+ (CDDL 1.1) (GPL2 w/ CPE) jersey-core (com.sun.jersey:jersey-core:jar:1.19 - https://jersey.java.net/jersey-core/)
+ (CDDL 1.1) (GPL2 w/ CPE) jersey-client (com.sun.jersey:jersey-client:jar:1.19 - https://jersey.java.net/jersey-client/)
+ (CDDL 1.1) (GPL2 w/ CPE) jersey-server (com.sun.jersey:jersey-server:jar:1.19 - https://jersey.java.net/jersey-server/)
+ (CDDL 1.1) (GPL2 w/ CPE) JavaMail API (compat) (javax.mail:mail:jar:1.4.7 - http://kenai.com/projects/javamail/mail)
+ (CDDL 1.1) (GPL2 w/ CPE) Javax JMS Api (javax.jms:javax.jms-api:jar:2.0.1 - http://java.net/projects/jms-spec/pages/Home)
+
+*****************
+Common Development and Distribution License v1.0:
+*****************
+
+The following binary components are provided under the Common Development and Distribution License v1.0. See project link for details.
+
+ (CDDL 1.0) JavaBeans Activation Framework (JAF) (javax.activation:activation:jar:1.1 - http://java.sun.com/products/javabeans/jaf/index.jsp)
+ (CDDL 1.0) JSR311 API (javax.ws.rs:jsr311-api:jar:1.1.1 - https://jsr311.dev.java.net)
+
+*****************
+Mozilla Public License v2.0
+*****************
+
+The following binary components are provided under the Mozilla Public License v2.0. See project link for details.
+
+ (MPL 2.0) Saxon HE (net.sf.saxon:Saxon-HE:jar:9.6.0-5 - http://www.saxonica.com/)
+
+*****************
+Public Domain
+*****************
+
+The following binary components are provided to the 'Public Domain'. See project link for details.
+
+ (Public Domain) XZ for Java (org.tukaani:xz:jar:1.5 - http://tukaani.org/xz/java.html
+
+
+
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-standard-nar/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-standard-nar/pom.xml b/minifi-nar-bundles/minifi-standard-nar/pom.xml
index 21342bb..473ec78 100644
--- a/minifi-nar-bundles/minifi-standard-nar/pom.xml
+++ b/minifi-nar-bundles/minifi-standard-nar/pom.xml
@@ -32,10 +32,9 @@ limitations under the License.
</properties>
<dependencies>
<dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-standard-services-api-nar</artifactId>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-standard-services-api-nar</artifactId>
<type>nar</type>
- <version>${org.apache.nifi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
@@ -52,5 +51,52 @@ limitations under the License.
<artifactId>nifi-standard-reporting-tasks</artifactId>
<version>${org.apache.nifi.version}</version>
</dependency>
+ <!-- Manage provided dependencies in lib -->
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-server</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15on</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpg-jdk15on</artifactId>
+ <version>1.54</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpkix-jdk15on</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml b/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml
new file mode 100644
index 0000000..ea7bcd8
--- /dev/null
+++ b/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml
@@ -0,0 +1,79 @@
+<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-standard-services</artifactId>
+ <version>1.0.0</version>
+ <relativePath/>
+ </parent>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-standard-services-api-nar</artifactId>
+ <packaging>nar</packaging>
+ <properties>
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ <source.skip>true</source.skip>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-ssl-context-service-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-distributed-cache-client-service-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-load-distribution-service-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-http-context-map-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-dbcp-service-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-hbase-client-service-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <!-- Manage provided dependencies in lib -->
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15on</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpg-jdk15on</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpkix-jdk15on</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-standard-services-api-nar/src/main/resources/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-standard-services-api-nar/src/main/resources/META-INF/LICENSE b/minifi-nar-bundles/minifi-standard-services-api-nar/src/main/resources/META-INF/LICENSE
new file mode 100644
index 0000000..a38d06b
--- /dev/null
+++ b/minifi-nar-bundles/minifi-standard-services-api-nar/src/main/resources/META-INF/LICENSE
@@ -0,0 +1,337 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
+APACHE NIFI SUBCOMPONENTS:
+
+The Apache NiFi project contains subcomponents with separate copyright
+notices and license terms. Your use of the source code for the these
+subcomponents is subject to the terms and conditions of the following
+licenses.
+
+The binary distribution of this product bundles 'Bouncy Castle JDK 1.5 Provider'
+under an MIT style license.
+
+ Copyright (c) 2000 - 2015 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org)
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+This product bundes 'JCraft Jsch' which is available under a 3-Clause BSD
+License.
+
+ Copyright (c) 2002-2015 Atsuhiko Yamanaka, JCraft,Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. The names of the authors may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
+ INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+This product bundles 'JCraft Jzlib' which is available under a 3-Clause BSD License.
+
+ Copyright (c) 2002-2014 Atsuhiko Yamanaka, JCraft,Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. The names of the authors may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
+ INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+This product bundles 'asm' which is available under a 3-Clause BSD style license.
+For details see http://asm.ow2.org/asmdex-license.html
+
+ Copyright (c) 2012 France T�l�com
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the copyright holders nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
+
+The binary distribution of this product bundles 'jBCrypt' which is available under a BSD license. For details see https://github.com/svenkubiak/jBCrypt/blob/0.4.1/LICENSE
+
+ Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
+
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/minifi-standard-services-api-nar/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-standard-services-api-nar/src/main/resources/META-INF/NOTICE b/minifi-nar-bundles/minifi-standard-services-api-nar/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..5718321
--- /dev/null
+++ b/minifi-nar-bundles/minifi-standard-services-api-nar/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,196 @@
+minifi-standard-nar
+Copyright 2014-2016 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 IO
+ The following NOTICE information applies:
+ Apache Commons IO
+ Copyright 2002-2012 The Apache Software Foundation
+
+ (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 Commons Net
+ The following NOTICE information applies:
+ Apache Commons Net
+ Copyright 2001-2013 The Apache Software Foundation
+
+ (ASLv2) Apache Commons Compress
+ The following NOTICE information applies:
+ Apache Commons Compress
+ Copyright 2002-2014 The Apache Software Foundation
+
+ The files in the package org.apache.commons.compress.archivers.sevenz
+ were derived from the LZMA SDK, version 9.20 (C/ and CPP/7zip/),
+ which has been placed in the public domain:
+
+ "LZMA SDK is placed in the public domain." (http://www.7-zip.org/sdk.html)
+
+ (ASLv2) Apache HttpComponents
+ The following NOTICE information applies:
+ Apache HttpClient
+ Copyright 1999-2015 The Apache Software Foundation
+
+ Apache HttpCore
+ Copyright 2005-2015 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 Logging
+ The following NOTICE information applies:
+ Apache Commons Logging
+ Copyright 2003-2014 The Apache Software Foundation
+
+ (ASLv2) Joda Time
+ The following NOTICE information applies:
+ This product includes software developed by
+ Joda.org (http://www.joda.org/).
+
+ (ASLv2) Apache ActiveMQ
+ The following NOTICE information applies:
+ ActiveMQ :: Client
+ Copyright 2005-2015 The Apache Software Foundation
+
+ (ASLv2) Apache Geronimo
+ The following NOTICE information applies:
+ Apache Geronimo
+ Copyright 2003-2008 The Apache Software Foundation
+
+ (ASLv2) Yammer Metrics
+ The following NOTICE information applies:
+ Metrics
+ Copyright 2010-2012 Coda Hale and Yammer, Inc.
+
+ This product includes software developed by Coda Hale and Yammer, Inc.
+
+ This product includes code derived from the JSR-166 project (ThreadLocalRandom), which was released
+ with the following comments:
+
+ Written by Doug Lea with assistance from members of JCP JSR-166
+ Expert Group and released to the public domain, as explained at
+ http://creativecommons.org/publicdomain/zero/1.0/
+
+ (ASLv2) JSON-SMART
+ The following NOTICE information applies:
+ Copyright 2011 JSON-SMART authors
+
+ (ASLv2) JsonPath
+ The following NOTICE information applies:
+ Copyright 2011 JsonPath authors
+
+ (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 Tika
+ The following NOTICE information applies:
+ Apache Tika Core
+ Copyright 2007-2015 The Apache Software Foundation
+
+ (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.
+
+ (ASLv2) Apache Avro
+ The following NOTICE information applies:
+ Apache Avro
+ Copyright 2009-2013 The Apache Software Foundation
+
+ (ASLv2) Snappy Java
+ The following NOTICE information applies:
+ This product includes software developed by Google
+ Snappy: http://code.google.com/p/snappy/ (New BSD License)
+
+ This product includes software developed by Apache
+ PureJavaCrc32C from apache-hadoop-common http://hadoop.apache.org/
+ (Apache 2.0 license)
+
+ This library containd statically linked libstdc++. This inclusion is allowed by
+ "GCC RUntime Library Exception"
+ http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html
+
+************************
+Common Development and Distribution License 1.1
+************************
+
+The following binary components are provided under the Common Development and Distribution License 1.1. See project link for details.
+
+ (CDDL 1.1) (GPL2 w/ CPE) jersey-core (com.sun.jersey:jersey-core:jar:1.19 - https://jersey.java.net/jersey-core/)
+ (CDDL 1.1) (GPL2 w/ CPE) jersey-client (com.sun.jersey:jersey-client:jar:1.19 - https://jersey.java.net/jersey-client/)
+ (CDDL 1.1) (GPL2 w/ CPE) jersey-server (com.sun.jersey:jersey-server:jar:1.19 - https://jersey.java.net/jersey-server/)
+ (CDDL 1.1) (GPL2 w/ CPE) JavaMail API (compat) (javax.mail:mail:jar:1.4.7 - http://kenai.com/projects/javamail/mail)
+ (CDDL 1.1) (GPL2 w/ CPE) Javax JMS Api (javax.jms:javax.jms-api:jar:2.0.1 - http://java.net/projects/jms-spec/pages/Home)
+
+*****************
+Common Development and Distribution License v1.0:
+*****************
+
+The following binary components are provided under the Common Development and Distribution License v1.0. See project link for details.
+
+ (CDDL 1.0) JavaBeans Activation Framework (JAF) (javax.activation:activation:jar:1.1 - http://java.sun.com/products/javabeans/jaf/index.jsp)
+ (CDDL 1.0) JSR311 API (javax.ws.rs:jsr311-api:jar:1.1.1 - https://jsr311.dev.java.net)
+
+*****************
+Mozilla Public License v2.0
+*****************
+
+The following binary components are provided under the Mozilla Public License v2.0. See project link for details.
+
+ (MPL 2.0) Saxon HE (net.sf.saxon:Saxon-HE:jar:9.6.0-5 - http://www.saxonica.com/)
+
+*****************
+Public Domain
+*****************
+
+The following binary components are provided to the 'Public Domain'. See project link for details.
+
+ (Public Domain) XZ for Java (org.tukaani:xz:jar:1.5 - http://tukaani.org/xz/java.html
+
+
+
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-nar-bundles/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/pom.xml b/minifi-nar-bundles/pom.xml
index f0fd400..a02b75b 100644
--- a/minifi-nar-bundles/pom.xml
+++ b/minifi-nar-bundles/pom.xml
@@ -26,8 +26,9 @@
<modules>
<module>minifi-framework-bundle</module>
<module>minifi-provenance-repository-bundle</module>
- <module>minifi-provenance-reporting-bundle</module>
<module>minifi-update-attribute-nar</module>
<module>minifi-standard-nar</module>
+ <module>minifi-standard-services-api-nar</module>
+ <module>minifi-ssl-context-service-nar</module>
</modules>
</project>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/52888507/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java b/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java
index b726c5a..76d1a5f 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java
@@ -24,10 +24,10 @@ import org.apache.nifi.minifi.commons.schema.exception.SchemaLoaderException;
import org.apache.nifi.minifi.commons.schema.serialization.SchemaLoader;
import org.apache.nifi.minifi.commons.schema.serialization.SchemaSaver;
import org.apache.nifi.minifi.toolkit.configuration.dto.ConfigSchemaFunction;
+import org.apache.nifi.web.api.dto.ComponentDTO;
import org.apache.nifi.web.api.dto.ConnectableDTO;
import org.apache.nifi.web.api.dto.ConnectionDTO;
import org.apache.nifi.web.api.dto.FlowSnippetDTO;
-import org.apache.nifi.web.api.dto.NiFiComponentDTO;
import org.apache.nifi.web.api.dto.PortDTO;
import org.apache.nifi.web.api.dto.ProcessGroupDTO;
import org.apache.nifi.web.api.dto.ProcessorDTO;
@@ -115,7 +115,7 @@ public class ConfigMain {
return ERR_INVALID_CONFIG;
}
});
- } catch (IOException|SchemaLoaderException e) {
+ } catch (IOException | SchemaLoaderException e) {
return handleErrorLoadingConfiguration(e, ConfigMain::printValidateUsage);
}
} catch (FileNotFoundException e) {
@@ -148,7 +148,7 @@ public class ConfigMain {
// RPGs with no name get Target URI as name
remoteProcessGroups.stream().filter(r -> StringUtil.isNullOrEmpty(r.getName())).forEach(r -> r.setName(r.getTargetUri()));
- Map<String, String> connectableNameMap = getAll(allFlowSnippets, FlowSnippetDTO::getProcessors).collect(Collectors.toMap(NiFiComponentDTO::getId, ProcessorDTO::getName));
+ Map<String, String> connectableNameMap = getAll(allFlowSnippets, FlowSnippetDTO::getProcessors).collect(Collectors.toMap(ComponentDTO::getId, ProcessorDTO::getName));
for (RemoteProcessGroupDTO remoteProcessGroupDTO : remoteProcessGroups) {
RemoteProcessGroupContentsDTO contents = remoteProcessGroupDTO.getContents();
@@ -252,7 +252,7 @@ public class ConfigMain {
}
return configSchema;
});
- } catch (IOException|SchemaLoaderException e) {
+ } catch (IOException | SchemaLoaderException e) {
return handleErrorLoadingConfiguration(e, ConfigMain::printUpgradeUsage);
}
} catch (FileNotFoundException e) {
[5/6] nifi-minifi git commit: MINIFI-115 - Changing YAML to use UUIDs
Posted by jp...@apache.org.
MINIFI-115 - Changing YAML to use UUIDs
Signed-off-by: Joseph Percivall <JP...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi/commit/00d6ac03
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi/tree/00d6ac03
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi/diff/00d6ac03
Branch: refs/heads/master
Commit: 00d6ac03ce86152658d8d3f86b481e47e28b90fb
Parents: 5288850
Author: Bryan Rosander <br...@apache.org>
Authored: Tue Nov 15 15:16:18 2016 -0500
Committer: Joseph Percivall <JP...@apache.org>
Committed: Sun Nov 27 12:53:38 2016 -0500
----------------------------------------------------------------------
.../src/test/resources/config-multiple-RPGs.yml | 4 +--
.../resources/config-multiple-input-ports.yml | 4 +--
minifi-bootstrap/src/test/resources/config.yml | 6 ++--
.../commons/schema/ProcessGroupSchema.java | 8 +++++
.../commons/schema/common/BaseSchemaWithId.java | 18 ++++++----
.../commons/schema/v1/ConfigSchemaV1.java | 36 ++++++++------------
.../minifi/commons/schema/ConfigSchemaTest.java | 13 ++++---
.../commons/schema/ConnectionSchemaTest.java | 4 ++-
.../commons/schema/v1/ConfigSchemaV1Test.java | 29 +++++++++-------
.../schema/v1/ConnectionSchemaV1Test.java | 10 +++---
.../src/test/resources/config-minimal-v2.yml | 10 +++---
.../minifi-standard-services-api-nar/pom.xml | 1 +
minifi-nar-bundles/pom.xml | 2 +-
.../configuration/dto/BaseSchemaTester.java | 3 +-
.../configuration/dto/ConnectionSchemaTest.java | 4 ++-
.../dto/PortSchemaFunctionTest.java | 5 ++-
.../configuration/dto/ProcessorSchemaTest.java | 4 ++-
.../dto/RemoteInputPortSchemaTest.java | 4 ++-
.../src/test/resources/config.yml | 6 ++--
19 files changed, 99 insertions(+), 72 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-bootstrap/src/test/resources/config-multiple-RPGs.yml
----------------------------------------------------------------------
diff --git a/minifi-bootstrap/src/test/resources/config-multiple-RPGs.yml b/minifi-bootstrap/src/test/resources/config-multiple-RPGs.yml
index a779a42..a799097 100644
--- a/minifi-bootstrap/src/test/resources/config-multiple-RPGs.yml
+++ b/minifi-bootstrap/src/test/resources/config-multiple-RPGs.yml
@@ -77,7 +77,7 @@ Connections:
- name: TailToS2S
source name: TailAppLog
source relationship name: success
- destination name: dgs809qe-9qw7-q985-jl1u-y789ohi87g78
+ destination name: 37b4b78a-a5c9-3eac-bfb7-56fc4875aace
max work queue size: 0
max work queue data size: 1 MB
flowfile expiration: 60 sec
@@ -109,7 +109,7 @@ Remote Processing Groups:
timeout: 30 secs
yield period: 10 sec
Input Ports:
- - id: dgs809qe-9qw7-q985-jl1u-y789ohi87g78
+ - id: 37b4b78a-a5c9-3eac-bfb7-56fc4875aace
name: tailed log
comments:
max concurrent tasks: 1
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-bootstrap/src/test/resources/config-multiple-input-ports.yml
----------------------------------------------------------------------
diff --git a/minifi-bootstrap/src/test/resources/config-multiple-input-ports.yml b/minifi-bootstrap/src/test/resources/config-multiple-input-ports.yml
index 9654edf..1581163 100644
--- a/minifi-bootstrap/src/test/resources/config-multiple-input-ports.yml
+++ b/minifi-bootstrap/src/test/resources/config-multiple-input-ports.yml
@@ -77,7 +77,7 @@ Connections:
- name: TailToS2S
source name: TailAppLog
source relationship name: success
- destination name: dgs809qe-9qw7-q985-jl1u-y789ohi87g78
+ destination name: 37b4b78a-a5c9-3eac-bfb7-56fc4875aace
max work queue size: 0
max work queue data size: 1 MB
flowfile expiration: 60 sec
@@ -103,7 +103,7 @@ Remote Processing Groups:
comments:
max concurrent tasks: 1
use compression: false
- - id: dgs809qe-9qw7-q985-jl1u-y789ohi87g78
+ - id: 37b4b78a-a5c9-3eac-bfb7-56fc4875aace
name: tailed log2
comments:
max concurrent tasks: 1
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-bootstrap/src/test/resources/config.yml
----------------------------------------------------------------------
diff --git a/minifi-bootstrap/src/test/resources/config.yml b/minifi-bootstrap/src/test/resources/config.yml
index 64a28fe..dab1e8e 100644
--- a/minifi-bootstrap/src/test/resources/config.yml
+++ b/minifi-bootstrap/src/test/resources/config.yml
@@ -56,7 +56,7 @@ Security Properties:
algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL
provider: BC
Processors:
-- id: TailFile
+- id: 94b8e610-b4ed-3ec9-b26f-c839931bf3e2
name: TailFile
class: org.apache.nifi.processors.standard.TailFile
max concurrent tasks: 1
@@ -71,9 +71,9 @@ Processors:
Initial Start Position: Beginning of File
Rolling Filename Pattern: minifi-app*
Connections:
-- id: TailToS2S
+- id: f6cef9b0-8982-391c-8d70-76f33917ac12
name: TailToS2S
- source id: TailFile
+ source id: 94b8e610-b4ed-3ec9-b26f-c839931bf3e2
source relationship names:
- success
destination id: 8644cbcc-a45c-40e0-964d-5e536e2ada61
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/ProcessGroupSchema.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/ProcessGroupSchema.java b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/ProcessGroupSchema.java
index 7be69c0..be7f9fc 100644
--- a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/ProcessGroupSchema.java
+++ b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/ProcessGroupSchema.java
@@ -164,4 +164,12 @@ public class ProcessGroupSchema extends BaseSchemaWithIdAndName implements Writa
public List<PortSchema> getInputPortSchemas() {
return inputPortSchemas;
}
+
+ @Override
+ protected boolean isValidId(String value) {
+ if (ID_DEFAULT.equals(value)) {
+ return true;
+ }
+ return super.isValidId(value);
+ }
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithId.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithId.java b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithId.java
index 96b47a7..96dc4d7 100644
--- a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithId.java
+++ b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithId.java
@@ -21,14 +21,11 @@ package org.apache.nifi.minifi.commons.schema.common;
import java.util.List;
import java.util.Map;
-import java.util.regex.Pattern;
+import java.util.UUID;
import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.ID_KEY;
public class BaseSchemaWithId extends BaseSchema implements WritableSchema {
- public static final Pattern VALID_ID_PATTERN = Pattern.compile("[A-Za-z0-9_-]+");
- public static final String ID_DOES_NOT_MATCH_VALID_ID_PATTERN = "Id does not match valid pattern (" + VALID_ID_PATTERN + "): ";
-
private final String wrapperName;
private String id;
@@ -65,9 +62,18 @@ public class BaseSchemaWithId extends BaseSchema implements WritableSchema {
List<String> validationIssues = super.getValidationIssues();
if (StringUtil.isNullOrEmpty(id)) {
validationIssues.add(getIssueText(CommonPropertyKeys.ID_KEY, getWrapperName(), IT_WAS_NOT_FOUND_AND_IT_IS_REQUIRED));
- } else if (!VALID_ID_PATTERN.matcher(id).matches()) {
- validationIssues.add(getIssueText(CommonPropertyKeys.ID_KEY, getWrapperName(), ID_DOES_NOT_MATCH_VALID_ID_PATTERN));
+ } else if (!isValidId(id)) {
+ validationIssues.add(getIssueText(CommonPropertyKeys.ID_KEY, getWrapperName(), "Id value of " + id + " is not a valid UUID"));
}
return validationIssues;
}
+
+ protected boolean isValidId(String value) {
+ try {
+ UUID.fromString(value);
+ return true;
+ } catch (Exception e) {
+ return false;
+ }
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1.java b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1.java
index 2ebf28a..49dc087 100644
--- a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1.java
+++ b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1.java
@@ -36,12 +36,14 @@ import org.apache.nifi.minifi.commons.schema.common.BaseSchema;
import org.apache.nifi.minifi.commons.schema.common.ConvertableSchema;
import org.apache.nifi.minifi.commons.schema.common.StringUtil;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.UUID;
import java.util.stream.Collectors;
import static org.apache.nifi.minifi.commons.schema.ConfigSchema.TOP_LEVEL_NAME;
@@ -133,12 +135,12 @@ public class ConfigSchemaV1 extends BaseSchema implements ConvertableSchema<Conf
}
protected List<ProcessorSchema> getProcessorSchemas() {
- Map<String, Integer> idMap = new HashMap<>();
+ Set<UUID> ids = new HashSet<>();
List<ProcessorSchema> processorSchemas = new ArrayList<>(processors.size());
for (ProcessorSchemaV1 processor : processors) {
ProcessorSchema processorSchema = processor.convert();
- processorSchema.setId(getUniqueId(idMap, processorSchema.getName()));
+ processorSchema.setId(getUniqueId(ids, processorSchema.getName()));
processorSchemas.add(processorSchema);
}
@@ -146,7 +148,7 @@ public class ConfigSchemaV1 extends BaseSchema implements ConvertableSchema<Conf
}
protected List<ConnectionSchema> getConnectionSchemas(List<ProcessorSchema> processors, List<String> validationIssues) {
- Map<String, Integer> idMap = new HashMap<>();
+ Set<UUID> ids = new HashSet<>();
Map<String, String> processorNameToIdMap = new HashMap<>();
@@ -175,7 +177,7 @@ public class ConfigSchemaV1 extends BaseSchema implements ConvertableSchema<Conf
List<ConnectionSchema> connectionSchemas = new ArrayList<>(connections.size());
for (ConnectionSchemaV1 connection : connections) {
ConnectionSchema convert = connection.convert();
- convert.setId(getUniqueId(idMap, convert.getName()));
+ convert.setId(getUniqueId(ids, convert.getName()));
String sourceName = connection.getSourceName();
if (remoteInputPortIds.contains(sourceName)) {
@@ -233,27 +235,19 @@ public class ConfigSchemaV1 extends BaseSchema implements ConvertableSchema<Conf
}
/**
- * Will replace all characters not in [A-Za-z0-9_] with _
- * <p>
- * This has potential for collisions so it will also append numbers as necessary to prevent that
+ * Will deterministically (per config file in the case of collisions) map the name to a uuid.
*
- * @param ids id map of already incremented numbers
+ * @param ids the set of UUIDs already assigned
* @param name the name
- * @return a unique filesystem-friendly id
+ * @return a UUID string
*/
- public static String getUniqueId(Map<String, Integer> ids, String name) {
- String baseId = StringUtil.isNullOrEmpty(name) ? EMPTY_NAME : ID_REPLACE_PATTERN.matcher(name).replaceAll("_");
- String id = baseId;
- Integer idNum = ids.get(baseId);
- while (ids.containsKey(id)) {
- id = baseId + "_" + idNum++;
+ public static String getUniqueId(Set<UUID> ids, String name) {
+ UUID id = UUID.nameUUIDFromBytes(name == null ? EMPTY_NAME.getBytes(StandardCharsets.UTF_8) : name.getBytes(StandardCharsets.UTF_8));
+ while (ids.contains(id)) {
+ id = new UUID(id.getMostSignificantBits(), id.getLeastSignificantBits() + 1);
}
- // Using != on a string comparison here is intentional. The two will be reference equal iff the body of the while loop was never executed.
- if (id != baseId) {
- ids.put(baseId, idNum);
- }
- ids.put(id, 2);
- return id;
+ ids.add(id);
+ return id.toString();
}
@Override
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/ConfigSchemaTest.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/ConfigSchemaTest.java b/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/ConfigSchemaTest.java
index afca6e0..83b5525 100644
--- a/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/ConfigSchemaTest.java
+++ b/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/ConfigSchemaTest.java
@@ -23,10 +23,13 @@ import org.apache.nifi.minifi.commons.schema.serialization.SchemaLoader;
import org.junit.Test;
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
+import java.util.UUID;
import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.ID_KEY;
import static org.junit.Assert.assertEquals;
@@ -93,8 +96,8 @@ public class ConfigSchemaTest {
List<Map<String, Object>> connections = (List<Map<String, Object>>) yamlAsMap.get(CommonPropertyKeys.CONNECTIONS_KEY);
assertEquals(1, connections.size());
- String fakeSource = "fakeSource";
- String fakeDestination = "fakeDestination";
+ String fakeSource = UUID.nameUUIDFromBytes("fakeSource".getBytes(StandardCharsets.UTF_8)).toString();
+ String fakeDestination = UUID.nameUUIDFromBytes("fakeDestination".getBytes(StandardCharsets.UTF_8)).toString();
Map<String, Object> connection = connections.get(0);
connection.put(ConnectionSchema.SOURCE_ID_KEY, fakeSource);
@@ -102,9 +105,9 @@ public class ConfigSchemaTest {
ConfigSchema configSchema = new ConfigSchema(yamlAsMap);
List<String> validationIssues = configSchema.getValidationIssues();
- assertEquals(2, validationIssues.size());
- assertEquals(ConfigSchema.CONNECTION_WITH_ID + connection.get(ID_KEY) + ConfigSchema.HAS_INVALID_DESTINATION_ID + fakeDestination, validationIssues.get(0));
- assertEquals(ConfigSchema.CONNECTION_WITH_ID + connection.get(ID_KEY) + ConfigSchema.HAS_INVALID_SOURCE_ID + fakeSource, validationIssues.get(1));
+ assertEquals(new ArrayList<>(
+ Arrays.asList(ConfigSchema.CONNECTION_WITH_ID + connection.get(ID_KEY) + ConfigSchema.HAS_INVALID_DESTINATION_ID + fakeDestination,
+ ConfigSchema.CONNECTION_WITH_ID + connection.get(ID_KEY) + ConfigSchema.HAS_INVALID_SOURCE_ID + fakeSource)), validationIssues);
}
public static List<Map<String, Object>> getListWithNames(String... names) {
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/ConnectionSchemaTest.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/ConnectionSchemaTest.java b/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/ConnectionSchemaTest.java
index 61f9e96..860bf41 100644
--- a/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/ConnectionSchemaTest.java
+++ b/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/ConnectionSchemaTest.java
@@ -23,11 +23,13 @@ import org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys;
import org.junit.Before;
import org.junit.Test;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.UUID;
import static org.junit.Assert.assertEquals;
@@ -46,7 +48,7 @@ public class ConnectionSchemaTest {
@Before
public void setup() {
- testId = "testId";
+ testId = UUID.nameUUIDFromBytes("testId".getBytes(StandardCharsets.UTF_8)).toString();
testName = "testName";
testSourceId = "testSourceId";
testSourceRelationShip1 = "testSourceRelationShip1";
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1Test.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1Test.java b/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1Test.java
index 7ce0587..b72133a 100644
--- a/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1Test.java
+++ b/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1Test.java
@@ -29,9 +29,12 @@ import org.apache.nifi.minifi.commons.schema.serialization.SchemaLoader;
import org.junit.Test;
import java.io.IOException;
-import java.util.HashMap;
+import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.NAME_KEY;
import static org.junit.Assert.assertEquals;
@@ -43,7 +46,7 @@ public class ConfigSchemaV1Test {
Map<String, Object> yamlAsMap = SchemaLoader.loadYamlAsMap(ConfigSchemaTest.class.getClassLoader().getResourceAsStream("config-minimal.yml"));
ConfigSchema configSchema = new ConfigSchemaV1(yamlAsMap).convert();
List<String> validationIssues = configSchema.getValidationIssues();
- assertEquals(0, validationIssues.size());
+ assertEquals(new ArrayList<>(), validationIssues);
}
@Test
public void testValidationIssuesFromNewer() throws IOException, SchemaLoaderException {
@@ -69,9 +72,9 @@ public class ConfigSchemaV1Test {
ConfigSchema configSchema = new ConfigSchemaV1(yamlAsMap).convert();
List<String> validationIssues = configSchema.getValidationIssues();
assertEquals(4, validationIssues.size());
- assertEquals(BaseSchema.getIssueText(ConnectionSchema.DESTINATION_ID_KEY, "Connection(id: TailToSplit, name: TailToSplit)", BaseSchema.IT_WAS_NOT_FOUND_AND_IT_IS_REQUIRED),
- validationIssues.get(0));
- assertEquals(BaseSchema.getIssueText(ConnectionSchema.SOURCE_ID_KEY, "Connection(id: TailToSplit, name: TailToSplit)", BaseSchema.IT_WAS_NOT_FOUND_AND_IT_IS_REQUIRED),
+ assertEquals(BaseSchema.getIssueText(ConnectionSchema.DESTINATION_ID_KEY, "Connection(id: 0401b747-1dca-31c7-ab4b-cdacf7e6c44b, name: TailToSplit)",
+ BaseSchema.IT_WAS_NOT_FOUND_AND_IT_IS_REQUIRED), validationIssues.get(0));
+ assertEquals(BaseSchema.getIssueText(ConnectionSchema.SOURCE_ID_KEY, "Connection(id: 0401b747-1dca-31c7-ab4b-cdacf7e6c44b, name: TailToSplit)", BaseSchema.IT_WAS_NOT_FOUND_AND_IT_IS_REQUIRED),
validationIssues.get(1));
assertEquals(ConfigSchemaV1.CONNECTION_WITH_NAME + connection.get(NAME_KEY) + ConfigSchemaV1.HAS_INVALID_DESTINATION_NAME + fakeDestination, validationIssues.get(2));
assertEquals(ConfigSchemaV1.CONNECTION_WITH_NAME + connection.get(NAME_KEY) + ConfigSchemaV1.HAS_INVALID_SOURCE_NAME + fakeSource, validationIssues.get(3));
@@ -79,18 +82,18 @@ public class ConfigSchemaV1Test {
@Test
public void testGetUniqueIdConflicts() {
- Map<String, Integer> ids = new HashMap<>();
- assertEquals("test_id", ConfigSchemaV1.getUniqueId(ids, "test/id"));
- assertEquals("test_id_2", ConfigSchemaV1.getUniqueId(ids, "test$id"));
- assertEquals("test_id_3", ConfigSchemaV1.getUniqueId(ids, "test$id"));
- assertEquals("test_id_4", ConfigSchemaV1.getUniqueId(ids, "test$id"));
- assertEquals("test_id_5", ConfigSchemaV1.getUniqueId(ids, "test$id"));
- assertEquals("test_id_2_2", ConfigSchemaV1.getUniqueId(ids, "test_id_2"));
+ Set<UUID> ids = new HashSet<>();
+ assertEquals("56e7ae5d-aae1-351e-bca9-cdc4446c6386", ConfigSchemaV1.getUniqueId(ids, "test/id"));
+ assertEquals("348c4f93-cd15-3d91-82f2-bfe5d43834d8", ConfigSchemaV1.getUniqueId(ids, "test$id"));
+ assertEquals("348c4f93-cd15-3d91-82f2-bfe5d43834d9", ConfigSchemaV1.getUniqueId(ids, "test$id"));
+ assertEquals("348c4f93-cd15-3d91-82f2-bfe5d43834da", ConfigSchemaV1.getUniqueId(ids, "test$id"));
+ assertEquals("348c4f93-cd15-3d91-82f2-bfe5d43834db", ConfigSchemaV1.getUniqueId(ids, "test$id"));
+ assertEquals("697487ff-979c-342d-9aab-5c710ae43a28", ConfigSchemaV1.getUniqueId(ids, "test_id_2"));
}
@Test
public void testGetUniqueIdEmptySet() {
String testId = "testId";
- assertEquals(testId + "___", ConfigSchemaV1.getUniqueId(new HashMap<>(), testId + "/ $"));
+ assertEquals("17841b04-ce22-34a3-9603-d95ec31d02dc", ConfigSchemaV1.getUniqueId(new HashSet<>(), testId + "/ $"));
}
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/v1/ConnectionSchemaV1Test.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/v1/ConnectionSchemaV1Test.java b/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/v1/ConnectionSchemaV1Test.java
index 28b000c..50180dd 100644
--- a/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/v1/ConnectionSchemaV1Test.java
+++ b/minifi-commons/minifi-commons-schema/src/test/java/org/apache/nifi/minifi/commons/schema/v1/ConnectionSchemaV1Test.java
@@ -183,10 +183,10 @@ public class ConnectionSchemaV1Test {
assertEquals(5, connections.size());
// Generated unique ids
- assertEquals("test", connections.get(0).getId());
- assertEquals("test_2", connections.get(1).getId());
- assertEquals("test_2_2", connections.get(2).getId());
- assertEquals("test_3", connections.get(3).getId());
- assertEquals("test_2_3", connections.get(4).getId());
+ assertEquals("098f6bcd-4621-3373-8ade-4e832627b4f6", connections.get(0).getId());
+ assertEquals("098f6bcd-4621-3373-8ade-4e832627b4f7", connections.get(1).getId());
+ assertEquals("b9dacbc6-7962-39a9-9e45-394e2cf0dbf6", connections.get(2).getId());
+ assertEquals("098f6bcd-4621-3373-8ade-4e832627b4f8", connections.get(3).getId());
+ assertEquals("b9dacbc6-7962-39a9-9e45-394e2cf0dbf7", connections.get(4).getId());
}
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-commons/minifi-commons-schema/src/test/resources/config-minimal-v2.yml
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/test/resources/config-minimal-v2.yml b/minifi-commons/minifi-commons-schema/src/test/resources/config-minimal-v2.yml
index 2472a32..8047741 100644
--- a/minifi-commons/minifi-commons-schema/src/test/resources/config-minimal-v2.yml
+++ b/minifi-commons/minifi-commons-schema/src/test/resources/config-minimal-v2.yml
@@ -20,19 +20,19 @@ Flow Controller:
# When running the Flow (not just doing the transform) these processors will be invalid due to not having the necesary properties/auto-terminated relationships
Processors:
- - id: bcd
+ - id: d4b7c284-882c-39e2-88bb-65e8abd5f4c8
class: org.apache.nifi.processors.standard.TailFile
scheduling strategy: TIMER_DRIVEN
scheduling period: 10 sec
- - id: cde
+ - id: a256e6b3-36af-3c38-8564-789c399b516c
class: org.apache.nifi.processors.standard.PutFile
max concurrent tasks: 1
scheduling strategy: TIMER_DRIVEN
scheduling period: 0 sec
Connections:
- - id: abc
- source id: bcd
+ - id: 90015098-3cd2-3fb0-9696-3f7d28e17f72
+ source id: d4b7c284-882c-39e2-88bb-65e8abd5f4c8
source relationship names:
- success
- destination id: cde
+ destination id: a256e6b3-36af-3c38-8564-789c399b516c
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml b/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml
index ea7bcd8..cb4793c 100644
--- a/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml
+++ b/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml
@@ -23,6 +23,7 @@
</parent>
<groupId>org.apache.nifi.minifi</groupId>
<artifactId>minifi-standard-services-api-nar</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
<packaging>nar</packaging>
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-nar-bundles/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/pom.xml b/minifi-nar-bundles/pom.xml
index a02b75b..e60b8d7 100644
--- a/minifi-nar-bundles/pom.xml
+++ b/minifi-nar-bundles/pom.xml
@@ -27,8 +27,8 @@
<module>minifi-framework-bundle</module>
<module>minifi-provenance-repository-bundle</module>
<module>minifi-update-attribute-nar</module>
- <module>minifi-standard-nar</module>
<module>minifi-standard-services-api-nar</module>
+ <module>minifi-standard-nar</module>
<module>minifi-ssl-context-service-nar</module>
</modules>
</project>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/BaseSchemaTester.java
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/BaseSchemaTester.java b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/BaseSchemaTester.java
index 6ad7e03..96b0e3e 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/BaseSchemaTester.java
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/BaseSchemaTester.java
@@ -22,6 +22,7 @@ import org.junit.Test;
import java.util.Map;
import java.util.function.Function;
+import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
@@ -43,7 +44,7 @@ public abstract class BaseSchemaTester<Schema extends WritableSchema, DTO> {
assertEquals(dtoSchema.getValidationIssues(), mapSchema.getValidationIssues());
assertSchemaEquals(dtoSchema, mapSchemaFunction.apply(dtoSchema.toMap()));
assertSchemaEquals(mapSchema, mapSchemaFunction.apply(mapSchema.toMap()));
- assertEquals(validationErrors, dtoSchema.getValidationIssues().size());
+ assertEquals(dtoSchema.getValidationIssues().stream().collect(Collectors.joining(", ")), validationErrors, dtoSchema.getValidationIssues().size());
}
public abstract void assertSchemaEquals(Schema one, Schema two);
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/ConnectionSchemaTest.java
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/ConnectionSchemaTest.java b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/ConnectionSchemaTest.java
index 6aa77fb..051c4a7 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/ConnectionSchemaTest.java
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/ConnectionSchemaTest.java
@@ -25,17 +25,19 @@ import org.apache.nifi.web.api.dto.ConnectionDTO;
import org.junit.Before;
import org.junit.Test;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
+import java.util.UUID;
import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
public class ConnectionSchemaTest extends BaseSchemaTester<ConnectionSchema, ConnectionDTO> {
- private final String testId = "testId";
+ private final String testId = UUID.nameUUIDFromBytes("testId".getBytes(StandardCharsets.UTF_8)).toString();
private final String testName = "testName";
private final String testSourceId = "testSourceId";
private final String testSelectedRelationship = "testSelectedRelationship";
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/PortSchemaFunctionTest.java
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/PortSchemaFunctionTest.java b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/PortSchemaFunctionTest.java
index 05c83cb..12a7151 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/PortSchemaFunctionTest.java
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/PortSchemaFunctionTest.java
@@ -24,6 +24,9 @@ import org.apache.nifi.web.api.dto.PortDTO;
import org.junit.Before;
import org.junit.Test;
+import java.nio.charset.StandardCharsets;
+import java.util.UUID;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -37,7 +40,7 @@ public class PortSchemaFunctionTest {
@Before
public void setup() {
- testId = "testId";
+ testId = UUID.nameUUIDFromBytes("testId".getBytes(StandardCharsets.UTF_8)).toString();
testName = "testName";
testWrapperName = "testWrapperName";
portDTO = new PortDTO();
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/ProcessorSchemaTest.java
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/ProcessorSchemaTest.java b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/ProcessorSchemaTest.java
index f98afe3..719c89a 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/ProcessorSchemaTest.java
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/ProcessorSchemaTest.java
@@ -26,15 +26,17 @@ import org.apache.nifi.web.api.dto.RelationshipDTO;
import org.junit.Before;
import org.junit.Test;
+import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
+import java.util.UUID;
import static org.junit.Assert.assertEquals;
public class ProcessorSchemaTest extends BaseSchemaTester<ProcessorSchema, ProcessorDTO> {
private final String testName = "testName";
- private final String testId = "testId";
+ private final String testId = UUID.nameUUIDFromBytes("testId".getBytes(StandardCharsets.UTF_8)).toString();
private final String testProcessorClass = "testProcessorClass";
private final String testSchedulingStrategy = SchedulingStrategy.PRIMARY_NODE_ONLY.name();
private final String testSchedulingPeriod = "10 s";
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteInputPortSchemaTest.java
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteInputPortSchemaTest.java b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteInputPortSchemaTest.java
index 00f3348..94b5beb 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteInputPortSchemaTest.java
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteInputPortSchemaTest.java
@@ -23,13 +23,15 @@ import org.apache.nifi.web.api.dto.RemoteProcessGroupPortDTO;
import org.junit.Before;
import org.junit.Test;
+import java.nio.charset.StandardCharsets;
import java.util.HashMap;
+import java.util.UUID;
import static org.junit.Assert.assertEquals;
public class RemoteInputPortSchemaTest extends BaseSchemaTester<RemoteInputPortSchema, RemoteProcessGroupPortDTO> {
- private String testId = "testId";
+ private String testId = UUID.nameUUIDFromBytes("testId".getBytes(StandardCharsets.UTF_8)).toString();
private String testName = "testName";
private String testComment = "testComment";
private int testMaxConcurrentTasks = 111;
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/00d6ac03/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/config.yml
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/config.yml b/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/config.yml
index 64a28fe..dab1e8e 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/config.yml
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/config.yml
@@ -56,7 +56,7 @@ Security Properties:
algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL
provider: BC
Processors:
-- id: TailFile
+- id: 94b8e610-b4ed-3ec9-b26f-c839931bf3e2
name: TailFile
class: org.apache.nifi.processors.standard.TailFile
max concurrent tasks: 1
@@ -71,9 +71,9 @@ Processors:
Initial Start Position: Beginning of File
Rolling Filename Pattern: minifi-app*
Connections:
-- id: TailToS2S
+- id: f6cef9b0-8982-391c-8d70-76f33917ac12
name: TailToS2S
- source id: TailFile
+ source id: 94b8e610-b4ed-3ec9-b26f-c839931bf3e2
source relationship names:
- success
destination id: 8644cbcc-a45c-40e0-964d-5e536e2ada61
[6/6] nifi-minifi git commit: MINIFI-115: Providing handling of ID
for Remote Process Groups to use the generated approach created for other
components and introducing a RemoteProcessingGroupSchemaV1. Corrected typos,
adjusted ProvenanceReportingTask to
Posted by jp...@apache.org.
MINIFI-115: Providing handling of ID for Remote Process Groups to use the generated approach created for other components and introducing a RemoteProcessingGroupSchemaV1. Corrected typos, adjusted ProvenanceReportingTask to be the bundled NiFi class, and updating specified NiFi version for the ConfigTransformer.
This closes #43
Signed-off-by: Joseph Percivall <JP...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi/commit/aeea72b7
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi/tree/aeea72b7
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi/diff/aeea72b7
Branch: refs/heads/master
Commit: aeea72b712149d515d915de2ee617a81c15c4f90
Parents: 00d6ac0
Author: Aldrin Piri <al...@apache.org>
Authored: Fri Nov 18 14:02:31 2016 -0500
Committer: Joseph Percivall <JP...@apache.org>
Committed: Sun Nov 27 12:53:45 2016 -0500
----------------------------------------------------------------------
minifi-assembly/pom.xml | 17 +++
.../bootstrap/util/ConfigTransformer.java | 9 +-
.../bootstrap/util/ParentGroupIdResolver.java | 2 +-
.../bootstrap/util/ConfigTransformerTest.java | 2 +-
.../util/ParentGroupIdResolverTest.java | 7 +-
minifi-bootstrap/src/test/resources/config.yml | 3 +-
.../schema/RemoteProcessingGroupSchema.java | 20 +---
.../commons/schema/common/BaseSchemaWithId.java | 2 +-
.../schema/common/BaseSchemaWithIdAndName.java | 2 +-
.../commons/schema/v1/ConfigSchemaV1.java | 21 +++-
.../v1/RemoteProcessingGroupSchemaV1.java | 107 +++++++++++++++++++
.../minifi-framework-nar/pom.xml | 20 ++++
.../minifi-provenance-reporting-nar/pom.xml | 84 +++++++++++++++
.../minifi-provenance-reporting-bundle/pom.xml | 31 ++++++
.../minifi-ssl-context-service-nar/pom.xml | 20 ++++
.../minifi-standard-services-api-nar/pom.xml | 15 +++
minifi-nar-bundles/pom.xml | 1 +
.../toolkit/configuration/ConfigMain.java | 3 -
.../RemoteProcessingGroupSchemaFunction.java | 1 +
.../toolkit/configuration/ConfigMainTest.java | 2 +-
.../dto/RemoteProcessingGroupSchemaTest.java | 13 ++-
.../InvokeHttpMiNiFiTemplateTest-v1.yml | 2 +-
.../resources/InvokeHttpMiNiFiTemplateTest.xml | 6 +-
.../resources/InvokeHttpMiNiFiTemplateTest.yml | 3 +-
.../ProcessGroupsAndRemoteProcessGroups.yml | 6 +-
.../src/test/resources/config.yml | 3 +-
pom.xml | 25 +++++
27 files changed, 384 insertions(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-assembly/pom.xml b/minifi-assembly/pom.xml
index 89ed9e4..6827110 100644
--- a/minifi-assembly/pom.xml
+++ b/minifi-assembly/pom.xml
@@ -135,6 +135,12 @@ limitations under the License.
<artifactId>minifi-update-attribute-nar</artifactId>
<type>nar</type>
</dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-provenance-reporting-nar</artifactId>
+ <type>nar</type>
+ <version>0.1.0-SNAPSHOT</version>
+ </dependency>
<!-- MiNiFi NiFi Dependencies -->
<dependency>
@@ -181,6 +187,12 @@ limitations under the License.
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-persistent-provenance-repository</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-site-to-site-reporting-task</artifactId>
+ <version>1.0.0</version>
+ <scope>compile</scope>
+ </dependency>
<!-- Provided in NiFi so must include here too -->
<dependency>
@@ -189,6 +201,11 @@ limitations under the License.
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpkix-jdk15on</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<scope>compile</scope>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformer.java
----------------------------------------------------------------------
diff --git a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformer.java b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformer.java
index da707b9..98fccb5 100644
--- a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformer.java
+++ b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformer.java
@@ -78,8 +78,9 @@ import java.util.zip.GZIPOutputStream;
public final class ConfigTransformer {
// Underlying version of NIFI will be using
- public static final String NIFI_VERSION = "0.6.1";
+ public static final String NIFI_VERSION = "1.0.0";
public static final String ROOT_GROUP = "Root-Group";
+ public static final String DEFAULT_PROV_REPORTING_TASK_CLASS = "org.apache.nifi.reporting.SiteToSiteProvenanceReportingTask";
// Final util classes should have private constructor
private ConfigTransformer() {
@@ -471,7 +472,7 @@ public final class ConfigTransformer {
addTextElement(taskElement, "id", "Provenance-Reporting");
addTextElement(taskElement, "name", "Site-To-Site-Provenance-Reporting");
addTextElement(taskElement, "comment", provenanceProperties.getComment());
- addTextElement(taskElement, "class", "org.apache.nifi.minifi.provenance.reporting.ProvenanceReportingTask");
+ addTextElement(taskElement, "class", DEFAULT_PROV_REPORTING_TASK_CLASS);
addTextElement(taskElement, "schedulingPeriod", provenanceProperties.getSchedulingPeriod());
addTextElement(taskElement, "scheduledState", "RUNNING");
addTextElement(taskElement, "schedulingStrategy", provenanceProperties.getSchedulingStrategy());
@@ -479,7 +480,7 @@ public final class ConfigTransformer {
Map<String, Object> attributes = new HashMap<>();
attributes.put("Destination URL", provenanceProperties.getDestinationUrl());
attributes.put("Input Port Name", provenanceProperties.getPortName());
- attributes.put("MiNiFi URL", provenanceProperties.getOriginatingUrl());
+ attributes.put("Instance URL", provenanceProperties.getOriginatingUrl());
attributes.put("Compress Events", provenanceProperties.getUseCompression());
attributes.put("Batch Size", provenanceProperties.getBatchSize());
attributes.put("Communications Timeout", provenanceProperties.getTimeout());
@@ -524,7 +525,7 @@ public final class ConfigTransformer {
final Document doc = parentElement.getOwnerDocument();
final Element element = doc.createElement("remoteProcessGroup");
parentElement.appendChild(element);
- addTextElement(element, "id", remoteProcessingGroupProperties.getName());
+ addTextElement(element, "id", remoteProcessingGroupProperties.getId());
addTextElement(element, "name", remoteProcessingGroupProperties.getName());
addPosition(element);
addTextElement(element, "comment", remoteProcessingGroupProperties.getComment());
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ParentGroupIdResolver.java
----------------------------------------------------------------------
diff --git a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ParentGroupIdResolver.java b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ParentGroupIdResolver.java
index 05aa27d..0d75823 100644
--- a/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ParentGroupIdResolver.java
+++ b/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ParentGroupIdResolver.java
@@ -65,7 +65,7 @@ public class ParentGroupIdResolver {
protected static void getRemoteInputPortParentIdMap(ProcessGroupSchema processGroupSchema, Map<String, String> output) {
for (RemoteProcessingGroupSchema remoteProcessingGroupSchema : processGroupSchema.getRemoteProcessingGroups()) {
for (RemoteInputPortSchema remoteInputPortSchema : remoteProcessingGroupSchema.getInputPorts()) {
- output.put(remoteInputPortSchema.getId(), remoteProcessingGroupSchema.getName());
+ output.put(remoteInputPortSchema.getId(), remoteProcessingGroupSchema.getId());
}
}
processGroupSchema.getProcessGroupSchemas().forEach(p -> getRemoteInputPortParentIdMap(p, output));
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformerTest.java
----------------------------------------------------------------------
diff --git a/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformerTest.java b/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformerTest.java
index 6c2ed78..4aff488 100644
--- a/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformerTest.java
+++ b/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformerTest.java
@@ -193,7 +193,7 @@ public class ConfigTransformerTest {
}
private void testRemoteProcessGroups(Element element, RemoteProcessingGroupSchema remoteProcessingGroupSchema) throws XPathExpressionException {
- assertEquals(remoteProcessingGroupSchema.getName(), getText(element, "id"));
+ assertEquals(remoteProcessingGroupSchema.getId(), getText(element, "id"));
assertEquals(remoteProcessingGroupSchema.getName(), getText(element, "name"));
assertEquals(remoteProcessingGroupSchema.getComment(), getText(element, "comment"));
assertEquals(remoteProcessingGroupSchema.getUrl(), getText(element, "url"));
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/ParentGroupIdResolverTest.java
----------------------------------------------------------------------
diff --git a/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/ParentGroupIdResolverTest.java b/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/ParentGroupIdResolverTest.java
index c67d250..424c0fc 100644
--- a/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/ParentGroupIdResolverTest.java
+++ b/minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/util/ParentGroupIdResolverTest.java
@@ -41,16 +41,18 @@ public class ParentGroupIdResolverTest {
configLines.add("MiNiFi Config Version: 2");
configLines.add("Remote Processing Groups:");
configLines.add("- name: rpgOne");
+ configLines.add(" id: rpgOneId");
configLines.add(" Input Ports:");
configLines.add(" - id: one");
configLines.add("Process Groups:");
configLines.add("- Remote Processing Groups:");
configLines.add(" - name: rpgTwo");
+ configLines.add(" id: rpgTwoId");
configLines.add(" Input Ports:");
configLines.add(" - id: two");
ParentGroupIdResolver parentGroupIdResolver = createParentGroupIdResolver(configLines);
- assertEquals("rpgOne", parentGroupIdResolver.getRemoteInputPortParentId("one"));
- assertEquals("rpgTwo", parentGroupIdResolver.getRemoteInputPortParentId("two"));
+ assertEquals("rpgOneId", parentGroupIdResolver.getRemoteInputPortParentId("one"));
+ assertEquals("rpgTwoId", parentGroupIdResolver.getRemoteInputPortParentId("two"));
assertNull(parentGroupIdResolver.getInputPortParentId("one"));
assertNull(parentGroupIdResolver.getInputPortParentId("two"));
assertNull(parentGroupIdResolver.getOutputPortParentId("one"));
@@ -132,6 +134,7 @@ public class ParentGroupIdResolverTest {
@Test
public void testFunnelParentId() throws IOException, SchemaLoaderException {
+ StringBuilder sb = new StringBuilder();
List<String> configLines = new ArrayList<>();
configLines.add("MiNiFi Config Version: 2");
configLines.add("Funnels:");
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-bootstrap/src/test/resources/config.yml
----------------------------------------------------------------------
diff --git a/minifi-bootstrap/src/test/resources/config.yml b/minifi-bootstrap/src/test/resources/config.yml
index dab1e8e..46b3674 100644
--- a/minifi-bootstrap/src/test/resources/config.yml
+++ b/minifi-bootstrap/src/test/resources/config.yml
@@ -82,7 +82,8 @@ Connections:
flowfile expiration: 60 sec
queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer
Remote Processing Groups:
-- name: NiFi Flow
+- id: 8644cbcc-a45c-40e0-964d-4d243afcbbb2
+ name: NiFi Flow
url: https://localhost:8090/nifi
comment: ''
timeout: 30 secs
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/RemoteProcessingGroupSchema.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/RemoteProcessingGroupSchema.java b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/RemoteProcessingGroupSchema.java
index 6d2bb20..44109de 100644
--- a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/RemoteProcessingGroupSchema.java
+++ b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/RemoteProcessingGroupSchema.java
@@ -17,20 +17,16 @@
package org.apache.nifi.minifi.commons.schema;
-import org.apache.nifi.minifi.commons.schema.common.BaseSchema;
-import org.apache.nifi.minifi.commons.schema.common.StringUtil;
-import org.apache.nifi.minifi.commons.schema.common.WritableSchema;
+import org.apache.nifi.minifi.commons.schema.common.BaseSchemaWithIdAndName;
import java.util.List;
import java.util.Map;
import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.COMMENT_KEY;
import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.INPUT_PORTS_KEY;
-import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.NAME_KEY;
-import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.REMOTE_PROCESSING_GROUPS_KEY;
import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.YIELD_PERIOD_KEY;
-public class RemoteProcessingGroupSchema extends BaseSchema implements WritableSchema {
+public class RemoteProcessingGroupSchema extends BaseSchemaWithIdAndName {
public static final String URL_KEY = "url";
public static final String TIMEOUT_KEY = "timeout";
@@ -38,7 +34,6 @@ public class RemoteProcessingGroupSchema extends BaseSchema implements WritableS
public static final String DEFAULT_TIMEOUT = "30 secs";
public static final String DEFAULT_YIELD_PERIOD = "10 sec";
- private String name;
private String url;
private List<RemoteInputPortSchema> inputPorts;
@@ -47,8 +42,8 @@ public class RemoteProcessingGroupSchema extends BaseSchema implements WritableS
private String yieldPeriod = DEFAULT_YIELD_PERIOD;
public RemoteProcessingGroupSchema(Map map) {
- name = getRequiredKeyAsType(map, NAME_KEY, String.class, REMOTE_PROCESSING_GROUPS_KEY);
- String wrapperName = new StringBuilder("RemoteProcessingGroup(name: ").append(StringUtil.isNullOrEmpty(name) ? "unknown" : name).append(")").toString();
+ super(map, "RemoteProcessingGroup(id: {id}, name: {name})");
+ String wrapperName = getWrapperName();
url = getRequiredKeyAsType(map, URL_KEY, String.class, wrapperName);
inputPorts = convertListToType(getRequiredKeyAsType(map, INPUT_PORTS_KEY, List.class, wrapperName), "input port", RemoteInputPortSchema.class, INPUT_PORTS_KEY);
if (inputPorts != null) {
@@ -64,8 +59,7 @@ public class RemoteProcessingGroupSchema extends BaseSchema implements WritableS
@Override
public Map<String, Object> toMap() {
- Map<String, Object> result = mapSupplier.get();
- result.put(NAME_KEY, name);
+ Map<String, Object> result = super.toMap();
result.put(URL_KEY, url);
result.put(COMMENT_KEY, comment);
result.put(TIMEOUT_KEY, timeout);
@@ -74,10 +68,6 @@ public class RemoteProcessingGroupSchema extends BaseSchema implements WritableS
return result;
}
- public String getName() {
- return name;
- }
-
public String getComment() {
return comment;
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithId.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithId.java b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithId.java
index 96dc4d7..bc6693e 100644
--- a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithId.java
+++ b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithId.java
@@ -47,7 +47,7 @@ public class BaseSchemaWithId extends BaseSchema implements WritableSchema {
}
public String getWrapperName() {
- return wrapperName.replace("{id}", StringUtil.isNullOrEmpty(id) ? "unkown" : id);
+ return wrapperName.replace("{id}", StringUtil.isNullOrEmpty(id) ? "unknown" : id);
}
@Override
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithIdAndName.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithIdAndName.java b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithIdAndName.java
index 71a4f41..5c9f8c7 100644
--- a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithIdAndName.java
+++ b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/common/BaseSchemaWithIdAndName.java
@@ -40,7 +40,7 @@ public abstract class BaseSchemaWithIdAndName extends BaseSchemaWithId implement
}
public String getWrapperName() {
- return super.getWrapperName().replace("{name}", StringUtil.isNullOrEmpty(name) ? "unkown" : name);
+ return super.getWrapperName().replace("{name}", StringUtil.isNullOrEmpty(name) ? "unknown" : name);
}
@Override
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1.java b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1.java
index 49dc087..526c92b 100644
--- a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1.java
+++ b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/ConfigSchemaV1.java
@@ -77,7 +77,7 @@ public class ConfigSchemaV1 extends BaseSchema implements ConvertableSchema<Conf
private SecurityPropertiesSchema securityProperties;
private List<ProcessorSchemaV1> processors;
private List<ConnectionSchemaV1> connections;
- private List<RemoteProcessingGroupSchema> remoteProcessingGroups;
+ private List<RemoteProcessingGroupSchemaV1> remoteProcessingGroups;
private ProvenanceReportingSchema provenanceReportingProperties;
private ProvenanceRepositorySchema provenanceRepositorySchema;
@@ -95,7 +95,7 @@ public class ConfigSchemaV1 extends BaseSchema implements ConvertableSchema<Conf
processors = convertListToType(getOptionalKeyAsType(map, PROCESSORS_KEY, List.class, TOP_LEVEL_NAME, new ArrayList<>()), PROCESSORS_KEY, ProcessorSchemaV1.class, TOP_LEVEL_NAME);
remoteProcessingGroups = convertListToType(getOptionalKeyAsType(map, REMOTE_PROCESSING_GROUPS_KEY, List.class, TOP_LEVEL_NAME, new ArrayList<>()), "remote processing group",
- RemoteProcessingGroupSchema.class, REMOTE_PROCESSING_GROUPS_KEY);
+ RemoteProcessingGroupSchemaV1.class, REMOTE_PROCESSING_GROUPS_KEY);
connections = convertListToType(getOptionalKeyAsType(map, CONNECTIONS_KEY, List.class, TOP_LEVEL_NAME, new ArrayList<>()), CONNECTIONS_KEY, ConnectionSchemaV1.class, TOP_LEVEL_NAME);
@@ -117,7 +117,7 @@ public class ConfigSchemaV1 extends BaseSchema implements ConvertableSchema<Conf
checkForDuplicates(this::addValidationIssue, FOUND_THE_FOLLOWING_DUPLICATE_PROCESSOR_NAMES, processorNames);
checkForDuplicates(this::addValidationIssue, FOUND_THE_FOLLOWING_DUPLICATE_CONNECTION_NAMES, connections.stream().map(ConnectionSchemaV1::getName).collect(Collectors.toList()));
- checkForDuplicates(this::addValidationIssue, FOUND_THE_FOLLOWING_DUPLICATE_REMOTE_PROCESSING_GROUP_NAMES, remoteProcessingGroups.stream().map(RemoteProcessingGroupSchema::getName)
+ checkForDuplicates(this::addValidationIssue, FOUND_THE_FOLLOWING_DUPLICATE_REMOTE_PROCESSING_GROUP_NAMES, remoteProcessingGroups.stream().map(RemoteProcessingGroupSchemaV1::getName)
.collect(Collectors.toList()));
Set<String> connectableNames = new HashSet<>(processorNames);
@@ -214,6 +214,19 @@ public class ConfigSchemaV1 extends BaseSchema implements ConvertableSchema<Conf
return connectionSchemas;
}
+ protected List<RemoteProcessingGroupSchema> getRemoteProcessingGroupSchemas() {
+ Set<UUID> ids = new HashSet<>();
+ List<RemoteProcessingGroupSchema> rpgSchemas= new ArrayList<>(remoteProcessingGroups.size());
+
+ for (RemoteProcessingGroupSchemaV1 rpg : remoteProcessingGroups) {
+ RemoteProcessingGroupSchema rpgSchema = rpg.convert();
+ rpgSchema.setId(getUniqueId(ids, rpgSchema.getName()));
+ rpgSchemas.add(rpgSchema);
+ }
+
+ return rpgSchemas;
+
+ }
@Override
public ConfigSchema convert() {
Map<String, Object> map = new HashMap<>();
@@ -229,7 +242,7 @@ public class ConfigSchemaV1 extends BaseSchema implements ConvertableSchema<Conf
putListIfNotNull(map, PROCESSORS_KEY, processorSchemas);
List<String> validationIssues = getValidationIssues();
putListIfNotNull(map, CONNECTIONS_KEY, getConnectionSchemas(processorSchemas, validationIssues));
- putListIfNotNull(map, REMOTE_PROCESSING_GROUPS_KEY, remoteProcessingGroups);
+ putListIfNotNull(map, REMOTE_PROCESSING_GROUPS_KEY, getRemoteProcessingGroupSchemas());
putIfNotNull(map, PROVENANCE_REPORTING_KEY, provenanceReportingProperties);
return new ConfigSchema(map, validationIssues);
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/RemoteProcessingGroupSchemaV1.java
----------------------------------------------------------------------
diff --git a/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/RemoteProcessingGroupSchemaV1.java b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/RemoteProcessingGroupSchemaV1.java
new file mode 100644
index 0000000..a6d2d62
--- /dev/null
+++ b/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1/RemoteProcessingGroupSchemaV1.java
@@ -0,0 +1,107 @@
+/*
+ * 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.minifi.commons.schema.v1;
+
+import org.apache.nifi.minifi.commons.schema.RemoteInputPortSchema;
+import org.apache.nifi.minifi.commons.schema.RemoteProcessingGroupSchema;
+import org.apache.nifi.minifi.commons.schema.common.BaseSchema;
+import org.apache.nifi.minifi.commons.schema.common.ConvertableSchema;
+import org.apache.nifi.minifi.commons.schema.common.StringUtil;
+
+import java.util.List;
+import java.util.Map;
+
+import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.COMMENT_KEY;
+import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.INPUT_PORTS_KEY;
+import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.NAME_KEY;
+import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.REMOTE_PROCESSING_GROUPS_KEY;
+import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.YIELD_PERIOD_KEY;
+
+public class RemoteProcessingGroupSchemaV1 extends BaseSchema implements ConvertableSchema<RemoteProcessingGroupSchema> {
+ public static final String URL_KEY = "url";
+ public static final String TIMEOUT_KEY = "timeout";
+
+ public static final String DEFAULT_COMMENT = "";
+ public static final String DEFAULT_TIMEOUT = "30 secs";
+ public static final String DEFAULT_YIELD_PERIOD = "10 sec";
+
+ private String name;
+ private String url;
+ private List<RemoteInputPortSchema> inputPorts;
+
+ private String comment = DEFAULT_COMMENT;
+ private String timeout = DEFAULT_TIMEOUT;
+ private String yieldPeriod = DEFAULT_YIELD_PERIOD;
+
+ public RemoteProcessingGroupSchemaV1(Map map) {
+ name = getRequiredKeyAsType(map, NAME_KEY, String.class, REMOTE_PROCESSING_GROUPS_KEY);
+ String wrapperName = new StringBuilder("RemoteProcessingGroup(name: ").append(StringUtil.isNullOrEmpty(name) ? "unknown" : name).append(")").toString();
+ url = getRequiredKeyAsType(map, URL_KEY, String.class, wrapperName);
+ inputPorts = convertListToType(getRequiredKeyAsType(map, INPUT_PORTS_KEY, List.class, wrapperName), "input port", RemoteInputPortSchema.class, INPUT_PORTS_KEY);
+ if (inputPorts != null) {
+ for (RemoteInputPortSchema remoteInputPortSchema : inputPorts) {
+ addIssuesIfNotNull(remoteInputPortSchema);
+ }
+ }
+
+ comment = getOptionalKeyAsType(map, COMMENT_KEY, String.class, wrapperName, DEFAULT_COMMENT);
+ timeout = getOptionalKeyAsType(map, TIMEOUT_KEY, String.class, wrapperName, DEFAULT_TIMEOUT);
+ yieldPeriod = getOptionalKeyAsType(map, YIELD_PERIOD_KEY, String.class, wrapperName, DEFAULT_YIELD_PERIOD);
+ }
+
+ @Override
+ public RemoteProcessingGroupSchema convert() {
+ Map<String, Object> result = mapSupplier.get();
+ result.put(NAME_KEY, name);
+ result.put(URL_KEY, url);
+ result.put(COMMENT_KEY, comment);
+ result.put(TIMEOUT_KEY, timeout);
+ result.put(YIELD_PERIOD_KEY, yieldPeriod);
+ putListIfNotNull(result, INPUT_PORTS_KEY, inputPorts);
+ return new RemoteProcessingGroupSchema(result);
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getComment() {
+ return comment;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public String getTimeout() {
+ return timeout;
+ }
+
+ public String getYieldPeriod() {
+ return yieldPeriod;
+ }
+
+ public List<RemoteInputPortSchema> getInputPorts() {
+ return inputPorts;
+ }
+
+ @Override
+ public int getVersion() {
+ return ConfigSchemaV1.CONFIG_VERSION;
+ }
+}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-nar-bundles/minifi-framework-bundle/minifi-framework-nar/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework-nar/pom.xml b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework-nar/pom.xml
index 3815952..fcfde24 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework-nar/pom.xml
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework-nar/pom.xml
@@ -98,5 +98,25 @@ limitations under the License.
<scope>compile</scope>
</dependency>
+ <!-- Provided dependencies from NiFi framework -->
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+
</dependencies>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-nar/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-nar/pom.xml b/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-nar/pom.xml
new file mode 100644
index 0000000..d353b91
--- /dev/null
+++ b/minifi-nar-bundles/minifi-provenance-reporting-bundle/minifi-provenance-reporting-nar/pom.xml
@@ -0,0 +1,84 @@
+<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/maven-v4_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.minifi</groupId>
+ <artifactId>minifi-provenance-reporting-bundle</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>minifi-provenance-reporting-nar</artifactId>
+ <packaging>nar</packaging>
+ <properties>
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ <source.skip>true</source.skip>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-site-to-site-reporting-task</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-standard-services-api-nar</artifactId>
+ <type>nar</type>
+ </dependency>
+
+ <!-- Provided dependencies -->
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore-nio</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-client-dto</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpasyncclient</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-nar-bundles/minifi-provenance-reporting-bundle/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-provenance-reporting-bundle/pom.xml b/minifi-nar-bundles/minifi-provenance-reporting-bundle/pom.xml
new file mode 100644
index 0000000..7863a15
--- /dev/null
+++ b/minifi-nar-bundles/minifi-provenance-reporting-bundle/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<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/maven-v4_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.minifi</groupId>
+ <artifactId>minifi-nar-bundles</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>minifi-provenance-reporting-bundle</artifactId>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>minifi-provenance-reporting-nar</module>
+ </modules>
+
+</project>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-nar-bundles/minifi-ssl-context-service-nar/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-ssl-context-service-nar/pom.xml b/minifi-nar-bundles/minifi-ssl-context-service-nar/pom.xml
index 35f27fa..91ee6af 100644
--- a/minifi-nar-bundles/minifi-ssl-context-service-nar/pom.xml
+++ b/minifi-nar-bundles/minifi-ssl-context-service-nar/pom.xml
@@ -57,5 +57,25 @@
</exclusion>
</exclusions>
</dependency>
+
+ <!-- Provided dependencies from NiFi framework -->
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml b/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml
index cb4793c..06b10c7 100644
--- a/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml
+++ b/minifi-nar-bundles/minifi-standard-services-api-nar/pom.xml
@@ -60,6 +60,7 @@
<artifactId>nifi-hbase-client-service-api</artifactId>
<scope>compile</scope>
</dependency>
+
<!-- Manage provided dependencies in lib -->
<dependency>
<groupId>org.bouncycastle</groupId>
@@ -76,5 +77,19 @@
<artifactId>bcpkix-jdk15on</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-nar-bundles/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/pom.xml b/minifi-nar-bundles/pom.xml
index e60b8d7..f2a1006 100644
--- a/minifi-nar-bundles/pom.xml
+++ b/minifi-nar-bundles/pom.xml
@@ -26,6 +26,7 @@
<modules>
<module>minifi-framework-bundle</module>
<module>minifi-provenance-repository-bundle</module>
+ <module>minifi-provenance-reporting-bundle</module>
<module>minifi-update-attribute-nar</module>
<module>minifi-standard-services-api-nar</module>
<module>minifi-standard-nar</module>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java b/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java
index 76d1a5f..2077f0b 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java
@@ -145,9 +145,6 @@ public class ConfigMain {
Set<RemoteProcessGroupDTO> remoteProcessGroups = getAll(allFlowSnippets, FlowSnippetDTO::getRemoteProcessGroups).collect(Collectors.toSet());
- // RPGs with no name get Target URI as name
- remoteProcessGroups.stream().filter(r -> StringUtil.isNullOrEmpty(r.getName())).forEach(r -> r.setName(r.getTargetUri()));
-
Map<String, String> connectableNameMap = getAll(allFlowSnippets, FlowSnippetDTO::getProcessors).collect(Collectors.toMap(ComponentDTO::getId, ProcessorDTO::getName));
for (RemoteProcessGroupDTO remoteProcessGroupDTO : remoteProcessGroups) {
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteProcessingGroupSchemaFunction.java
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteProcessingGroupSchemaFunction.java b/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteProcessingGroupSchemaFunction.java
index 2ad2e67..95b9ff9 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteProcessingGroupSchemaFunction.java
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteProcessingGroupSchemaFunction.java
@@ -40,6 +40,7 @@ public class RemoteProcessingGroupSchemaFunction implements Function<RemoteProce
@Override
public RemoteProcessingGroupSchema apply(RemoteProcessGroupDTO remoteProcessGroupDTO) {
Map<String, Object> map = new HashMap<>();
+ map.put(CommonPropertyKeys.ID_KEY, remoteProcessGroupDTO.getId());
map.put(CommonPropertyKeys.NAME_KEY, remoteProcessGroupDTO.getName());
map.put(RemoteProcessingGroupSchema.URL_KEY, remoteProcessGroupDTO.getTargetUri());
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMainTest.java
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMainTest.java b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMainTest.java
index 9f7559e..10f263e 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMainTest.java
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMainTest.java
@@ -346,7 +346,7 @@ public class ConfigMainTest {
Set<String> extraKeys = new HashSet<>(actual.keySet());
extraKeys.removeAll(expected.keySet());
for (String extraKey : extraKeys) {
- differences.add("Extra key: " + path + extraKey);
+ differences.add("Extra key: " + path + " " + extraKey);
}
}
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteProcessingGroupSchemaTest.java
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteProcessingGroupSchemaTest.java b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteProcessingGroupSchemaTest.java
index b12e16c..bcd0a77 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteProcessingGroupSchemaTest.java
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/java/org/apache/nifi/minifi/toolkit/configuration/dto/RemoteProcessingGroupSchemaTest.java
@@ -29,6 +29,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
+import java.util.UUID;
import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
@@ -37,6 +38,7 @@ import static org.junit.Assert.assertNull;
public class RemoteProcessingGroupSchemaTest extends BaseSchemaTester<RemoteProcessingGroupSchema, RemoteProcessGroupDTO> {
private final RemoteInputPortSchemaTest remoteInputPortSchemaTest;
+ private String testId = UUID.randomUUID().toString();
private String testName = "testName";
private String testUrl = "testUrl";
private String testComment = "testComment";
@@ -53,6 +55,7 @@ public class RemoteProcessingGroupSchemaTest extends BaseSchemaTester<RemoteProc
remoteInputPortSchemaTest.setup();
dto = new RemoteProcessGroupDTO();
+ dto.setId(testId);
dto.setName(testName);
dto.setTargetUri(testUrl);
@@ -66,6 +69,7 @@ public class RemoteProcessingGroupSchemaTest extends BaseSchemaTester<RemoteProc
map = new HashMap<>();
+ map.put(CommonPropertyKeys.ID_KEY, testId);
map.put(CommonPropertyKeys.NAME_KEY, testName);
map.put(RemoteProcessingGroupSchema.URL_KEY, testUrl);
map.put(CommonPropertyKeys.INPUT_PORTS_KEY, new ArrayList<>(Arrays.asList(remoteInputPortSchemaTest.map)));
@@ -75,10 +79,17 @@ public class RemoteProcessingGroupSchemaTest extends BaseSchemaTester<RemoteProc
}
@Test
+ public void testNoId() {
+ dto.setId(null);
+ map.remove(CommonPropertyKeys.ID_KEY);
+ assertDtoAndMapConstructorAreSame(1);
+ }
+
+ @Test
public void testNoName() {
dto.setName(null);
map.remove(CommonPropertyKeys.NAME_KEY);
- assertDtoAndMapConstructorAreSame(1);
+ assertDtoAndMapConstructorAreSame(0);
}
@Test
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest-v1.yml
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest-v1.yml b/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest-v1.yml
index 6a07ae4..3cc4ca7 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest-v1.yml
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest-v1.yml
@@ -249,7 +249,7 @@ Connections:
flowfile expiration: 0 sec
queue prioritizer class: org.apache.nifi.prioritizer.FirstInFirstOutPrioritizer
Remote Processing Groups:
-- name: http://nifi:8080/nifi
+- name: ''
url: http://nifi:8080/nifi
comment: ''
timeout: 30 sec
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest.xml
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest.xml b/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest.xml
index 38e5be2..99358ba 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest.xml
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest.xml
@@ -24,7 +24,7 @@ limitations under the License.
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
<backPressureObjectThreshold>10000</backPressureObjectThreshold>
<destination>
- <groupId>5b0a5c18-a02e-4a85-8080-0187ee679763</groupId>
+ <groupId>d41d8cd9-8f00-3204-a980-0998ecf8427e</groupId>
<id>b23a4621-cf19-42e6-967c-ffd3716e6a24</id>
<type>REMOTE_INPUT_PORT</type>
</destination>
@@ -216,7 +216,7 @@ limitations under the License.
<y>1567.7883365880348</y>
</bends>
<destination>
- <groupId>5b0a5c18-a02e-4a85-8080-0187ee679763</groupId>
+ <groupId>d41d8cd9-8f00-3204-a980-0998ecf8427e</groupId>
<id>b23a4621-cf19-42e6-967c-ffd3716e6a24</id>
<type>REMOTE_INPUT_PORT</type>
</destination>
@@ -620,7 +620,7 @@ limitations under the License.
<type>org.apache.nifi.processors.standard.InvokeHTTP</type>
</processors>
<remoteProcessGroups>
- <id>5b0a5c18-a02e-4a85-8080-0187ee679763</id>
+ <id>d41d8cd9-8f00-3204-a980-0998ecf8427e</id>
<parentGroupId>ee27ad42-d125-4d09-a9f5-c42da132ab6b</parentGroupId>
<position>
<x>636.0</x>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest.yml
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest.yml b/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest.yml
index b518f28..30e33f4 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest.yml
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/InvokeHttpMiNiFiTemplateTest.yml
@@ -282,7 +282,8 @@ Connections:
flowfile expiration: 0 sec
queue prioritizer class: org.apache.nifi.prioritizer.FirstInFirstOutPrioritizer
Remote Processing Groups:
-- name: http://nifi:8080/nifi
+- id: d41d8cd9-8f00-3204-a980-0998ecf8427e
+ name: ''
url: http://nifi:8080/nifi
comment: ''
timeout: 30 sec
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/ProcessGroupsAndRemoteProcessGroups.yml
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/ProcessGroupsAndRemoteProcessGroups.yml b/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/ProcessGroupsAndRemoteProcessGroups.yml
index 7783c53..064cd44 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/ProcessGroupsAndRemoteProcessGroups.yml
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/ProcessGroupsAndRemoteProcessGroups.yml
@@ -174,7 +174,8 @@ Process Groups:
flowfile expiration: 0 sec
queue prioritizer class: ''
Remote Processing Groups:
- - name: http://localhost:9091/nifi
+ - id: 21a651bb-0158-1000-0000-000000000000
+ name: ''
url: http://localhost:9091/nifi
comment: ''
timeout: 30 sec
@@ -232,7 +233,8 @@ Process Groups:
flowfile expiration: 0 sec
queue prioritizer class: ''
Remote Processing Groups:
- - name: http://localhost:9090/nifi
+ - id: 21a4e2f0-0158-1000-0000-000000000000
+ name: ''
url: http://localhost:9090/nifi
comment: ''
timeout: 30 sec
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/config.yml
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/config.yml b/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/config.yml
index dab1e8e..b6a4902 100644
--- a/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/config.yml
+++ b/minifi-toolkit/minifi-toolkit-configuration/src/test/resources/config.yml
@@ -82,7 +82,8 @@ Connections:
flowfile expiration: 60 sec
queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer
Remote Processing Groups:
-- name: NiFi Flow
+- id: 94b8e610-b4ed-3ec9-b26f-c839931bf3e3
+ name: NiFi Flow
url: https://localhost:8090/nifi
comment: ''
timeout: 30 secs
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/aeea72b7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d167191..02adbb8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -248,6 +248,11 @@ limitations under the License.
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ <version>${logback.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${logback.version}</version>
<scope>provided</scope>
@@ -581,6 +586,26 @@ limitations under the License.
<version>1.54</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore</artifactId>
+ <version>4.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore-nio</artifactId>
+ <version>4.4.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi</groupId>
+ <artifactId>nifi-client-dto</artifactId>
+ <version>${org.apache.nifi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpasyncclient</artifactId>
+ <version>4.1.1</version>
+ </dependency>
<!-- Test Dependencies -->
<dependency>