mirror of https://github.com/apache/nifi.git
Merge remote-tracking branch 'upstream/develop' into nifi-solr-bundle
Conflicts: nifi/nifi-assembly/pom.xml nifi/pom.xml
This commit is contained in:
commit
ba5bcba1b7
|
@ -15,142 +15,22 @@
|
||||||
-->
|
-->
|
||||||
<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">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache</groupId>
|
<groupId>org.apache.nifi</groupId>
|
||||||
<artifactId>apache</artifactId>
|
<artifactId>nifi-parent</artifactId>
|
||||||
<version>16</version>
|
<version>1.0.0-incubating-SNAPSHOT</version>
|
||||||
<relativePath />
|
<relativePath />
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.apache.nifi</groupId>
|
|
||||||
<artifactId>nifi-nar-maven-plugin</artifactId>
|
<artifactId>nifi-nar-maven-plugin</artifactId>
|
||||||
<version>1.0.1-incubating-SNAPSHOT</version>
|
<version>1.0.1-incubating-SNAPSHOT</version>
|
||||||
<packaging>maven-plugin</packaging>
|
<packaging>maven-plugin</packaging>
|
||||||
<description>Apache NiFi Nar Plugin. It is currently a part of the Apache Incubator.</description>
|
<description>Apache NiFi Nar Plugin. It is currently a part of the Apache Incubator.</description>
|
||||||
<url>http://nifi.incubator.apache.org</url>
|
|
||||||
<organization>
|
|
||||||
<name>Apache NiFi (incubating)</name>
|
|
||||||
<url>http://nifi.incubator.apache.org/</url>
|
|
||||||
</organization>
|
|
||||||
<licenses>
|
|
||||||
<license>
|
|
||||||
<name>Apache License, Version 2.0</name>
|
|
||||||
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
<mailingLists>
|
|
||||||
<mailingList>
|
|
||||||
<name>Dev</name>
|
|
||||||
<subscribe>dev-subscribe@nifi.incubator.apache.org</subscribe>
|
|
||||||
<unsubscribe>dev-unsubscribe@nifi.incubator.apache.org</unsubscribe>
|
|
||||||
<post>dev@nifi.incubator.apache.org</post>
|
|
||||||
<archive>http://mail-archives.apache.org/mod_mbox/incubator-nifi-dev</archive>
|
|
||||||
</mailingList>
|
|
||||||
<mailingList>
|
|
||||||
<name>Commits</name>
|
|
||||||
<subscribe>commits-subscribe@nifi.incubator.apache.org</subscribe>
|
|
||||||
<unsubscribe>commits-unsubscribe@nifi.incubator.apache.org</unsubscribe>
|
|
||||||
<post>commits@nifi.incubator.apache.org</post>
|
|
||||||
<archive>http://mail-archives.apache.org/mod_mbox/incubator-nifi-commits</archive>
|
|
||||||
</mailingList>
|
|
||||||
</mailingLists>
|
|
||||||
<scm>
|
|
||||||
<connection>scm:git:git://git.apache.org/incubator-nifi.git</connection>
|
|
||||||
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-nifi.git</developerConnection>
|
|
||||||
<url>https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git</url>
|
|
||||||
<tag>HEAD</tag>
|
|
||||||
</scm>
|
|
||||||
<issueManagement>
|
|
||||||
<system>JIRA</system>
|
|
||||||
<url>https://issues.apache.org/jira/browse/NIFI</url>
|
|
||||||
</issueManagement>
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.source>1.7</maven.compiler.source>
|
|
||||||
<maven.compiler.target>1.7</maven.compiler.target>
|
|
||||||
<maven.min-version>3.0.5</maven.min-version>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
||||||
</properties>
|
|
||||||
<prerequisites>
|
|
||||||
<maven>${maven.min-version}</maven>
|
|
||||||
</prerequisites>
|
|
||||||
<build>
|
<build>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.2</version>
|
|
||||||
<configuration>
|
|
||||||
<fork>true</fork>
|
|
||||||
<optimize>true</optimize>
|
|
||||||
<showDeprecation>true</showDeprecation>
|
|
||||||
<showWarnings>true</showWarnings>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
|
||||||
<version>2.7</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>2.18</version>
|
|
||||||
<configuration>
|
|
||||||
<argLine>-Xmx1G</argLine>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<version>2.5.2</version>
|
|
||||||
<configuration>
|
|
||||||
<tarLongFileMode>gnu</tarLongFileMode>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>2.4</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<version>3.4</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<version>1.3.2</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.10.1</version>
|
|
||||||
<configuration>
|
|
||||||
<failOnError>false</failOnError>
|
|
||||||
<quiet>true</quiet>
|
|
||||||
<show>private</show>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<quiet>true</quiet>
|
|
||||||
<javadocVersion>1.7</javadocVersion>
|
|
||||||
<additionalJOption>-J-Xmx512m</additionalJOption>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
<version>2.5.1</version>
|
|
||||||
<configuration>
|
|
||||||
<useReleaseProfile>true</useReleaseProfile>
|
|
||||||
<releaseProfiles>apache-release</releaseProfiles>
|
|
||||||
<autoVersionSubmodules>true</autoVersionSubmodules>
|
|
||||||
<goals>deploy</goals>
|
|
||||||
<tagNameFormat>@{project.artifactId}-@{project.version}</tagNameFormat>
|
|
||||||
<pushChanges>false</pushChanges>
|
|
||||||
<localCheckout>true</localCheckout>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>default</id>
|
<id>default</id>
|
||||||
|
@ -163,24 +43,9 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<version>2.5</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.sonatype.plugins</groupId>
|
|
||||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
|
||||||
<version>1.6.5</version>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
<configuration>
|
|
||||||
<serverId>repository.apache.org</serverId>
|
|
||||||
<nexusUrl>https://repository.apache.org/</nexusUrl>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-plugin-plugin</artifactId>
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
@ -201,20 +66,9 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
</plugins>
|
||||||
<groupId>org.apache.rat</groupId>
|
|
||||||
<artifactId>apache-rat-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<excludes>
|
|
||||||
<exclude>nb-configuration.xml</exclude> <!-- convenience exclude for netbeans users -->
|
|
||||||
<exclude>nbactions.xml</exclude> <!-- convenience excludes for netbeans users -->
|
|
||||||
<exclude>DEPENDENCIES</exclude> <!-- auto generated by maven while building sources zip and more -->
|
|
||||||
</excludes>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-plugin-api</artifactId>
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
|
@ -240,27 +94,4 @@
|
||||||
<version>3.3</version>
|
<version>3.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<!-- Automatically check for licenses.
|
|
||||||
Activate with -P check-licenses -->
|
|
||||||
<id>check-licenses</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.rat</groupId>
|
|
||||||
<artifactId>apache-rat-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>check</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>verify</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -290,8 +290,8 @@ public class NarMojo extends AbstractMojo {
|
||||||
*/
|
*/
|
||||||
@Parameter(property = "overWriteIfNewer", required = false, defaultValue = "true")
|
@Parameter(property = "overWriteIfNewer", required = false, defaultValue = "true")
|
||||||
protected boolean overWriteIfNewer;
|
protected boolean overWriteIfNewer;
|
||||||
|
|
||||||
@Parameter( property = "projectBuildDirectory", required = false, defaultValue = "${project.build.directory}")
|
@Parameter(property = "projectBuildDirectory", required = false, defaultValue = "${project.build.directory}")
|
||||||
protected File projectBuildDirectory;
|
protected File projectBuildDirectory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
Apache NiFi is an effort undergoing incubation at the Apache Software
|
||||||
|
Foundation (ASF), sponsored by the Apache Incubator PMC.
|
||||||
|
|
||||||
|
Incubation is required of all newly accepted projects until a further review
|
||||||
|
indicates that the infrastructure, communications, and decision making process
|
||||||
|
have stabilized in a manner consistent with other successful ASF projects.
|
||||||
|
|
||||||
|
While incubation status is not necessarily a reflection of the completeness
|
||||||
|
or stability of the code, it does indicate that the project has yet to be
|
||||||
|
fully endorsed by the ASF.
|
||||||
|
|
||||||
|
For more information about the incubation status of the Apache NiFi project
|
||||||
|
you can go to the following page:
|
||||||
|
|
||||||
|
http://nifi.incubator.apache.org/
|
|
@ -0,0 +1,202 @@
|
||||||
|
|
||||||
|
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.
|
|
@ -0,0 +1,5 @@
|
||||||
|
Apache NiFi
|
||||||
|
Copyright 2014-2015 The Apache Software Foundation
|
||||||
|
|
||||||
|
This product includes software developed at
|
||||||
|
The Apache Software Foundation (http://www.apache.org/).
|
|
@ -0,0 +1,65 @@
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
# Apache NiFi Parent
|
||||||
|
|
||||||
|
Apache NiFi Parent provides a nice aggregation of shared concerns for all NiFi Poms to follow
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [Getting Started](#getting-started)
|
||||||
|
- [License](#license)
|
||||||
|
- [Disclaimer](#disclaimer)
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
- Build the nifi-parent module. Then you can go to the 'nifi-nar-maven-plugin'
|
||||||
|
directory and follow its instructions and finally the 'nifi' directory. Building
|
||||||
|
the nifi-parent and nifi-nar-maven-plugin should be rarely necessary as these
|
||||||
|
will be released infrequently by comparison to the 'nifi' tree.
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
See http://nifi.incubator.apache.org/ for the latest documentation.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Except as otherwise noted this software is licensed under the
|
||||||
|
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## Disclaimer
|
||||||
|
|
||||||
|
Apache NiFi is an effort undergoing incubation at the Apache Software
|
||||||
|
Foundation (ASF), sponsored by the Apache Incubator PMC.
|
||||||
|
|
||||||
|
Incubation is required of all newly accepted projects until a further review
|
||||||
|
indicates that the infrastructure, communications, and decision making process
|
||||||
|
have stabilized in a manner consistent with other successful ASF projects.
|
||||||
|
|
||||||
|
While incubation status is not necessarily a reflection of the completeness
|
||||||
|
or stability of the code, it does indicate that the project has yet to be
|
||||||
|
fully endorsed by the ASF.
|
||||||
|
|
|
@ -0,0 +1,396 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache</groupId>
|
||||||
|
<artifactId>apache</artifactId>
|
||||||
|
<version>16</version>
|
||||||
|
<relativePath />
|
||||||
|
</parent>
|
||||||
|
<groupId>org.apache.nifi</groupId>
|
||||||
|
<artifactId>nifi-parent</artifactId>
|
||||||
|
<version>1.0.0-incubating-SNAPSHOT</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<description>The nifi-parent enables each apache nifi project to ensure consistent approaches and DRY</description>
|
||||||
|
<url>http://nifi.incubator.apache.org</url>
|
||||||
|
<organization>
|
||||||
|
<name>Apache NiFi(incubating) Project</name>
|
||||||
|
<url>http://nifi.incubator.apache.org/</url>
|
||||||
|
</organization>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Apache License, Version 2.0</name>
|
||||||
|
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
<mailingLists>
|
||||||
|
<mailingList>
|
||||||
|
<name>Dev</name>
|
||||||
|
<subscribe>dev-subscribe@nifi.incubator.apache.org</subscribe>
|
||||||
|
<unsubscribe>dev-unsubscribe@nifi.incubator.apache.org</unsubscribe>
|
||||||
|
<post>dev@nifi.incubator.apache.org</post>
|
||||||
|
<archive>http://mail-archives.apache.org/mod_mbox/incubator-nifi-dev</archive>
|
||||||
|
</mailingList>
|
||||||
|
<mailingList>
|
||||||
|
<name>Commits</name>
|
||||||
|
<subscribe>commits-subscribe@nifi.incubator.apache.org</subscribe>
|
||||||
|
<unsubscribe>commits-unsubscribe@nifi.incubator.apache.org</unsubscribe>
|
||||||
|
<post>commits@nifi.incubator.apache.org</post>
|
||||||
|
<archive>http://mail-archives.apache.org/mod_mbox/incubator-nifi-commits</archive>
|
||||||
|
</mailingList>
|
||||||
|
</mailingLists>
|
||||||
|
<prerequisites>
|
||||||
|
<maven>${maven.min-version}</maven>
|
||||||
|
</prerequisites>
|
||||||
|
<scm>
|
||||||
|
<connection>scm:git:git://git.apache.org/incubator-nifi.git</connection>
|
||||||
|
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-nifi.git</developerConnection>
|
||||||
|
<url>https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git</url>
|
||||||
|
<tag>HEAD</tag>
|
||||||
|
</scm>
|
||||||
|
<issueManagement>
|
||||||
|
<system>JIRA</system>
|
||||||
|
<url>https://issues.apache.org/jira/browse/NIFI</url>
|
||||||
|
</issueManagement>
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||||||
|
<maven.min-version>3.0.5</maven.min-version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<inceptionYear>2014</inceptionYear>
|
||||||
|
</properties>
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.2</version>
|
||||||
|
<configuration>
|
||||||
|
<fork>true</fork>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<showDeprecation>true</showDeprecation>
|
||||||
|
<showWarnings>true</showWarnings>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.7</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.18</version>
|
||||||
|
<configuration>
|
||||||
|
<redirectTestOutputToFile>true</redirectTestOutputToFile>
|
||||||
|
<argLine>-Xmx1G</argLine>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.5.2</version>
|
||||||
|
<configuration>
|
||||||
|
<tarLongFileMode>gnu</tarLongFileMode>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>jaxb2-maven-plugin</artifactId>
|
||||||
|
<version>1.6</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
|
<version>3.4</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.3.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.1</version>
|
||||||
|
<configuration>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<quiet>true</quiet>
|
||||||
|
<show>private</show>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<quiet>true</quiet>
|
||||||
|
<javadocVersion>1.7</javadocVersion>
|
||||||
|
<additionalJOption>-J-Xmx512m</additionalJOption>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
|
<version>2.5.1</version>
|
||||||
|
<configuration>
|
||||||
|
<useReleaseProfile>true</useReleaseProfile>
|
||||||
|
<releaseProfiles>apache-release</releaseProfiles>
|
||||||
|
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||||
|
<goals>deploy</goals>
|
||||||
|
<tagNameFormat>@{project.artifactId}-@{project.version}</tagNameFormat>
|
||||||
|
<pushChanges>false</pushChanges>
|
||||||
|
<localCheckout>true</localCheckout>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default</id>
|
||||||
|
<goals>
|
||||||
|
<goal>perform</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<pomFileName>nifi-parent/pom.xml</pomFileName>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>rpm-maven-plugin</artifactId>
|
||||||
|
<version>2.1.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.antlr</groupId>
|
||||||
|
<artifactId>antlr3-maven-plugin</artifactId>
|
||||||
|
<version>3.5.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||||
|
<version>2.15</version>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.puppycrawl.tools</groupId>
|
||||||
|
<artifactId>checkstyle</artifactId>
|
||||||
|
<version>6.5</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.sonatype.plugins</groupId>
|
||||||
|
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||||
|
<version>1.6.5</version>
|
||||||
|
<extensions>true</extensions>
|
||||||
|
<configuration>
|
||||||
|
<serverId>repository.apache.org</serverId>
|
||||||
|
<nexusUrl>https://repository.apache.org/</nexusUrl>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>enforce-maven</id>
|
||||||
|
<goals>
|
||||||
|
<goal>enforce</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<rules>
|
||||||
|
<requireSameVersions>
|
||||||
|
<plugins>
|
||||||
|
<plugin>org.apache.maven.plugins:maven-surefire-plugin</plugin>
|
||||||
|
<plugin>org.apache.maven.plugins:maven-failsafe-plugin</plugin>
|
||||||
|
<plugin>org.apache.maven.plugins:maven-surefire-report-plugin</plugin>
|
||||||
|
</plugins>
|
||||||
|
</requireSameVersions>
|
||||||
|
<requireMavenVersion>
|
||||||
|
<version>${maven.min-version}</version>
|
||||||
|
</requireMavenVersion>
|
||||||
|
</rules>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<checkstyleRules>
|
||||||
|
<module name="Checker">
|
||||||
|
<property name="charset" value="UTF-8" />
|
||||||
|
<property name="severity" value="warning" />
|
||||||
|
<!-- Checks for whitespace -->
|
||||||
|
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
|
||||||
|
<module name="FileTabCharacter">
|
||||||
|
<property name="eachLine" value="true" />
|
||||||
|
</module>
|
||||||
|
<module name="TreeWalker">
|
||||||
|
<module name="RegexpSinglelineJava">
|
||||||
|
<property name="format" value="\s+$" />
|
||||||
|
<property name="message" value="Line has trailing whitespace." />
|
||||||
|
</module>
|
||||||
|
<module name="RegexpSinglelineJava">
|
||||||
|
<property name="format" value="[@]see\s+[{][@]link" />
|
||||||
|
<property name="message" value="Javadoc @see does not need @link: pick one or the other." />
|
||||||
|
</module>
|
||||||
|
<module name="RegexpSinglelineJava">
|
||||||
|
<property name="format" value="jline[.]internal[.]Preconditions" />
|
||||||
|
<property name="message" value="Please use Guava Preconditions not JLine" />
|
||||||
|
</module>
|
||||||
|
<module name="OuterTypeFilename" />
|
||||||
|
<module name="LineLength">
|
||||||
|
<!-- needs extra, because Eclipse formatter ignores the ending left brace -->
|
||||||
|
<property name="max" value="200" />
|
||||||
|
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://" />
|
||||||
|
</module>
|
||||||
|
<module name="AvoidStarImport" />
|
||||||
|
<module name="UnusedImports">
|
||||||
|
<property name="processJavadoc" value="true" />
|
||||||
|
</module>
|
||||||
|
<module name="NoLineWrap" />
|
||||||
|
<module name="LeftCurly">
|
||||||
|
<property name="maxLineLength" value="160" />
|
||||||
|
</module>
|
||||||
|
<module name="RightCurly" />
|
||||||
|
<module name="RightCurly">
|
||||||
|
<property name="option" value="alone" />
|
||||||
|
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT" />
|
||||||
|
</module>
|
||||||
|
<module name="SeparatorWrap">
|
||||||
|
<property name="tokens" value="DOT" />
|
||||||
|
<property name="option" value="nl" />
|
||||||
|
</module>
|
||||||
|
<module name="SeparatorWrap">
|
||||||
|
<property name="tokens" value="COMMA" />
|
||||||
|
<property name="option" value="EOL" />
|
||||||
|
</module>
|
||||||
|
<module name="PackageName">
|
||||||
|
<property name="format" value="^[a-z]+(\.[a-z][a-zA-Z0-9]*)*$" />
|
||||||
|
</module>
|
||||||
|
<module name="MethodTypeParameterName">
|
||||||
|
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)" />
|
||||||
|
</module>
|
||||||
|
<module name="MethodParamPad" />
|
||||||
|
<module name="OperatorWrap">
|
||||||
|
<property name="option" value="NL" />
|
||||||
|
<property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, QUESTION, SL, SR, STAR " />
|
||||||
|
</module>
|
||||||
|
<module name="AnnotationLocation">
|
||||||
|
<property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF" />
|
||||||
|
</module>
|
||||||
|
<module name="AnnotationLocation">
|
||||||
|
<property name="tokens" value="VARIABLE_DEF" />
|
||||||
|
<property name="allowSamelineMultipleAnnotations" value="true" />
|
||||||
|
</module>
|
||||||
|
<module name="NonEmptyAtclauseDescription" />
|
||||||
|
<module name="JavadocMethod">
|
||||||
|
<property name="allowMissingJavadoc" value="true" />
|
||||||
|
<property name="allowMissingParamTags" value="true" />
|
||||||
|
<property name="allowMissingThrowsTags" value="true" />
|
||||||
|
<property name="allowMissingReturnTag" value="true" />
|
||||||
|
<property name="allowedAnnotations" value="Override,Test,BeforeClass,AfterClass,Before,After" />
|
||||||
|
<property name="allowThrowsTagsForSubclasses" value="true" />
|
||||||
|
</module>
|
||||||
|
<module name="SingleLineJavadoc" />
|
||||||
|
</module>
|
||||||
|
</module>
|
||||||
|
</checkstyleRules>
|
||||||
|
<violationSeverity>warning</violationSeverity>
|
||||||
|
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||||
|
<excludes>**/HelpMojo.java,**/generated-sources</excludes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.rat</groupId>
|
||||||
|
<artifactId>apache-rat-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>nb-configuration.xml</exclude> <!-- courtesy excludes for netbeans users -->
|
||||||
|
<exclude>nbactions.xml</exclude> <!-- courtesy excludes for netbeans users -->
|
||||||
|
<exclude>DEPENDENCIES</exclude> <!-- auto generated file by apache's maven config while building sources.zip -->
|
||||||
|
</excludes>
|
||||||
|
</configuration>
|
||||||
|
<dependencies>
|
||||||
|
<!-- workaround for RAT-158 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.doxia</groupId>
|
||||||
|
<artifactId>doxia-core</artifactId>
|
||||||
|
<version>1.6</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>xerces</groupId>
|
||||||
|
<artifactId>xercesImpl</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>check-licenses</id>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
<profiles>
|
||||||
|
<profile> <!-- will move this up with the always on plugins once we get all checkstyle stuff resolved-->
|
||||||
|
<id>checkstyle</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>false</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>check-style</id>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
</project>
|
22
nifi/LICENSE
22
nifi/LICENSE
|
@ -455,3 +455,25 @@ This product bundles 'json2.js' which is available in the 'public domain'.
|
||||||
This product bundles 'reset.css' which is available in the 'public domain'.
|
This product bundles 'reset.css' which is available in the 'public domain'.
|
||||||
For details see http://meyerweb.com/eric/tools/css/reset/
|
For details see http://meyerweb.com/eric/tools/css/reset/
|
||||||
|
|
||||||
|
This product bundles HexViewJS available under an MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Nick McVeity <nmcveity@gmail.com>
|
||||||
|
|
||||||
|
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.
|
|
@ -25,18 +25,13 @@ import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates that a component has more than one dynamic property
|
* Indicates that a component has more than one dynamic property
|
||||||
*
|
|
||||||
* @author
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ ElementType.TYPE })
|
@Target({ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Inherited
|
@Inherited
|
||||||
public @interface DynamicProperties {
|
public @interface DynamicProperties {
|
||||||
/**
|
|
||||||
* A list of the dynamic properties supported by a component
|
|
||||||
* @return A list of the dynamic properties supported by a component
|
|
||||||
*/
|
|
||||||
public DynamicProperty[] value();
|
public DynamicProperty[] value();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,40 +28,19 @@ import org.apache.nifi.components.ConfigurableComponent;
|
||||||
/**
|
/**
|
||||||
* An annotation that may be placed on a {@link ConfigurableComponent} to
|
* An annotation that may be placed on a {@link ConfigurableComponent} to
|
||||||
* indicate that it supports a dynamic property.
|
* indicate that it supports a dynamic property.
|
||||||
*
|
|
||||||
* @author
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ ElementType.TYPE })
|
@Target({ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Inherited
|
@Inherited
|
||||||
public @interface DynamicProperty {
|
public @interface DynamicProperty {
|
||||||
/**
|
|
||||||
* A description of what the name of the dynamic property may be
|
|
||||||
*
|
|
||||||
* @return A description of what the name of the dynamic property may be
|
|
||||||
*/
|
|
||||||
public String name();
|
public String name();
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicates whether or not the dynamic property supports expression
|
|
||||||
* language
|
|
||||||
*
|
|
||||||
* @return whether or not the dynamic property supports expression
|
|
||||||
* language
|
|
||||||
*/
|
|
||||||
public boolean supportsExpressionLanguage() default false;
|
public boolean supportsExpressionLanguage() default false;
|
||||||
|
|
||||||
/**
|
|
||||||
* A description of what the value of the dynamic property may be
|
|
||||||
* @return a description of what the value of the dynamic property may be
|
|
||||||
*/
|
|
||||||
public String value();
|
public String value();
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides a description of what the meaning of the property is, and what the expected values are
|
|
||||||
* @return a description of what the meaning of the property is, and what the expected values are
|
|
||||||
*/
|
|
||||||
public String description();
|
public String description();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,26 +31,15 @@ import org.apache.nifi.processor.Relationship;
|
||||||
* Annotation to indicate that a {@link Processor} supports dynamic
|
* Annotation to indicate that a {@link Processor} supports dynamic
|
||||||
* relationship. A dynamic {@link Relationship} is one where the relationship is
|
* relationship. A dynamic {@link Relationship} is one where the relationship is
|
||||||
* generated based on a user defined {@link PropertyDescriptor}
|
* generated based on a user defined {@link PropertyDescriptor}
|
||||||
*
|
|
||||||
* @author
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ ElementType.TYPE })
|
@Target({ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Inherited
|
@Inherited
|
||||||
public @interface DynamicRelationship {
|
public @interface DynamicRelationship {
|
||||||
/**
|
|
||||||
* Describes the name(s) of the dynamic relationship(s)
|
|
||||||
*
|
|
||||||
* @return a description of the name(s) of the dynamic relationship(s)
|
|
||||||
*/
|
|
||||||
public String name();
|
public String name();
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes the data that should be routed to the dynamic relationship(s)
|
|
||||||
*
|
|
||||||
* @return a description the data that should be routed to the dynamic relationship(s)
|
|
||||||
*/
|
|
||||||
public String description();
|
public String description();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,27 +24,18 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation that may be placed on a {@link org.apache.nifi.processor.Processor Processor}
|
* Annotation that may be placed on a
|
||||||
* indicating that this processor reads a specific FlowFile attribute.
|
* {@link org.apache.nifi.processor.Processor Processor} indicating that this
|
||||||
*
|
* processor reads a specific FlowFile attribute.
|
||||||
* @author
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Inherited
|
@Inherited
|
||||||
public @interface ReadsAttribute {
|
public @interface ReadsAttribute {
|
||||||
/**
|
|
||||||
* The FlowFile attribute that is being read
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String attribute();
|
public String attribute();
|
||||||
|
|
||||||
/**
|
|
||||||
* The description of how the attribute is being used
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String description() default "";
|
public String description() default "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.nifi.annotation.behavior;
|
package org.apache.nifi.annotation.behavior;
|
||||||
|
|
||||||
import org.apache.nifi.annotation.behavior.ReadsAttribute;
|
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.Documented;
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Inherited;
|
import java.lang.annotation.Inherited;
|
||||||
|
@ -25,10 +24,9 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation that may be placed on a {@link org.apache.nifi.processor.Processor Processor}
|
* Annotation that may be placed on a
|
||||||
* indicating that this processor reads specific FlowFile attributes.
|
* {@link org.apache.nifi.processor.Processor Processor} indicating that this
|
||||||
*
|
* processor reads specific FlowFile attributes.
|
||||||
* @author
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
|
@ -36,9 +34,6 @@ import java.lang.annotation.Target;
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Inherited
|
@Inherited
|
||||||
public @interface ReadsAttributes {
|
public @interface ReadsAttributes {
|
||||||
/**
|
|
||||||
* A list of attributes that may be read
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public ReadsAttribute[] value();
|
public ReadsAttribute[] value();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,18 +24,17 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor}
|
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor}
|
||||||
* implementation can use to indicate that its
|
* implementation can use to indicate that its operations on FlowFiles can be
|
||||||
* operations on FlowFiles can be safely repeated across process sessions. If a
|
* safely repeated across process sessions. If a processor has this annotation
|
||||||
* processor has this annotation and it allows the framework to manage session
|
* and it allows the framework to manage session commit and rollback then the
|
||||||
* commit and rollback then the framework may elect to cascade a
|
* framework may elect to cascade a
|
||||||
* {@link org.apache.nifi.processor.ProcessSession ProcessSession} given to this
|
* {@link org.apache.nifi.processor.ProcessSession ProcessSession} given to this
|
||||||
* processor's onTrigger method to the
|
* processor's onTrigger method to the onTrigger method of another processor. It
|
||||||
* onTrigger method of another processor. It can do this knowing that if
|
* can do this knowing that if something fails along a series of processors
|
||||||
* something fails along a series of processors using this same session that it
|
* using this same session that it can all be safely rolled back without any ill
|
||||||
* can all be safely rolled back without any ill effects on external services
|
* effects on external services which could not be rolled back and thus all the
|
||||||
* which could not be rolled back and thus all the processes could be safely
|
* processes could be safely repeated (implied idempotent behavior).
|
||||||
* repeated (implied idempotent behavior).
|
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -24,11 +24,10 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor}
|
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor}
|
||||||
* implementation can use to indicate that the
|
* implementation can use to indicate that the Processor is not safe for
|
||||||
* Processor is not safe for concurrent execution of its onTrigger()
|
* concurrent execution of its onTrigger() method. By default, Processors are
|
||||||
* method. By default, Processors are assumed to be safe for concurrent
|
* assumed to be safe for concurrent execution.
|
||||||
* execution.
|
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -25,11 +25,10 @@ import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor}
|
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor}
|
||||||
* implementation can use to indicate that the
|
* implementation can use to indicate that the Processor is to be triggered if
|
||||||
* Processor is to be triggered if any of its destinations has available space
|
* any of its destinations has available space for incoming FlowFiles. By
|
||||||
* for incoming FlowFiles. By default, Processors are triggered only when all
|
* default, Processors are triggered only when all destinations report that they
|
||||||
* destinations report that they have available space (i.e., none of the outgoing
|
* have available space (i.e., none of the outgoing Connections is full).
|
||||||
* Connections is full).
|
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -24,13 +24,13 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor}
|
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor}
|
||||||
* implementation can use to indicate that the
|
* implementation can use to indicate that the Processor should still be
|
||||||
* Processor should still be triggered even when it has no data in its work
|
* triggered even when it has no data in its work queue. By default, Processors
|
||||||
* queue. By default, Processors which have no non-self incoming edges will be
|
* which have no non-self incoming edges will be triggered even if there is no
|
||||||
* triggered even if there is no work in its queue. However, Processors that
|
* work in its queue. However, Processors that have non-self incoming edges will
|
||||||
* have non-self incoming edges will only be triggered if they have work in
|
* only be triggered if they have work in their queue or they present this
|
||||||
* their queue or they present this annotation.
|
* annotation.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -24,28 +24,18 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation that may be placed on a {@link org.apache.nifi.processor.Processor Processor}
|
* Annotation that may be placed on a
|
||||||
* indicating that this processor writes/updates a specific FlowFile attribute.
|
* {@link org.apache.nifi.processor.Processor Processor} indicating that this
|
||||||
*
|
* processor writes/updates a specific FlowFile attribute.
|
||||||
* @author
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Inherited
|
@Inherited
|
||||||
public @interface WritesAttribute {
|
public @interface WritesAttribute {
|
||||||
|
|
||||||
/**
|
|
||||||
* The FlowFile attribute that is being created or updated
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String attribute();
|
public String attribute();
|
||||||
|
|
||||||
/**
|
|
||||||
* A description of what is being written to the FlowFile attribute
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String description() default "";
|
public String description() default "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,21 +24,16 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation that may be placed on a {@link org.apache.nifi.processor.Processor Processor}
|
* Annotation that may be placed on a
|
||||||
* indicating that this processor writes/updates specific FlowFile attributes.
|
* {@link org.apache.nifi.processor.Processor Processor} indicating that this
|
||||||
*
|
* processor writes/updates specific FlowFile attributes.
|
||||||
* @author
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Inherited
|
@Inherited
|
||||||
public @interface WritesAttributes {
|
public @interface WritesAttributes {
|
||||||
/**
|
|
||||||
* A list of FlowFile attributes that may be written or updated
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public WritesAttribute[] value();
|
public WritesAttribute[] value();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,10 +24,11 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation that may be placed on a {@link org.apache.nifi.processor.Processor Processor},
|
* Annotation that may be placed on a {@link org.apache.nifi.processor.Processor Processor},
|
||||||
* {@link org.apache.nifi.controller.ControllerService ControllerService}, or
|
* {@link org.apache.nifi.controller.ControllerService ControllerService}, or
|
||||||
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} allowing for a description to be
|
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} allowing for a
|
||||||
* provided. This description can be provided to a user in logs, UI, etc.
|
* description to be provided. This description can be provided to a user in
|
||||||
|
* logs, UI, etc.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,34 +26,19 @@ import java.lang.annotation.Target;
|
||||||
import org.apache.nifi.components.ConfigurableComponent;
|
import org.apache.nifi.components.ConfigurableComponent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation that may be placed on a
|
* Annotation that may be placed on a null {@link org.apache.nifi.processor.Processor Processor},
|
||||||
* {@link org.apache.nifi.processor.Processor Processor},
|
|
||||||
* {@link org.apache.nifi.controller.ControllerService ControllerService}, or
|
* {@link org.apache.nifi.controller.ControllerService ControllerService}, or
|
||||||
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} that indicates
|
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} that indicates
|
||||||
* this component is related to the components listed.
|
* this component is related to the components listed.
|
||||||
*
|
|
||||||
* @author
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ ElementType.TYPE })
|
@Target({ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Inherited
|
@Inherited
|
||||||
public @interface SeeAlso {
|
public @interface SeeAlso {
|
||||||
/**
|
|
||||||
* Classes you want to link to.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Class<? extends ConfigurableComponent>[] value() default {};
|
public Class<? extends ConfigurableComponent>[] value() default {};
|
||||||
|
|
||||||
/**
|
|
||||||
* Fully qualified class names you want to link to. Use this when the class
|
|
||||||
* you want to link to is not in the class path of the component you are
|
|
||||||
* linking from.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String[] classNames() default {};
|
public String[] classNames() default {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,14 +24,13 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation that can be applied to a {@link org.apache.nifi.processor.Processor Processor},
|
* Annotation that can be applied to a {@link org.apache.nifi.processor.Processor Processor},
|
||||||
* {@link org.apache.nifi.controller.ControllerService ControllerService}, or
|
* {@link org.apache.nifi.controller.ControllerService ControllerService}, or
|
||||||
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} in order to associate
|
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} in order to
|
||||||
* tags (keywords) with the component. These tags do not affect the component in
|
* associate tags (keywords) with the component. These tags do not affect the
|
||||||
* any way but serve as additional documentation and can be used to sort/filter
|
* component in any way but serve as additional documentation and can be used to
|
||||||
* Processors.
|
* sort/filter Processors.
|
||||||
*
|
*
|
||||||
* @author none
|
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
|
@ -39,8 +38,5 @@ import java.lang.annotation.Target;
|
||||||
@Inherited
|
@Inherited
|
||||||
public @interface Tags {
|
public @interface Tags {
|
||||||
|
|
||||||
/**
|
|
||||||
* @return all tag values associated with the given processor
|
|
||||||
*/
|
|
||||||
public String[] value();
|
public String[] value();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,24 +25,24 @@ import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor},
|
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor},
|
||||||
* {@link org.apache.nifi.controller.ControllerService ControllerService}, or
|
* {@link org.apache.nifi.controller.ControllerService ControllerService}, or
|
||||||
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask}
|
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation
|
||||||
* implementation can use to indicate a method
|
* can use to indicate a method should be called whenever the component is added
|
||||||
* should be called whenever the component is added to the flow. This method
|
* to the flow. This method will be called once for the entire life of a
|
||||||
* will be called once for the entire life of a component instance.
|
* component instance.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Methods with this annotation are called without any arguments, as all settings
|
* Methods with this annotation are called without any arguments, as all
|
||||||
* and properties can be assumed to be the defaults.
|
* settings and properties can be assumed to be the defaults.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* If any method annotated with this annotation throws a Throwable, the component
|
* If any method annotated with this annotation throws a Throwable, the
|
||||||
* will not be added to the flow.
|
* component will not be added to the flow.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
|
|
|
@ -27,26 +27,29 @@ import org.apache.nifi.controller.ConfigurationContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Marker annotation a {@link org.apache.nifi.controller.ControllerService ControllerService}
|
* Marker annotation a
|
||||||
* can use to indicate a method should be called whenever the service is disabled.
|
* {@link org.apache.nifi.controller.ControllerService ControllerService} can
|
||||||
*</p>
|
* use to indicate a method should be called whenever the service is disabled.
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Methods using this annotation are permitted to take zero arguments or to take a single
|
* Methods using this annotation are permitted to take zero arguments or to take
|
||||||
* argument of type {@link ConfigurationContext}. If a method with this annotation
|
* a single argument of type {@link ConfigurationContext}. If a method with this
|
||||||
* throws a Throwable, a log message and bulletin will be issued for the service, and the
|
* annotation throws a Throwable, a log message and bulletin will be issued for
|
||||||
* service will remain in a 'DISABLING' state. When this occurs, the method with this annotation
|
* the service, and the service will remain in a 'DISABLING' state. When this
|
||||||
* will be called again after some period of time. This will continue until the method returns
|
* occurs, the method with this annotation will be called again after some
|
||||||
* without throwing any Throwable. Until that time, the service will remain in a 'DISABLING' state
|
* period of time. This will continue until the method returns without throwing
|
||||||
* and cannot be enabled again.
|
* any Throwable. Until that time, the service will remain in a 'DISABLING'
|
||||||
|
* state and cannot be enabled again.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Note that this annotation will be ignored if applied to a ReportingTask or Processor. For a Controller
|
* Note that this annotation will be ignored if applied to a ReportingTask or
|
||||||
* Service, enabling and disabling are considered lifecycle events, as the action makes them usable or
|
* Processor. For a Controller Service, enabling and disabling are considered
|
||||||
* unusable by other components. However, for a Processor and a Reporting
|
* lifecycle events, as the action makes them usable or unusable by other
|
||||||
* Task, these are not lifecycle events but rather a mechanism to allow a component to be excluded when
|
* components. However, for a Processor and a Reporting Task, these are not
|
||||||
* starting or stopping a group of components.
|
* lifecycle events but rather a mechanism to allow a component to be excluded
|
||||||
|
* when starting or stopping a group of components.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -25,35 +25,40 @@ import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Marker annotation a {@link org.apache.nifi.controller.ControllerService ControllerService}
|
* Marker annotation a
|
||||||
* can use to indicate a method should be called whenever the service is enabled.
|
* {@link org.apache.nifi.controller.ControllerService ControllerService} can
|
||||||
* Any method that has this annotation will be called every time a user enables the service.
|
* use to indicate a method should be called whenever the service is enabled.
|
||||||
* Additionally, each time that NiFi is restarted, if NiFi is configured to "auto-resume state"
|
* Any method that has this annotation will be called every time a user enables
|
||||||
* and the service is enabled, the method will be invoked.
|
* the service. Additionally, each time that NiFi is restarted, if NiFi is
|
||||||
|
* configured to "auto-resume state" and the service is enabled, the method will
|
||||||
|
* be invoked.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Methods using this annotation must take either 0 arguments or a single argument of type
|
* Methods using this annotation must take either 0 arguments or a single
|
||||||
|
* argument of type
|
||||||
* {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}.
|
* {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* If a method with this annotation throws a Throwable, a log message and bulletin will be issued
|
* If a method with this annotation throws a Throwable, a log message and
|
||||||
* for the component. In this event, the service will remain in an 'ENABLING' state and will not be
|
* bulletin will be issued for the component. In this event, the service will
|
||||||
* usable. All methods with this annotation will then be called again after a delay. The service will
|
* remain in an 'ENABLING' state and will not be usable. All methods with this
|
||||||
* not be made available for use until all methods with this annotation have returned without throwing
|
* annotation will then be called again after a delay. The service will not be
|
||||||
* anything.
|
* made available for use until all methods with this annotation have returned
|
||||||
* </p>
|
* without throwing anything.
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* Note that this annotation will be ignored if applied to a ReportingTask or Processor. For a Controller
|
|
||||||
* Service, enabling and disabling are considered lifecycle events, as the action makes them usable or
|
|
||||||
* unusable by other components. However, for a Processor and a Reporting
|
|
||||||
* Task, these are not lifecycle events but rather a mechanism to allow a component to be excluded when
|
|
||||||
* starting or stopping a group of components.
|
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
*
|
* <p>
|
||||||
|
* Note that this annotation will be ignored if applied to a ReportingTask or
|
||||||
|
* Processor. For a Controller Service, enabling and disabling are considered
|
||||||
|
* lifecycle events, as the action makes them usable or unusable by other
|
||||||
|
* components. However, for a Processor and a Reporting Task, these are not
|
||||||
|
* lifecycle events but rather a mechanism to allow a component to be excluded
|
||||||
|
* when starting or stopping a group of components.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.METHOD})
|
@Target({ElementType.METHOD})
|
||||||
|
|
|
@ -28,23 +28,24 @@ import org.apache.nifi.processor.ProcessContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor},
|
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor},
|
||||||
* {@link org.apache.nifi.controller.ControllerService ControllerService}, or
|
* {@link org.apache.nifi.controller.ControllerService ControllerService}, or
|
||||||
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation
|
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation
|
||||||
* can use to indicate a method should be called whenever the component is removed
|
* can use to indicate a method should be called whenever the component is
|
||||||
* from the flow. This method will be called once for the entire life of a
|
* removed from the flow. This method will be called once for the entire life of
|
||||||
* component instance. If the method throw any Throwable, that Throwable will be
|
* a component instance. If the method throw any Throwable, that Throwable will
|
||||||
* caught and logged but will not prevent subsequent methods with this annotation
|
* be caught and logged but will not prevent subsequent methods with this
|
||||||
* or removal of the component from the flow.
|
* annotation or removal of the component from the flow.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Methods with this annotation are permitted to take no arguments or to take a single
|
* Methods with this annotation are permitted to take no arguments or to take a
|
||||||
* argument. If using a single argument, that argument must be of type {@link ConfigurationContext}
|
* single argument. If using a single argument, that argument must be of type
|
||||||
* if the component is a ReportingTask or a ControllerService. If the component is a Processor,
|
* {@link ConfigurationContext} if the component is a ReportingTask or a
|
||||||
* then the argument must be of type {@link ProcessContext}.
|
* ControllerService. If the component is a Processor, then the argument must be
|
||||||
|
* of type {@link ProcessContext}.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
|
|
|
@ -25,32 +25,38 @@ import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor} or
|
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor} or
|
||||||
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation
|
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation
|
||||||
* can use to indicate a method should be called whenever the component is scheduled
|
* can use to indicate a method should be called whenever the component is
|
||||||
* to run. This will be called before any call to 'onTrigger' and will be called once each time
|
* scheduled to run. This will be called before any call to 'onTrigger' and will
|
||||||
* a Processor or Reporting Task is scheduled to run. This occurs in one of two ways: either
|
* be called once each time a Processor or Reporting Task is scheduled to run.
|
||||||
* a user clicks to schedule the component to run, or NiFi is restarted with the "auto-resume state"
|
* This occurs in one of two ways: either a user clicks to schedule the
|
||||||
* configuration set to true (the default value) and the component is already running.
|
* component to run, or NiFi is restarted with the "auto-resume state"
|
||||||
* </p>
|
* configuration set to true (the default value) and the component is already
|
||||||
*
|
* running.
|
||||||
* <p>
|
|
||||||
* Methods using this annotation must take either 0 arguments or a single argument.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* If using 1 argument and the component using the annotation is a Processor, that argument must
|
|
||||||
* be of type {@link org.apache.nifi.processor.ProcessContext ProcessContext}.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* If using 1 argument and the component using the annotation is a Reporting Task, that argument must
|
|
||||||
* be of type {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}.
|
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* If any method annotated with this annotation throws any Throwable, the framework will wait a while
|
* <p>
|
||||||
* and then attempt to invoke the method again. This will continue until the method succeeds, and the
|
* Methods using this annotation must take either 0 arguments or a single
|
||||||
* component will then be scheduled to run after this method return successfully.
|
* argument.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* If using 1 argument and the component using the annotation is a Processor,
|
||||||
|
* that argument must be of type
|
||||||
|
* {@link org.apache.nifi.processor.ProcessContext ProcessContext}.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* If using 1 argument and the component using the annotation is a Reporting
|
||||||
|
* Task, that argument must be of type
|
||||||
|
* {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* If any method annotated with this annotation throws any Throwable, the
|
||||||
|
* framework will wait a while and then attempt to invoke the method again. This
|
||||||
|
* will continue until the method succeeds, and the component will then be
|
||||||
|
* scheduled to run after this method return successfully.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -28,21 +28,22 @@ import org.apache.nifi.processor.ProcessContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor},
|
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor},
|
||||||
* {@link org.apache.nifi.controller.ControllerService ControllerService}, or
|
* {@link org.apache.nifi.controller.ControllerService ControllerService}, or
|
||||||
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation
|
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation
|
||||||
* can use to indicate a method should be called whenever the flow is being shutdown.
|
* can use to indicate a method should be called whenever the flow is being
|
||||||
* This will be called at most once for each component in a JVM lifetime.
|
* shutdown. This will be called at most once for each component in a JVM
|
||||||
* It is not, however, guaranteed that this method will be called on shutdown, as
|
* lifetime. It is not, however, guaranteed that this method will be called on
|
||||||
* the service may be killed suddenly.
|
* shutdown, as the service may be killed suddenly.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Methods with this annotation are permitted to take either 0 or 1 argument. If an argument
|
* Methods with this annotation are permitted to take either 0 or 1 argument. If
|
||||||
* is used, it must be of type {@link ConfigurationContext} if the component is a ReportingTask
|
* an argument is used, it must be of type {@link ConfigurationContext} if the
|
||||||
* or Controller Service, or of type {@link ProcessContext} if the component is a Processor.
|
* component is a ReportingTask or Controller Service, or of type
|
||||||
|
* {@link ProcessContext} if the component is a Processor.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
|
|
|
@ -29,12 +29,11 @@ import org.apache.nifi.processor.ProcessContext;
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor} or
|
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor} or
|
||||||
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask}
|
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation
|
||||||
* implementation can use to indicate that a method
|
* can use to indicate that a method should be called whenever the component is
|
||||||
* should be called whenever the component is no longer scheduled to run.
|
* no longer scheduled to run. Methods marked with this annotation will be
|
||||||
* Methods marked with this annotation will be invoked each time the component
|
* invoked each time the component is stopped and will be invoked only after the
|
||||||
* is stopped and will be invoked only after the last thread has returned from
|
* last thread has returned from the <code>onTrigger</code> method.
|
||||||
* the <code>onTrigger</code> method.
|
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -47,14 +46,15 @@ import org.apache.nifi.processor.ProcessContext;
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* To indicate that a method should be called immediately when a component is no
|
* To indicate that a method should be called immediately when a component is no
|
||||||
* longer scheduled to run (as opposed to after all threads have returned from the
|
* longer scheduled to run (as opposed to after all threads have returned from
|
||||||
* <code>onTrigger</code> method), see the {@link OnUnscheduled} annotation.
|
* the <code>onTrigger</code> method), see the {@link OnUnscheduled} annotation.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Methods with this annotation are permitted to take either 0 or 1 argument. If an argument
|
* Methods with this annotation are permitted to take either 0 or 1 argument. If
|
||||||
* is used, it must be of type {@link ConfigurationContext} if the component is a ReportingTask
|
* an argument is used, it must be of type {@link ConfigurationContext} if the
|
||||||
* or of type {@link ProcessContext} if the component is a Processor.
|
* component is a ReportingTask or of type {@link ProcessContext} if the
|
||||||
|
* component is a Processor.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
|
|
|
@ -26,26 +26,29 @@ import java.lang.annotation.Target;
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor} or
|
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor} or
|
||||||
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask}
|
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} should be
|
||||||
* should be called whenever the component is no longer scheduled to run.
|
* called whenever the component is no longer scheduled to run. Methods marked
|
||||||
* Methods marked with this annotation will be invoked each time the framework
|
* with this annotation will be invoked each time the framework is notified to
|
||||||
* is notified to stop scheduling the component. This method is invoked as other
|
* stop scheduling the component. This method is invoked as other threads are
|
||||||
* threads are potentially running. To invoke a method after all threads have
|
* potentially running. To invoke a method after all threads have finished
|
||||||
* finished processing, see the {@link OnStopped} annotation.
|
* processing, see the {@link OnStopped} annotation.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Methods using this annotation must take either 0 arguments or a single argument.
|
* Methods using this annotation must take either 0 arguments or a single
|
||||||
|
* argument.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* If using 1 argument and the component using the annotation is a Processor, that argument must
|
* If using 1 argument and the component using the annotation is a Processor,
|
||||||
* be of type {@link org.apache.nifi.processor.ProcessContext ProcessContext}.
|
* that argument must be of type
|
||||||
|
* {@link org.apache.nifi.processor.ProcessContext ProcessContext}.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* If using 1 argument and the component using the annotation is a Reporting Task, that argument must
|
* If using 1 argument and the component using the annotation is a Reporting
|
||||||
* be of type {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}.
|
* Task, that argument must be of type
|
||||||
|
* {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}.
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
|
|
|
@ -34,11 +34,9 @@ public enum Authority {
|
||||||
ROLE_NIFI;
|
ROLE_NIFI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the matching role or null if the specified role does not match
|
* @param rawAuthority string form of authority
|
||||||
* any roles.
|
* @return the matching role or null if the specified role does not match
|
||||||
*
|
* any roles
|
||||||
* @param rawAuthority
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public static Authority valueOfAuthority(String rawAuthority) {
|
public static Authority valueOfAuthority(String rawAuthority) {
|
||||||
Authority desiredAuthority = null;
|
Authority desiredAuthority = null;
|
||||||
|
@ -54,9 +52,7 @@ public enum Authority {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the string value of each authority.
|
* @return the string value of each authority
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public static Set<String> getRawAuthorities() {
|
public static Set<String> getRawAuthorities() {
|
||||||
Set<String> authorities = new LinkedHashSet<>();
|
Set<String> authorities = new LinkedHashSet<>();
|
||||||
|
|
|
@ -31,11 +31,9 @@ import org.apache.nifi.authorization.exception.UnknownIdentityException;
|
||||||
public interface AuthorityProvider {
|
public interface AuthorityProvider {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether the user with the specified DN is known to this authority
|
* @param dn of the user
|
||||||
* provider. It is not necessary for the user to have any authorities.
|
* @return whether the user with the specified DN is known to this authority
|
||||||
*
|
* provider. It is not necessary for the user to have any authorities
|
||||||
* @param dn
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
boolean doesDnExist(String dn) throws AuthorityAccessException;
|
boolean doesDnExist(String dn) throws AuthorityAccessException;
|
||||||
|
|
||||||
|
@ -43,29 +41,30 @@ public interface AuthorityProvider {
|
||||||
* Get the authorities for the specified user. If the specified user exists
|
* Get the authorities for the specified user. If the specified user exists
|
||||||
* but does not have any authorities, an empty set should be returned.
|
* but does not have any authorities, an empty set should be returned.
|
||||||
*
|
*
|
||||||
* @param dn
|
* @param dn of the user to lookup
|
||||||
* @return
|
* @return the authorities for the specified user. If the specified user
|
||||||
* @throws UnknownIdentityException
|
* exists but does not have any authorities, an empty set should be returned
|
||||||
* @throws AuthorityAccessException
|
* @throws UnknownIdentityException if identity is not known
|
||||||
|
* @throws AuthorityAccessException if unable to access authorities
|
||||||
*/
|
*/
|
||||||
Set<Authority> getAuthorities(String dn) throws UnknownIdentityException, AuthorityAccessException;
|
Set<Authority> getAuthorities(String dn) throws UnknownIdentityException, AuthorityAccessException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the specified authorities for the specified user.
|
* Sets the specified authorities for the specified user.
|
||||||
*
|
*
|
||||||
* @param dn
|
* @param dn the specified user
|
||||||
* @param authorities
|
* @param authorities the new authorities for the user
|
||||||
* @throws UnknownIdentityException
|
* @throws UnknownIdentityException if identity is not known
|
||||||
* @throws AuthorityAccessException
|
* @throws AuthorityAccessException if unable to access authorities
|
||||||
*/
|
*/
|
||||||
void setAuthorities(String dn, Set<Authority> authorities) throws UnknownIdentityException, AuthorityAccessException;
|
void setAuthorities(String dn, Set<Authority> authorities) throws UnknownIdentityException, AuthorityAccessException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the users for the specified authority.
|
* Gets the users for the specified authority.
|
||||||
*
|
*
|
||||||
* @param authority
|
* @param authority for which to determine membership of
|
||||||
* @return
|
* @return all users with the specified authority
|
||||||
* @throws AuthorityAccessException
|
* @throws AuthorityAccessException if unable to access authorities
|
||||||
*/
|
*/
|
||||||
Set<String> getUsers(Authority authority) throws AuthorityAccessException;
|
Set<String> getUsers(Authority authority) throws AuthorityAccessException;
|
||||||
|
|
||||||
|
@ -73,19 +72,19 @@ public interface AuthorityProvider {
|
||||||
* Revokes the specified user. Its up to the implementor to determine the
|
* Revokes the specified user. Its up to the implementor to determine the
|
||||||
* semantics of revocation.
|
* semantics of revocation.
|
||||||
*
|
*
|
||||||
* @param dn
|
* @param dn the dn of the user
|
||||||
* @throws UnknownIdentityException
|
* @throws UnknownIdentityException if the user is not known
|
||||||
* @throws AuthorityAccessException
|
* @throws AuthorityAccessException if unable to access the authorities
|
||||||
*/
|
*/
|
||||||
void revokeUser(String dn) throws UnknownIdentityException, AuthorityAccessException;
|
void revokeUser(String dn) throws UnknownIdentityException, AuthorityAccessException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the specified user.
|
* Add the specified user.
|
||||||
*
|
*
|
||||||
* @param dn
|
* @param dn of the user
|
||||||
* @param group Optional
|
* @param group Optional
|
||||||
* @throws IdentityAlreadyExistsException
|
* @throws UnknownIdentityException if the user is not known
|
||||||
* @throws AuthorityAccessException
|
* @throws AuthorityAccessException if unable to access the authorities
|
||||||
*/
|
*/
|
||||||
void addUser(String dn, String group) throws IdentityAlreadyExistsException, AuthorityAccessException;
|
void addUser(String dn, String group) throws IdentityAlreadyExistsException, AuthorityAccessException;
|
||||||
|
|
||||||
|
@ -93,10 +92,10 @@ public interface AuthorityProvider {
|
||||||
* Gets the group for the specified user. Return null if the user does not
|
* Gets the group for the specified user. Return null if the user does not
|
||||||
* belong to a group.
|
* belong to a group.
|
||||||
*
|
*
|
||||||
* @param dn
|
* @param dn the user
|
||||||
* @return
|
* @return the group of the given user
|
||||||
* @throws UnknownIdentityException
|
* @throws UnknownIdentityException if the user is not known
|
||||||
* @throws AuthorityAccessException
|
* @throws AuthorityAccessException if unable to access the authorities
|
||||||
*/
|
*/
|
||||||
String getGroupForUser(String dn) throws UnknownIdentityException, AuthorityAccessException;
|
String getGroupForUser(String dn) throws UnknownIdentityException, AuthorityAccessException;
|
||||||
|
|
||||||
|
@ -104,26 +103,28 @@ public interface AuthorityProvider {
|
||||||
* Revokes all users for a specified group. Its up to the implementor to
|
* Revokes all users for a specified group. Its up to the implementor to
|
||||||
* determine the semantics of revocation.
|
* determine the semantics of revocation.
|
||||||
*
|
*
|
||||||
* @param group
|
* @param group to revoke the users of
|
||||||
* @throws AuthorityAccessException
|
* @throws UnknownIdentityException if the user is not known
|
||||||
|
* @throws AuthorityAccessException if unable to access the authorities
|
||||||
*/
|
*/
|
||||||
void revokeGroup(String group) throws UnknownIdentityException, AuthorityAccessException;
|
void revokeGroup(String group) throws UnknownIdentityException, AuthorityAccessException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the specified users to the specified group.
|
* Adds the specified users to the specified group.
|
||||||
*
|
*
|
||||||
* @param dn
|
* @param dn the set of users to add to the group
|
||||||
* @param group
|
* @param group to add users to
|
||||||
* @throws AuthorityAccessException
|
* @throws UnknownIdentityException if the user is not known
|
||||||
|
* @throws AuthorityAccessException if unable to access the authorities
|
||||||
*/
|
*/
|
||||||
void setUsersGroup(Set<String> dn, String group) throws UnknownIdentityException, AuthorityAccessException;
|
void setUsersGroup(Set<String> dn, String group) throws UnknownIdentityException, AuthorityAccessException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ungroups the specified user.
|
* Ungroups the specified user.
|
||||||
*
|
*
|
||||||
* @param dn
|
* @param dn of the user
|
||||||
* @throws UnknownIdentityException
|
* @throws UnknownIdentityException if the user is not known
|
||||||
* @throws AuthorityAccessException
|
* @throws AuthorityAccessException if unable to access the authorities
|
||||||
*/
|
*/
|
||||||
void ungroupUser(String dn) throws UnknownIdentityException, AuthorityAccessException;
|
void ungroupUser(String dn) throws UnknownIdentityException, AuthorityAccessException;
|
||||||
|
|
||||||
|
@ -133,41 +134,41 @@ public interface AuthorityProvider {
|
||||||
* does not exist. If an admin revoked this group before calling ungroup, it
|
* does not exist. If an admin revoked this group before calling ungroup, it
|
||||||
* may or may not exist.
|
* may or may not exist.
|
||||||
*
|
*
|
||||||
* @param group
|
* @param group to ungroup
|
||||||
* @throws AuthorityAccessException
|
* @throws AuthorityAccessException if unable to access the authorities
|
||||||
*/
|
*/
|
||||||
void ungroup(String group) throws AuthorityAccessException;
|
void ungroup(String group) throws AuthorityAccessException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether the user in the specified dnChain should be able to
|
* Determines whether the user in the specified dnChain should be able to
|
||||||
* download the content for the flowfile with the specified attributes.
|
* download the content for the flowfile with the specified attributes.
|
||||||
*
|
*
|
||||||
* The first dn in the chain is the end user that the request was issued on
|
* The first dn in the chain is the end user that the request was issued on
|
||||||
* behalf of. The subsequent dn's in the chain represent entities proxying
|
* behalf of. The subsequent dn's in the chain represent entities proxying
|
||||||
* the user's request with the last being the proxy that sent the current
|
* the user's request with the last being the proxy that sent the current
|
||||||
* request.
|
* request.
|
||||||
*
|
*
|
||||||
* @param dnChain
|
* @param dnChain of the user
|
||||||
* @param attributes
|
* @param attributes of the flowfile being requested
|
||||||
* @return
|
* @return the authorization result
|
||||||
* @throws UnknownIdentityException
|
* @throws UnknownIdentityException if the user is not known
|
||||||
* @throws AuthorityAccessException
|
* @throws AuthorityAccessException if unable to access the authorities
|
||||||
*/
|
*/
|
||||||
DownloadAuthorization authorizeDownload(List<String> dnChain, Map<String, String> attributes) throws UnknownIdentityException, AuthorityAccessException;
|
DownloadAuthorization authorizeDownload(List<String> dnChain, Map<String, String> attributes) throws UnknownIdentityException, AuthorityAccessException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called immediately after instance creation for implementers to perform
|
* Called immediately after instance creation for implementers to perform
|
||||||
* additional setup
|
* additional setup
|
||||||
*
|
*
|
||||||
* @param initializationContext
|
* @param initializationContext in which to initialize
|
||||||
*/
|
*/
|
||||||
void initialize(AuthorityProviderInitializationContext initializationContext) throws ProviderCreationException;
|
void initialize(AuthorityProviderInitializationContext initializationContext) throws ProviderCreationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called to configure the AuthorityProvider.
|
* Called to configure the AuthorityProvider.
|
||||||
*
|
*
|
||||||
* @param configurationContext
|
* @param configurationContext at the time of configuration
|
||||||
* @throws ProviderCreationException
|
* @throws ProviderCreationException for any issues configuring the provider
|
||||||
*/
|
*/
|
||||||
void onConfigured(AuthorityProviderConfigurationContext configurationContext) throws ProviderCreationException;
|
void onConfigured(AuthorityProviderConfigurationContext configurationContext) throws ProviderCreationException;
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,7 @@ import java.util.Map;
|
||||||
public interface AuthorityProviderConfigurationContext {
|
public interface AuthorityProviderConfigurationContext {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The identifier for the authority provider.
|
* @return identifier for the authority provider
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getIdentifier();
|
String getIdentifier();
|
||||||
|
|
||||||
|
@ -41,12 +39,10 @@ public interface AuthorityProviderConfigurationContext {
|
||||||
Map<String, String> getProperties();
|
Map<String, String> getProperties();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the value the component currently understands for the given
|
* @param property to lookup the descriptor and value of
|
||||||
|
* @return the value the component currently understands for the given
|
||||||
* PropertyDescriptor. This method does not substitute default
|
* PropertyDescriptor. This method does not substitute default
|
||||||
* PropertyDescriptor values, so the value returned will be null if not set.
|
* PropertyDescriptor values, so the value returned will be null if not set
|
||||||
*
|
|
||||||
* @param property
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getProperty(String property);
|
String getProperty(String property);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ package org.apache.nifi.authorization;
|
||||||
public class DownloadAuthorization {
|
public class DownloadAuthorization {
|
||||||
|
|
||||||
private static enum Result {
|
private static enum Result {
|
||||||
|
|
||||||
Approved,
|
Approved,
|
||||||
Denied;
|
Denied;
|
||||||
};
|
};
|
||||||
|
@ -32,10 +33,11 @@ public class DownloadAuthorization {
|
||||||
private final String explanation;
|
private final String explanation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new DownloadAuthorization with the specified result and explanation.
|
* Creates a new DownloadAuthorization with the specified result and
|
||||||
*
|
* explanation.
|
||||||
* @param result
|
*
|
||||||
* @param explanation
|
* @param result of the authorization
|
||||||
|
* @param explanation for the authorization attempt
|
||||||
*/
|
*/
|
||||||
private DownloadAuthorization(Result result, String explanation) {
|
private DownloadAuthorization(Result result, String explanation) {
|
||||||
if (Result.Denied.equals(result) && explanation == null) {
|
if (Result.Denied.equals(result) && explanation == null) {
|
||||||
|
@ -47,38 +49,33 @@ public class DownloadAuthorization {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not the download request is approved.
|
* @return Whether or not the download request is approved
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public boolean isApproved() {
|
public boolean isApproved() {
|
||||||
return Result.Approved.equals(result);
|
return Result.Approved.equals(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the download request is denied, the reason why. Null otherwise.
|
* @return If the download request is denied, the reason why. Null otherwise
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getExplanation() {
|
public String getExplanation() {
|
||||||
return explanation;
|
return explanation;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new approved DownloadAuthorization.
|
* @return a new approved DownloadAuthorization
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public static DownloadAuthorization approved() {
|
public static DownloadAuthorization approved() {
|
||||||
return APPROVED;
|
return APPROVED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new denied DownloadAuthorization with the specified explanation.
|
* Creates a new denied DownloadAuthorization with the specified
|
||||||
*
|
* explanation.
|
||||||
* @param explanation
|
*
|
||||||
* @return
|
* @param explanation for why it was denied
|
||||||
* @throws IllegalArgumentException if explanation is null
|
* @return a new denied DownloadAuthorization with the specified explanation
|
||||||
|
* @throws IllegalArgumentException if explanation is null
|
||||||
*/
|
*/
|
||||||
public static DownloadAuthorization denied(String explanation) {
|
public static DownloadAuthorization denied(String explanation) {
|
||||||
return new DownloadAuthorization(Result.Denied, explanation);
|
return new DownloadAuthorization(Result.Denied, explanation);
|
||||||
|
|
|
@ -46,11 +46,9 @@ public abstract class AbstractConfigurableComponent implements ConfigurableCompo
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a PropertyDescriptor for the name specified that is fully
|
* @param descriptorName to lookup the descriptor
|
||||||
|
* @return a PropertyDescriptor for the name specified that is fully
|
||||||
* populated
|
* populated
|
||||||
*
|
|
||||||
* @param descriptorName
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public final PropertyDescriptor getPropertyDescriptor(final String descriptorName) {
|
public final PropertyDescriptor getPropertyDescriptor(final String descriptorName) {
|
||||||
|
@ -141,11 +139,12 @@ public abstract class AbstractConfigurableComponent implements ConfigurableCompo
|
||||||
* method a processor may simply get the latest value whenever it needs it
|
* method a processor may simply get the latest value whenever it needs it
|
||||||
* and if necessary lazily evaluate it.
|
* and if necessary lazily evaluate it.
|
||||||
*
|
*
|
||||||
* @param descriptor
|
* @param descriptor of the modified property
|
||||||
* @param oldValue non-null property value (previous)
|
* @param oldValue non-null property value (previous)
|
||||||
* @param newValue the new property value or if null indicates the property
|
* @param newValue the new property value or if null indicates the property
|
||||||
* was removed
|
* was removed
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) {
|
public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +167,7 @@ public abstract class AbstractConfigurableComponent implements ConfigurableCompo
|
||||||
* <p>
|
* <p>
|
||||||
* Default is null.
|
* Default is null.
|
||||||
*
|
*
|
||||||
* @param propertyDescriptorName
|
* @param propertyDescriptorName used to lookup if any property descriptors exist for that name
|
||||||
* @return new property descriptor if supported
|
* @return new property descriptor if supported
|
||||||
*/
|
*/
|
||||||
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
|
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
|
||||||
|
@ -186,9 +185,10 @@ public abstract class AbstractConfigurableComponent implements ConfigurableCompo
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.EMPTY_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final List<PropertyDescriptor> getPropertyDescriptors() {
|
public final List<PropertyDescriptor> getPropertyDescriptors() {
|
||||||
final List<PropertyDescriptor> supported = getSupportedPropertyDescriptors();
|
final List<PropertyDescriptor> supported = getSupportedPropertyDescriptors();
|
||||||
return supported == null ? Collections.<PropertyDescriptor>emptyList() :new ArrayList<>(supported);
|
return supported == null ? Collections.<PropertyDescriptor>emptyList() : new ArrayList<>(supported);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class AllowableValue {
|
||||||
* Constructs a new AllowableValue with the given value and and the same
|
* Constructs a new AllowableValue with the given value and and the same
|
||||||
* display name and no description.
|
* display name and no description.
|
||||||
*
|
*
|
||||||
* @param value
|
* @param value that is allowed
|
||||||
*/
|
*/
|
||||||
public AllowableValue(final String value) {
|
public AllowableValue(final String value) {
|
||||||
this(value, value);
|
this(value, value);
|
||||||
|
@ -43,8 +43,8 @@ public class AllowableValue {
|
||||||
* Constructs a new AllowableValue with the given value and display name and
|
* Constructs a new AllowableValue with the given value and display name and
|
||||||
* no description
|
* no description
|
||||||
*
|
*
|
||||||
* @param value
|
* @param value that is allowed
|
||||||
* @param displayName
|
* @param displayName to display for the value
|
||||||
*
|
*
|
||||||
* @throws NullPointerException if either argument is null
|
* @throws NullPointerException if either argument is null
|
||||||
*/
|
*/
|
||||||
|
@ -56,9 +56,9 @@ public class AllowableValue {
|
||||||
* Constructs a new AllowableValue with the given value, display name, and
|
* Constructs a new AllowableValue with the given value, display name, and
|
||||||
* description
|
* description
|
||||||
*
|
*
|
||||||
* @param value
|
* @param value that is valid
|
||||||
* @param displayName
|
* @param displayName to show for the value
|
||||||
* @param description
|
* @param description of the value
|
||||||
*
|
*
|
||||||
* @throws NullPointerException if identifier or value is null
|
* @throws NullPointerException if identifier or value is null
|
||||||
*/
|
*/
|
||||||
|
@ -69,40 +69,33 @@ public class AllowableValue {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the value of this AllowableValue
|
* @return the value of this AllowableValue
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a human-readable name for this AllowableValue
|
* @return a human-readable name for this AllowableValue
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return displayName;
|
return displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a description for this value, or <code>null</code> if no
|
* @return a description for this value, or <code>null</code> if no
|
||||||
* description was provided
|
* description was provided
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>this</code> is equal to <code>obj</code> of <code>obj</code> is the
|
* @return true if <code>this</code> is equal to <code>obj</code> of <code>obj</code> is the
|
||||||
* same object as <code>this</code> or if <code>obj</code> is an instance of
|
* same object as <code>this</code> or if <code>obj</code> is an instance of
|
||||||
* <code>AllowableValue</code> and both have the same value, or if
|
* <code>AllowableValue</code> and both have the same value, or if
|
||||||
* <code>obj</code> is a String and is equal to
|
* <code>obj</code> is a String and is equal to
|
||||||
* {@link #getValue() this.getValue()}.
|
* {@link #getValue() this.getValue()}.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(final Object obj) {
|
public boolean equals(final Object obj) {
|
||||||
|
@ -121,8 +114,7 @@ public class AllowableValue {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hash Code is based solely off of the value
|
* @return based solely off of the value
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
|
|
|
@ -27,7 +27,7 @@ public interface ConfigurableComponent {
|
||||||
* not included in the in the purposed configuration, the default value will
|
* not included in the in the purposed configuration, the default value will
|
||||||
* be used.
|
* be used.
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context of validation
|
||||||
* @return Collection of validation result objects for any invalid findings
|
* @return Collection of validation result objects for any invalid findings
|
||||||
* only. If the collection is empty then the component is valid. Guaranteed
|
* only. If the collection is empty then the component is valid. Guaranteed
|
||||||
* non-null
|
* non-null
|
||||||
|
@ -35,11 +35,9 @@ public interface ConfigurableComponent {
|
||||||
Collection<ValidationResult> validate(ValidationContext context);
|
Collection<ValidationResult> validate(ValidationContext context);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the PropertyDescriptor with the given name, if it exists;
|
* @param name to lookup the descriptor
|
||||||
* otherwise, returns <code>null</code>.
|
* @return the PropertyDescriptor with the given name, if it exists;
|
||||||
*
|
* otherwise, returns <code>null</code>
|
||||||
* @param name
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
PropertyDescriptor getPropertyDescriptor(String name);
|
PropertyDescriptor getPropertyDescriptor(String name);
|
||||||
|
|
||||||
|
@ -51,7 +49,7 @@ public interface ConfigurableComponent {
|
||||||
* necessary lazily evaluate it. Any throwable that escapes this method will
|
* necessary lazily evaluate it. Any throwable that escapes this method will
|
||||||
* simply be ignored.
|
* simply be ignored.
|
||||||
*
|
*
|
||||||
* @param descriptor
|
* @param descriptor the descriptor for the property being modified
|
||||||
* @param oldValue the value that was previously set, or null if no value
|
* @param oldValue the value that was previously set, or null if no value
|
||||||
* was previously set for this property
|
* was previously set for this property
|
||||||
* @param newValue the new property value or if null indicates the property
|
* @param newValue the new property value or if null indicates the property
|
||||||
|
@ -68,10 +66,8 @@ public interface ConfigurableComponent {
|
||||||
List<PropertyDescriptor> getPropertyDescriptors();
|
List<PropertyDescriptor> getPropertyDescriptors();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the unique identifier that the framework assigned to this
|
* @return the unique identifier that the framework assigned to this
|
||||||
* component
|
* component
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getIdentifier();
|
String getIdentifier();
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ import org.apache.nifi.controller.ControllerService;
|
||||||
* An immutable object for holding information about a type of processor
|
* An immutable object for holding information about a type of processor
|
||||||
* property.
|
* property.
|
||||||
*
|
*
|
||||||
* @author unattributed
|
|
||||||
*/
|
*/
|
||||||
public final class PropertyDescriptor implements Comparable<PropertyDescriptor> {
|
public final class PropertyDescriptor implements Comparable<PropertyDescriptor> {
|
||||||
|
|
||||||
|
@ -121,9 +120,9 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
* If this descriptor has a set of allowable values then the given value is
|
* If this descriptor has a set of allowable values then the given value is
|
||||||
* only checked against the allowable values.
|
* only checked against the allowable values.
|
||||||
*
|
*
|
||||||
* @param input
|
* @param input the value to validate
|
||||||
* @param context
|
* @param context the context of validation
|
||||||
* @return
|
* @return the result of validating the input
|
||||||
*/
|
*/
|
||||||
public ValidationResult validate(final String input, final ValidationContext context) {
|
public ValidationResult validate(final String input, final ValidationContext context) {
|
||||||
ValidationResult lastResult = Validator.INVALID.validate(this.name, input, context);
|
ValidationResult lastResult = Validator.INVALID.validate(this.name, input, context);
|
||||||
|
@ -142,17 +141,17 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
final Set<String> validIdentifiers = context.getControllerServiceLookup().getControllerServiceIdentifiers(controllerServiceDefinition);
|
final Set<String> validIdentifiers = context.getControllerServiceLookup().getControllerServiceIdentifiers(controllerServiceDefinition);
|
||||||
if (validIdentifiers != null && validIdentifiers.contains(input)) {
|
if (validIdentifiers != null && validIdentifiers.contains(input)) {
|
||||||
final ControllerService controllerService = context.getControllerServiceLookup().getControllerService(input);
|
final ControllerService controllerService = context.getControllerServiceLookup().getControllerService(input);
|
||||||
if ( !context.isValidationRequired(controllerService) ) {
|
if (!context.isValidationRequired(controllerService)) {
|
||||||
return new ValidationResult.Builder()
|
return new ValidationResult.Builder()
|
||||||
.input(input)
|
.input(input)
|
||||||
.subject(getName())
|
.subject(getName())
|
||||||
.valid(true)
|
.valid(true)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
final String serviceId = controllerService.getIdentifier();
|
final String serviceId = controllerService.getIdentifier();
|
||||||
if (!context.getControllerServiceLookup().isControllerServiceEnabled(serviceId) &&
|
if (!context.getControllerServiceLookup().isControllerServiceEnabled(serviceId)
|
||||||
!context.getControllerServiceLookup().isControllerServiceEnabling(serviceId)) {
|
&& !context.getControllerServiceLookup().isControllerServiceEnabling(serviceId)) {
|
||||||
return new ValidationResult.Builder()
|
return new ValidationResult.Builder()
|
||||||
.input(context.getControllerServiceLookup().getControllerServiceName(serviceId))
|
.input(context.getControllerServiceLookup().getControllerServiceName(serviceId))
|
||||||
.subject(getName())
|
.subject(getName())
|
||||||
|
@ -235,8 +234,8 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
* This is beneficial because it allows a User Interface to represent
|
* This is beneficial because it allows a User Interface to represent
|
||||||
* the name differently.
|
* the name differently.
|
||||||
*
|
*
|
||||||
* @param displayName
|
* @param displayName of the property
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
public Builder displayName(final String displayName) {
|
public Builder displayName(final String displayName) {
|
||||||
if (null != displayName) {
|
if (null != displayName) {
|
||||||
|
@ -249,8 +248,8 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
/**
|
/**
|
||||||
* Sets the property name.
|
* Sets the property name.
|
||||||
*
|
*
|
||||||
* @param name
|
* @param name of the property
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
public Builder name(final String name) {
|
public Builder name(final String name) {
|
||||||
if (null != name) {
|
if (null != name) {
|
||||||
|
@ -263,8 +262,8 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
* Sets the value indicating whether or not this Property will support
|
* Sets the value indicating whether or not this Property will support
|
||||||
* the Attribute Expression Language.
|
* the Attribute Expression Language.
|
||||||
*
|
*
|
||||||
* @param supported
|
* @param supported true if yes; false otherwise
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
public Builder expressionLanguageSupported(final boolean supported) {
|
public Builder expressionLanguageSupported(final boolean supported) {
|
||||||
this.expressionLanguageSupported = supported;
|
this.expressionLanguageSupported = supported;
|
||||||
|
@ -272,9 +271,8 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @param description of the property
|
||||||
* @param description
|
* @return the builder
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Builder description(final String description) {
|
public Builder description(final String description) {
|
||||||
if (null != description) {
|
if (null != description) {
|
||||||
|
@ -294,8 +292,8 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
* should be set to the "Value" of the {@link AllowableValue} object
|
* should be set to the "Value" of the {@link AllowableValue} object
|
||||||
* (see {@link AllowableValue#getValue()}).
|
* (see {@link AllowableValue#getValue()}).
|
||||||
*
|
*
|
||||||
* @param value
|
* @param value default value
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
public Builder defaultValue(final String value) {
|
public Builder defaultValue(final String value) {
|
||||||
if (null != value) {
|
if (null != value) {
|
||||||
|
@ -310,9 +308,8 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @param values contrained set of values
|
||||||
* @param values
|
* @return the builder
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Builder allowableValues(final Set<String> values) {
|
public Builder allowableValues(final Set<String> values) {
|
||||||
if (null != values) {
|
if (null != values) {
|
||||||
|
@ -336,9 +333,8 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @param values constrained set of values
|
||||||
* @param values
|
* @return the builder
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Builder allowableValues(final String... values) {
|
public Builder allowableValues(final String... values) {
|
||||||
if (null != values) {
|
if (null != values) {
|
||||||
|
@ -353,8 +349,8 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
/**
|
/**
|
||||||
* Sets the Allowable Values for this Property
|
* Sets the Allowable Values for this Property
|
||||||
*
|
*
|
||||||
* @param values
|
* @param values contrained set of values
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
public Builder allowableValues(final AllowableValue... values) {
|
public Builder allowableValues(final AllowableValue... values) {
|
||||||
if (null != values) {
|
if (null != values) {
|
||||||
|
@ -364,9 +360,8 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @param required true if yes; false otherwise
|
||||||
* @param required
|
* @return the builder
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Builder required(final boolean required) {
|
public Builder required(final boolean required) {
|
||||||
this.required = required;
|
this.required = required;
|
||||||
|
@ -374,9 +369,8 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @param sensitive true if sensitive; false otherwise
|
||||||
* @param sensitive
|
* @return the builder
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Builder sensitive(final boolean sensitive) {
|
public Builder sensitive(final boolean sensitive) {
|
||||||
this.sensitive = sensitive;
|
this.sensitive = sensitive;
|
||||||
|
@ -384,9 +378,8 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @param validator for the property
|
||||||
* @param validator
|
* @return the builder
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Builder addValidator(final Validator validator) {
|
public Builder addValidator(final Validator validator) {
|
||||||
if (validator != null) {
|
if (validator != null) {
|
||||||
|
@ -401,7 +394,7 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
*
|
*
|
||||||
* @param controllerServiceDefinition the interface that is implemented
|
* @param controllerServiceDefinition the interface that is implemented
|
||||||
* by the Controller Service
|
* by the Controller Service
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
public Builder identifiesControllerService(final Class<? extends ControllerService> controllerServiceDefinition) {
|
public Builder identifiesControllerService(final Class<? extends ControllerService> controllerServiceDefinition) {
|
||||||
if (controllerServiceDefinition != null) {
|
if (controllerServiceDefinition != null) {
|
||||||
|
@ -436,7 +429,7 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
throw new IllegalStateException("Must specify a name");
|
throw new IllegalStateException("Must specify a name");
|
||||||
}
|
}
|
||||||
if (!isValueAllowed(defaultValue)) {
|
if (!isValueAllowed(defaultValue)) {
|
||||||
throw new IllegalStateException("Default value ["+ defaultValue +"] is not in the set of allowable values");
|
throw new IllegalStateException("Default value [" + defaultValue + "] is not in the set of allowable values");
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PropertyDescriptor(this);
|
return new PropertyDescriptor(this);
|
||||||
|
@ -525,7 +518,7 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
|
||||||
* Constructs a validator that will check if the given value is in the
|
* Constructs a validator that will check if the given value is in the
|
||||||
* given set.
|
* given set.
|
||||||
*
|
*
|
||||||
* @param validValues
|
* @param validValues values which are acceptible
|
||||||
* @throws NullPointerException if the given validValues is null
|
* @throws NullPointerException if the given validValues is null
|
||||||
*/
|
*/
|
||||||
private ConstrainedSetValidator(final Collection<AllowableValue> validValues) {
|
private ConstrainedSetValidator(final Collection<AllowableValue> validValues) {
|
||||||
|
|
|
@ -89,25 +89,21 @@ public interface PropertyValue {
|
||||||
public Double asDataSize(DataUnit dataUnit);
|
public Double asDataSize(DataUnit dataUnit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the ControllerService whose identifier is the raw value of
|
* @return the ControllerService whose identifier is the raw value of
|
||||||
* <code>this</code>, or <code>null</code> if either the value is not set or
|
* <code>this</code>, or <code>null</code> if either the value is not set or
|
||||||
* the value does not identify a ControllerService
|
* the value does not identify a ControllerService
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public ControllerService asControllerService();
|
public ControllerService asControllerService();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the ControllerService whose identifier is the raw value of the
|
* @param <T> the generic type of the controller service
|
||||||
|
* @param serviceType the class of the Controller Service
|
||||||
|
* @return the ControllerService whose identifier is the raw value of the
|
||||||
* <code>this</code>, or <code>null</code> if either the value is not set or
|
* <code>this</code>, or <code>null</code> if either the value is not set or
|
||||||
* the value does not identify a ControllerService. The object returned by
|
* the value does not identify a ControllerService. The object returned by
|
||||||
* this method is explicitly cast to type specified, if the type specified
|
* this method is explicitly cast to type specified, if the type specified
|
||||||
* is valid. Otherwise, throws an IllegalArgumentException
|
* is valid. Otherwise, throws an IllegalArgumentException
|
||||||
*
|
*
|
||||||
* @param <T>
|
|
||||||
* @param serviceType
|
|
||||||
* @return
|
|
||||||
*
|
|
||||||
* @throws IllegalArgumentException if the value of <code>this</code> points
|
* @throws IllegalArgumentException if the value of <code>this</code> points
|
||||||
* to a ControllerService but that service is not of type
|
* to a ControllerService but that service is not of type
|
||||||
* <code>serviceType</code> or if <code>serviceType</code> references a
|
* <code>serviceType</code> or if <code>serviceType</code> references a
|
||||||
|
@ -116,11 +112,9 @@ public interface PropertyValue {
|
||||||
public <T extends ControllerService> T asControllerService(Class<T> serviceType) throws IllegalArgumentException;
|
public <T extends ControllerService> T asControllerService(Class<T> serviceType) throws IllegalArgumentException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the user has configured a value, or if the
|
* @return <code>true</code> if the user has configured a value, or if the
|
||||||
* {@link PropertyDescriptor} for the associated property has a default
|
* {@link PropertyDescriptor} for the associated property has a default
|
||||||
* value, <code>false</code> otherwise.
|
* value, <code>false</code> otherwise
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public boolean isSet();
|
public boolean isSet();
|
||||||
|
|
||||||
|
@ -131,7 +125,8 @@ public interface PropertyValue {
|
||||||
* call chaining.
|
* call chaining.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @return
|
* @return a PropertyValue with the new value is returned, supporting call
|
||||||
|
* chaining
|
||||||
*
|
*
|
||||||
* @throws ProcessException if the Query cannot be compiled or evaluating
|
* @throws ProcessException if the Query cannot be compiled or evaluating
|
||||||
* the query against the given attributes causes an Exception to be thrown
|
* the query against the given attributes causes an Exception to be thrown
|
||||||
|
@ -145,8 +140,9 @@ public interface PropertyValue {
|
||||||
* call chaining.
|
* call chaining.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param flowFile
|
* @param flowFile to evaluate attributes of
|
||||||
* @return
|
* @return a PropertyValue with the new value is returned, supporting call
|
||||||
|
* chaining
|
||||||
*
|
*
|
||||||
* @throws ProcessException if the Query cannot be compiled or evaluating
|
* @throws ProcessException if the Query cannot be compiled or evaluating
|
||||||
* the query against the given attributes causes an Exception to be thrown
|
* the query against the given attributes causes an Exception to be thrown
|
||||||
|
@ -161,8 +157,10 @@ public interface PropertyValue {
|
||||||
* supporting call chaining.
|
* supporting call chaining.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param decorator
|
* @param decorator The supplied decorator is then given a chance to
|
||||||
* @return
|
* decorate the value
|
||||||
|
* @return a PropertyValue with the new value is then returned, supporting
|
||||||
|
* call chaining
|
||||||
*
|
*
|
||||||
* @throws ProcessException if the Query cannot be compiled or evaluating
|
* @throws ProcessException if the Query cannot be compiled or evaluating
|
||||||
* the query against the given attributes causes an Exception to be thrown
|
* the query against the given attributes causes an Exception to be thrown
|
||||||
|
@ -177,10 +175,12 @@ public interface PropertyValue {
|
||||||
* supporting call chaining.
|
* supporting call chaining.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param flowFile
|
* @param flowFile to evaluate expressions against
|
||||||
* @param decorator
|
* @param decorator The supplied decorator is then given a chance to
|
||||||
|
* decorate the value
|
||||||
*
|
*
|
||||||
* @return
|
* @return a PropertyValue with the new value is then returned, supporting
|
||||||
|
* call chaining
|
||||||
*
|
*
|
||||||
* @throws ProcessException if the Query cannot be compiled or evaluating
|
* @throws ProcessException if the Query cannot be compiled or evaluating
|
||||||
* the query against the given attributes causes an Exception to be thrown
|
* the query against the given attributes causes an Exception to be thrown
|
||||||
|
|
|
@ -25,86 +25,71 @@ import org.apache.nifi.expression.ExpressionLanguageCompiler;
|
||||||
public interface ValidationContext {
|
public interface ValidationContext {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link ControllerServiceLookup} which can be used to obtain
|
* @return the {@link ControllerServiceLookup} which can be used to obtain
|
||||||
* Controller Services
|
* Controller Services
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ControllerServiceLookup getControllerServiceLookup();
|
ControllerServiceLookup getControllerServiceLookup();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a ValidationContext that is appropriate for validating the given
|
* @param controllerService to lookup the validation context of
|
||||||
|
* @return a ValidationContext that is appropriate for validating the given
|
||||||
* {@link ControllerService}
|
* {@link ControllerService}
|
||||||
*
|
|
||||||
* @param controllerService
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ValidationContext getControllerServiceValidationContext(ControllerService controllerService);
|
ValidationContext getControllerServiceValidationContext(ControllerService controllerService);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and returns a new {@link ExpressionLanguageCompiler} that can be
|
* @return a new {@link ExpressionLanguageCompiler} that can be used to
|
||||||
* used to compile & evaluate Attribute Expressions
|
* compile & evaluate Attribute Expressions
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ExpressionLanguageCompiler newExpressionLanguageCompiler();
|
ExpressionLanguageCompiler newExpressionLanguageCompiler();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a PropertyValue that encapsulates the value configured for the
|
* @param property being validated
|
||||||
|
* @return a PropertyValue that encapsulates the value configured for the
|
||||||
* given PropertyDescriptor
|
* given PropertyDescriptor
|
||||||
*
|
|
||||||
* @param property
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
PropertyValue getProperty(PropertyDescriptor property);
|
PropertyValue getProperty(PropertyDescriptor property);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a PropertyValue that represents the given value
|
* @param value to make a PropertyValue object for
|
||||||
*
|
* @return a PropertyValue that represents the given value
|
||||||
* @param value
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
PropertyValue newPropertyValue(String value);
|
PropertyValue newPropertyValue(String value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a Map of all configured Properties.
|
* @return a Map of all configured Properties
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Map<PropertyDescriptor, String> getProperties();
|
Map<PropertyDescriptor, String> getProperties();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the currently configured Annotation Data
|
* @return the currently configured Annotation Data
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getAnnotationData();
|
String getAnnotationData();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* There are times when the framework needs to consider a component valid, even if it
|
* There are times when the framework needs to consider a component valid,
|
||||||
* references an invalid ControllerService. This method will return <code>false</code>
|
* even if it references an invalid ControllerService. This method will
|
||||||
* if the component is to be considered valid even if the given Controller Service is referenced
|
* return <code>false</code> if the component is to be considered valid even
|
||||||
* and is invalid.
|
* if the given Controller Service is referenced and is invalid.
|
||||||
* @param service
|
*
|
||||||
|
* @param service to check if validation is required
|
||||||
|
* @return <code>false</code> if the component is to be considered valid
|
||||||
|
* even if the given Controller Service is referenced and is invalid
|
||||||
*/
|
*/
|
||||||
boolean isValidationRequired(ControllerService service);
|
boolean isValidationRequired(ControllerService service);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the given value contains a NiFi Expression Language expression,
|
* @param value to test whether expression language is present
|
||||||
* <code>false</code> if it does not
|
* @return <code>true</code> if the given value contains a NiFi Expression
|
||||||
*
|
* Language expression, <code>false</code> if it does not
|
||||||
* @param value
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
boolean isExpressionLanguagePresent(String value);
|
boolean isExpressionLanguagePresent(String value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the property with the given name supports the NiFi Expression Language,
|
* @param propertyName to test whether expression language is supported
|
||||||
* <code>false</code> if the property does not support the Expression Language or is not a valid property
|
* @return <code>true</code> if the property with the given name supports
|
||||||
* name
|
* the NiFi Expression Language, <code>false</code> if the property does not
|
||||||
*
|
* support the Expression Language or is not a valid property name
|
||||||
* @param propertyName
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
boolean isExpressionLanguageSupported(String propertyName);
|
boolean isExpressionLanguageSupported(String propertyName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,8 +119,8 @@ public class ValidationResult {
|
||||||
/**
|
/**
|
||||||
* Defaults to false
|
* Defaults to false
|
||||||
*
|
*
|
||||||
* @param valid
|
* @param valid true if is valid; false otherwise
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
public Builder valid(final boolean valid) {
|
public Builder valid(final boolean valid) {
|
||||||
this.valid = valid;
|
this.valid = valid;
|
||||||
|
@ -130,8 +130,8 @@ public class ValidationResult {
|
||||||
/**
|
/**
|
||||||
* Defaults to empty string
|
* Defaults to empty string
|
||||||
*
|
*
|
||||||
* @param input
|
* @param input what was validated
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
public Builder input(final String input) {
|
public Builder input(final String input) {
|
||||||
if (null != input) {
|
if (null != input) {
|
||||||
|
@ -143,8 +143,8 @@ public class ValidationResult {
|
||||||
/**
|
/**
|
||||||
* Defaults to empty string
|
* Defaults to empty string
|
||||||
*
|
*
|
||||||
* @param explanation
|
* @param explanation of validation result
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
public Builder explanation(final String explanation) {
|
public Builder explanation(final String explanation) {
|
||||||
if (null != explanation) {
|
if (null != explanation) {
|
||||||
|
@ -156,8 +156,8 @@ public class ValidationResult {
|
||||||
/**
|
/**
|
||||||
* Defaults to empty string
|
* Defaults to empty string
|
||||||
*
|
*
|
||||||
* @param subject
|
* @param subject the thing that was validated
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
public Builder subject(final String subject) {
|
public Builder subject(final String subject) {
|
||||||
if (null != subject) {
|
if (null != subject) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ public abstract class AbstractControllerService extends AbstractConfigurableComp
|
||||||
private ControllerServiceLookup serviceLookup;
|
private ControllerServiceLookup serviceLookup;
|
||||||
private volatile ConfigurationContext configContext;
|
private volatile ConfigurationContext configContext;
|
||||||
private ComponentLog logger;
|
private ComponentLog logger;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void initialize(final ControllerServiceInitializationContext context) throws InitializationException {
|
public final void initialize(final ControllerServiceInitializationContext context) throws InitializationException {
|
||||||
this.identifier = context.getIdentifier();
|
this.identifier = context.getIdentifier();
|
||||||
|
@ -52,31 +52,25 @@ public abstract class AbstractControllerService extends AbstractConfigurableComp
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the currently configured value for the given
|
* @param descriptor to retrieve value of
|
||||||
|
* @return the currently configured value for the given
|
||||||
* {@link PropertyDescriptor}
|
* {@link PropertyDescriptor}
|
||||||
*
|
|
||||||
* @param descriptor
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
protected final PropertyValue getProperty(final PropertyDescriptor descriptor) {
|
protected final PropertyValue getProperty(final PropertyDescriptor descriptor) {
|
||||||
return configContext.getProperty(descriptor);
|
return configContext.getProperty(descriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an unmodifiable map of all configured properties for this
|
* @return an unmodifiable map of all configured properties for this
|
||||||
* {@link ControllerService}
|
* {@link ControllerService}
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
protected final Map<PropertyDescriptor, String> getProperties() {
|
protected final Map<PropertyDescriptor, String> getProperties() {
|
||||||
return configContext.getProperties();
|
return configContext.getProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link ControllerServiceLookup} that was passed to the
|
* @return the {@link ControllerServiceLookup} that was passed to the
|
||||||
* {@link #init(ProcessorInitializationContext)} method
|
* {@link #init(ProcessorInitializationContext)} method
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
protected final ControllerServiceLookup getControllerServiceLookup() {
|
protected final ControllerServiceLookup getControllerServiceLookup() {
|
||||||
return serviceLookup;
|
return serviceLookup;
|
||||||
|
@ -86,15 +80,15 @@ public abstract class AbstractControllerService extends AbstractConfigurableComp
|
||||||
* Provides a mechanism by which subclasses can perform initialization of
|
* Provides a mechanism by which subclasses can perform initialization of
|
||||||
* the Reporting Task before it is scheduled to be run
|
* the Reporting Task before it is scheduled to be run
|
||||||
*
|
*
|
||||||
* @param config
|
* @param config of initialization context
|
||||||
* @throws InitializationException
|
* @throws InitializationException if unable to init
|
||||||
*/
|
*/
|
||||||
protected void init(final ControllerServiceInitializationContext config) throws InitializationException {
|
protected void init(final ControllerServiceInitializationContext config) throws InitializationException {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the logger that has been provided to the component by the framework in its initialize method.
|
* @return the logger that has been provided to the component by the
|
||||||
* @return
|
* framework in its initialize method
|
||||||
*/
|
*/
|
||||||
protected ComponentLog getLogger() {
|
protected ComponentLog getLogger() {
|
||||||
return logger;
|
return logger;
|
||||||
|
|
|
@ -28,18 +28,14 @@ import org.apache.nifi.components.PropertyValue;
|
||||||
public interface ConfigurationContext {
|
public interface ConfigurationContext {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the configured value for the property with the given name
|
* @param property to retrieve by name
|
||||||
*
|
* @return the configured value for the property with the given name
|
||||||
* @param property
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
PropertyValue getProperty(PropertyDescriptor property);
|
PropertyValue getProperty(PropertyDescriptor property);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an unmodifiable map of all configured properties for this
|
* @return an unmodifiable map of all configured properties for this
|
||||||
* {@link ControllerService}
|
* {@link ControllerService}
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Map<PropertyDescriptor, String> getProperties();
|
Map<PropertyDescriptor, String> getProperties();
|
||||||
|
|
||||||
|
|
|
@ -68,21 +68,20 @@ import org.apache.nifi.reporting.ReportingTask;
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* <code><pre>
|
* <code><pre>
|
||||||
* public static final PropertyDescriptor MY_PROPERTY = new PropertyDescriptor.Builder()
|
* public static final PropertyDescriptor MY_PROPERTY = new PropertyDescriptor.Builder()
|
||||||
* .name("My Property")
|
* .name("My Property")
|
||||||
* .description("Example Property")
|
* .description("Example Property")
|
||||||
* .identifiesControllerService( MyControllerServiceInterface.class )
|
* .identifiesControllerService( MyControllerServiceInterface.class )
|
||||||
* .build();
|
* .build();
|
||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
|
* public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException {
|
||||||
|
* // Obtain the user-selected controller service
|
||||||
|
* final MyControllerServiceInterface service = context.getProperty(MY_PROPERTY).asControllerService( MyControllerServiceInterface.class );
|
||||||
|
* ...
|
||||||
|
* }
|
||||||
*
|
*
|
||||||
* public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException {
|
* </pre></code></p>
|
||||||
* // Obtain the user-selected controller service
|
|
||||||
* final MyControllerServiceInterface service = context.getProperty(MY_PROPERTY).asControllerService( MyControllerServiceInterface.class );
|
|
||||||
* ...
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* </pre></code></p>
|
|
||||||
* </li>
|
* </li>
|
||||||
* <li>A Controller Service can be obtained via a
|
* <li>A Controller Service can be obtained via a
|
||||||
* {@link ControllerServiceLookup}. This lookup may be obtained, for example,
|
* {@link ControllerServiceLookup}. This lookup may be obtained, for example,
|
||||||
|
@ -94,10 +93,9 @@ import org.apache.nifi.reporting.ReportingTask;
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* <code><pre>
|
* <code><pre>
|
||||||
* public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException {
|
* public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException {
|
||||||
* final MyControllerServiceInterface service = (MyControllerServiceInterface)
|
* final MyControllerServiceInterface service = (MyControllerServiceInterface) context.getControllerServiceLookup().getControllerService("service_identifier");
|
||||||
* context.getControllerServiceLookup().getControllerService("service_identifier");
|
* }
|
||||||
* }
|
|
||||||
* </pre></code></p>
|
* </pre></code></p>
|
||||||
* </li>
|
* </li>
|
||||||
* </ul>
|
* </ul>
|
||||||
|
@ -142,12 +140,12 @@ import org.apache.nifi.reporting.ReportingTask;
|
||||||
* <p>
|
* <p>
|
||||||
* Typically, this is done by creating a NAR structure as follows:
|
* Typically, this is done by creating a NAR structure as follows:
|
||||||
* <pre>
|
* <pre>
|
||||||
* + my-services-api-nar
|
* + my-services-api-nar
|
||||||
* +--- service-X-implementation-nar
|
* +--- service-X-implementation-nar
|
||||||
* +--- service-Y-implementation-nar
|
* +--- service-Y-implementation-nar
|
||||||
* +--- service-Z-implementation-nar
|
* +--- service-Z-implementation-nar
|
||||||
* +--- processor-A-nar
|
* +--- processor-A-nar
|
||||||
* +--- processor-B-nar
|
* +--- processor-B-nar
|
||||||
* </pre>
|
* </pre>
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
|
@ -174,8 +172,8 @@ public interface ControllerService extends ConfigurableComponent {
|
||||||
* throughout the life of the service. This method will be called before any
|
* throughout the life of the service. This method will be called before any
|
||||||
* properties are set
|
* properties are set
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context of initialization
|
||||||
* @throws org.apache.nifi.reporting.InitializationException
|
* @throws org.apache.nifi.reporting.InitializationException if unable to init
|
||||||
*/
|
*/
|
||||||
void initialize(ControllerServiceInitializationContext context) throws InitializationException;
|
void initialize(ControllerServiceInitializationContext context) throws InitializationException;
|
||||||
|
|
||||||
|
|
|
@ -21,26 +21,20 @@ import org.apache.nifi.logging.ComponentLog;
|
||||||
public interface ControllerServiceInitializationContext {
|
public interface ControllerServiceInitializationContext {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the identifier associated with the {@link ControllerService} with
|
* @return the identifier associated with the {@link ControllerService} with
|
||||||
* which this context is associated
|
* which this context is associated
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getIdentifier();
|
String getIdentifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link ControllerServiceLookup} which can be used to obtain
|
* @return the {@link ControllerServiceLookup} which can be used to obtain
|
||||||
* Controller Services
|
* Controller Services
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ControllerServiceLookup getControllerServiceLookup();
|
ControllerServiceLookup getControllerServiceLookup();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a logger that can be used to log important events in a standard way and generate
|
* @return a logger that can be used to log important events in a standard
|
||||||
* bulletins when appropriate
|
* way and generate bulletins when appropriate
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ComponentLog getLogger();
|
ComponentLog getLogger();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,68 +18,53 @@ package org.apache.nifi.controller;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
public interface ControllerServiceLookup {
|
public interface ControllerServiceLookup {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the ControllerService that is registered with the given
|
* @param serviceIdentifier of controller service
|
||||||
|
* @return the ControllerService that is registered with the given
|
||||||
* identifier
|
* identifier
|
||||||
*
|
|
||||||
* @param serviceIdentifier
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ControllerService getControllerService(String serviceIdentifier);
|
ControllerService getControllerService(String serviceIdentifier);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the Controller Service with the given
|
* @param serviceIdentifier identifier of service to check
|
||||||
|
* @return <code>true</code> if the Controller Service with the given
|
||||||
* identifier is enabled, <code>false</code> otherwise. If the given
|
* identifier is enabled, <code>false</code> otherwise. If the given
|
||||||
* identifier is not known by this ControllerServiceLookup, returns
|
* identifier is not known by this ControllerServiceLookup, returns
|
||||||
* <code>false</code>
|
* <code>false</code>
|
||||||
*
|
|
||||||
* @param serviceIdentifier
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
boolean isControllerServiceEnabled(String serviceIdentifier);
|
boolean isControllerServiceEnabled(String serviceIdentifier);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the Controller Service with the given
|
* @param serviceIdentifier idenfitier of service to check
|
||||||
|
* @return <code>true</code> if the Controller Service with the given
|
||||||
* identifier has been enabled but is still in the transitioning state,
|
* identifier has been enabled but is still in the transitioning state,
|
||||||
* otherwise returns <code>false</code>.
|
* otherwise returns <code>false</code>. If the given identifier is not
|
||||||
* If the given identifier is not known by this ControllerServiceLookup,
|
* known by this ControllerServiceLookup, returns <code>false</code>
|
||||||
* returns <code>false</code>.
|
|
||||||
*
|
|
||||||
* @param serviceIdentifier
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
boolean isControllerServiceEnabling(String serviceIdentifier);
|
boolean isControllerServiceEnabling(String serviceIdentifier);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the given Controller Service is enabled,
|
* @param service service to check
|
||||||
|
* @return <code>true</code> if the given Controller Service is enabled,
|
||||||
* <code>false</code> otherwise. If the given Controller Service is not
|
* <code>false</code> otherwise. If the given Controller Service is not
|
||||||
* known by this ControllerServiceLookup, returns <code>false</code>
|
* known by this ControllerServiceLookup, returns <code>false</code>
|
||||||
*
|
|
||||||
* @param service
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
boolean isControllerServiceEnabled(ControllerService service);
|
boolean isControllerServiceEnabled(ControllerService service);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the set of all Controller Service Identifiers whose Controller
|
* @param serviceType type of service to get identifiers for
|
||||||
* Service is of the given type. The class specified MUST be an interface,
|
* @return the set of all Controller Service Identifiers whose Controller
|
||||||
* or an IllegalArgumentExcption will be thrown
|
* Service is of the given type.
|
||||||
*
|
|
||||||
* @param serviceType
|
|
||||||
* @return
|
|
||||||
*
|
|
||||||
* @throws IllegalArgumentException if the given class is not an interface
|
* @throws IllegalArgumentException if the given class is not an interface
|
||||||
*/
|
*/
|
||||||
Set<String> getControllerServiceIdentifiers(Class<? extends ControllerService> serviceType) throws IllegalArgumentException;
|
Set<String> getControllerServiceIdentifiers(Class<? extends ControllerService> serviceType) throws IllegalArgumentException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the Controller service with the given identifier. If no service can be
|
* @param serviceIdentifier identifier to look up
|
||||||
* found with this identifier, returns {@code null}.
|
* @return the name of the Controller service with the given identifier. If
|
||||||
* @param serviceIdentifier
|
* no service can be found with this identifier, returns {@code null}
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getControllerServiceName(String serviceIdentifier);
|
String getControllerServiceName(String serviceIdentifier);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,10 +40,8 @@ public interface FlowFileQueue {
|
||||||
List<FlowFilePrioritizer> getPriorities();
|
List<FlowFilePrioritizer> getPriorities();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the minimum number of FlowFiles that must be present in order for
|
* @return the minimum number of FlowFiles that must be present in order for
|
||||||
* FlowFiles to begin being swapped out of the queue
|
* FlowFiles to begin being swapped out of the queue
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
int getSwapThreshold();
|
int getSwapThreshold();
|
||||||
|
|
||||||
|
@ -71,9 +69,7 @@ public interface FlowFileQueue {
|
||||||
long getBackPressureObjectThreshold();
|
long getBackPressureObjectThreshold();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Establishes this queue's preferred maximum data size.
|
* @param maxDataSize Establishes this queue's preferred maximum data size.
|
||||||
*
|
|
||||||
* @param maxDataSize
|
|
||||||
*/
|
*/
|
||||||
void setBackPressureDataSizeThreshold(String maxDataSize);
|
void setBackPressureDataSizeThreshold(String maxDataSize);
|
||||||
|
|
||||||
|
@ -117,21 +113,21 @@ public interface FlowFileQueue {
|
||||||
/**
|
/**
|
||||||
* places the given file into the queue
|
* places the given file into the queue
|
||||||
*
|
*
|
||||||
* @param file
|
* @param file to place into queue
|
||||||
*/
|
*/
|
||||||
void put(FlowFileRecord file);
|
void put(FlowFileRecord file);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* places the given files into the queue
|
* places the given files into the queue
|
||||||
*
|
*
|
||||||
* @param files
|
* @param files to place into queue
|
||||||
*/
|
*/
|
||||||
void putAll(Collection<FlowFileRecord> files);
|
void putAll(Collection<FlowFileRecord> files);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes all records from the internal swap queue and returns them.
|
* Removes all records from the internal swap queue and returns them.
|
||||||
*
|
*
|
||||||
* @return
|
* @return all removed records from internal swap queue
|
||||||
*/
|
*/
|
||||||
List<FlowFileRecord> pollSwappableRecords();
|
List<FlowFileRecord> pollSwappableRecords();
|
||||||
|
|
||||||
|
@ -139,7 +135,7 @@ public interface FlowFileQueue {
|
||||||
* Restores the records from swap space into this queue, adding the records
|
* Restores the records from swap space into this queue, adding the records
|
||||||
* that have expired to the given set instead of enqueuing them.
|
* that have expired to the given set instead of enqueuing them.
|
||||||
*
|
*
|
||||||
* @param records
|
* @param records that were swapped in
|
||||||
*/
|
*/
|
||||||
void putSwappedRecords(Collection<FlowFileRecord> records);
|
void putSwappedRecords(Collection<FlowFileRecord> records);
|
||||||
|
|
||||||
|
@ -147,15 +143,13 @@ public interface FlowFileQueue {
|
||||||
* Updates the internal counters of how much data is queued, based on
|
* Updates the internal counters of how much data is queued, based on
|
||||||
* swapped data that is being restored.
|
* swapped data that is being restored.
|
||||||
*
|
*
|
||||||
* @param numRecords
|
* @param numRecords count of records swapped in
|
||||||
* @param contentSize
|
* @param contentSize total size of records being swapped in
|
||||||
*/
|
*/
|
||||||
void incrementSwapCount(int numRecords, long contentSize);
|
void incrementSwapCount(int numRecords, long contentSize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of FlowFiles that are enqueued and not swapped
|
* @return the number of FlowFiles that are enqueued and not swapped
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
int unswappedSize();
|
int unswappedSize();
|
||||||
|
|
||||||
|
@ -164,14 +158,14 @@ public interface FlowFileQueue {
|
||||||
int getSwapQueueSize();
|
int getSwapQueueSize();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param expiredRecords
|
* @param expiredRecords expired records
|
||||||
* @return the next flow file on the queue; null if empty
|
* @return the next flow file on the queue; null if empty
|
||||||
*/
|
*/
|
||||||
FlowFileRecord poll(Set<FlowFileRecord> expiredRecords);
|
FlowFileRecord poll(Set<FlowFileRecord> expiredRecords);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param maxResults
|
* @param maxResults limits how many results can be polled
|
||||||
* @param expiredRecords
|
* @param expiredRecords for expired records
|
||||||
* @return the next flow files on the queue up to the max results; null if
|
* @return the next flow files on the queue up to the max results; null if
|
||||||
* empty
|
* empty
|
||||||
*/
|
*/
|
||||||
|
@ -181,10 +175,10 @@ public interface FlowFileQueue {
|
||||||
* Drains flow files from the given source queue into the given destination
|
* Drains flow files from the given source queue into the given destination
|
||||||
* list.
|
* list.
|
||||||
*
|
*
|
||||||
* @param sourceQueue
|
* @param sourceQueue queue to drain from
|
||||||
* @param destination
|
* @param destination Collection to drain to
|
||||||
* @param maxResults max number to drain
|
* @param maxResults max number to drain
|
||||||
* @param expiredRecords
|
* @param expiredRecords for expired records
|
||||||
* @return size (bytes) of flow files drained from queue
|
* @return size (bytes) of flow files drained from queue
|
||||||
*/
|
*/
|
||||||
long drainQueue(Queue<FlowFileRecord> sourceQueue, List<FlowFileRecord> destination, int maxResults, Set<FlowFileRecord> expiredRecords);
|
long drainQueue(Queue<FlowFileRecord> sourceQueue, List<FlowFileRecord> destination, int maxResults, Set<FlowFileRecord> expiredRecords);
|
||||||
|
|
|
@ -24,89 +24,65 @@ import java.util.Set;
|
||||||
public interface Snippet {
|
public interface Snippet {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The id of this snippet.
|
* @return id of this snippet
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getId();
|
public String getId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not this snippet is linked to the data flow. If the Snippet is
|
* @return Whether or not this snippet is linked to the data flow. If the Snippet is
|
||||||
* deleted and is linked, then the underlying components will also be
|
* deleted and is linked, then the underlying components will also be
|
||||||
* deleted. If the Snippet is deleted and is NOT linked, only the Snippet is
|
* deleted. If the Snippet is deleted and is NOT linked, only the Snippet is
|
||||||
* removed
|
* removed
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public boolean isLinked();
|
public boolean isLinked();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The parent group id of the components in this snippet.
|
* @return parent group id of the components in this snippet
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getParentGroupId();
|
public String getParentGroupId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The connections in this snippet.
|
* @return connections in this snippet
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Set<String> getConnections();
|
public Set<String> getConnections();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The funnels in this snippet.
|
* @return funnels in this snippet
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Set<String> getFunnels();
|
public Set<String> getFunnels();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The input ports in this snippet.
|
* @return input ports in this snippet
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Set<String> getInputPorts();
|
public Set<String> getInputPorts();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The output ports in this snippet.
|
* @return output ports in this snippet
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Set<String> getOutputPorts();
|
public Set<String> getOutputPorts();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The labels in this snippet.
|
* @return labels in this snippet
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Set<String> getLabels();
|
public Set<String> getLabels();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the identifiers of all ProcessGroups in this Snippet
|
* @return the identifiers of all ProcessGroups in this Snippet
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Set<String> getProcessGroups();
|
public Set<String> getProcessGroups();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the identifiers of all Processors in this Snippet
|
* @return the identifiers of all Processors in this Snippet
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Set<String> getProcessors();
|
public Set<String> getProcessors();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the identifiers of all RemoteProcessGroups in this Snippet
|
* @return the identifiers of all RemoteProcessGroups in this Snippet
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Set<String> getRemoteProcessGroups();
|
public Set<String> getRemoteProcessGroups();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if this snippet is empty.
|
* @return Determines if this snippet is empty
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public boolean isEmpty();
|
public boolean isEmpty();
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,9 @@ public interface Triggerable {
|
||||||
* be committed or the framework may use the session again for another
|
* be committed or the framework may use the session again for another
|
||||||
* processor down stream</p>
|
* processor down stream</p>
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context in which the component is triggered
|
||||||
* @param sessionFactory used to generate {@link ProcessSession}s to use
|
* @param sessionFactory used to generate {@link ProcessSession}s to use for
|
||||||
* for operating on flow files within the repository
|
* operating on flow files within the repository
|
||||||
*
|
*
|
||||||
* @throws ProcessException if processing did not complete normally though
|
* @throws ProcessException if processing did not complete normally though
|
||||||
* indicates the problem is an understood potential outcome of processing.
|
* indicates the problem is an understood potential outcome of processing.
|
||||||
|
@ -81,7 +81,7 @@ public interface Triggerable {
|
||||||
* <code>Triggerable</code> has any active threads, see
|
* <code>Triggerable</code> has any active threads, see
|
||||||
* {@link ProcessScheduler#getActiveThreadCount(nifi.connectable.Connectable)}.
|
* {@link ProcessScheduler#getActiveThreadCount(nifi.connectable.Connectable)}.
|
||||||
*
|
*
|
||||||
* @return
|
* @return the schedule state
|
||||||
*/
|
*/
|
||||||
ScheduledState getScheduledState();
|
ScheduledState getScheduledState();
|
||||||
|
|
||||||
|
@ -92,12 +92,12 @@ public interface Triggerable {
|
||||||
* invocation of {@link #onTrigger(ProcessContext, ProcessSessionFactory)}
|
* invocation of {@link #onTrigger(ProcessContext, ProcessSessionFactory)}
|
||||||
* have not yet returned
|
* have not yet returned
|
||||||
*
|
*
|
||||||
* @return
|
* @return true if running;false otherwise
|
||||||
*/
|
*/
|
||||||
boolean isRunning();
|
boolean isRunning();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param timeUnit
|
* @param timeUnit for the scheduling period of the component
|
||||||
* @return the amount of time between each scheduling period
|
* @return the amount of time between each scheduling period
|
||||||
*/
|
*/
|
||||||
long getSchedulingPeriod(TimeUnit timeUnit);
|
long getSchedulingPeriod(TimeUnit timeUnit);
|
||||||
|
@ -110,7 +110,8 @@ public interface Triggerable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates how often this Triggerable should be triggered to run
|
* Updates how often this Triggerable should be triggered to run
|
||||||
* @param schedulingPeriod
|
*
|
||||||
|
* @param schedulingPeriod to set
|
||||||
*/
|
*/
|
||||||
void setScheduldingPeriod(String schedulingPeriod);
|
void setScheduldingPeriod(String schedulingPeriod);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,8 +31,9 @@ import java.lang.annotation.Target;
|
||||||
* {@link nifi.controller.ConfigurationContext ConfigurationContext}.
|
* {@link nifi.controller.ConfigurationContext ConfigurationContext}.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
*
|
*
|
||||||
* @deprecated This annotation has been replaced by those in the {@link org.apache.nifi.annotation.lifecycle} package.
|
* @deprecated This annotation has been replaced by those in the
|
||||||
|
* {@link org.apache.nifi.annotation.lifecycle} package.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.METHOD})
|
@Target({ElementType.METHOD})
|
||||||
|
|
|
@ -31,7 +31,6 @@ import org.apache.nifi.controller.repository.claim.ContentClaimManager;
|
||||||
* available on the methods but a merge capability is provided which between
|
* available on the methods but a merge capability is provided which between
|
||||||
* that and creating new claims a merge is available.
|
* that and creating new claims a merge is available.
|
||||||
*
|
*
|
||||||
* @author none
|
|
||||||
*/
|
*/
|
||||||
public interface ContentRepository {
|
public interface ContentRepository {
|
||||||
|
|
||||||
|
@ -40,46 +39,38 @@ public interface ContentRepository {
|
||||||
* ContentClaimManager that is to be used for interacting with Content
|
* ContentClaimManager that is to be used for interacting with Content
|
||||||
* Claims
|
* Claims
|
||||||
*
|
*
|
||||||
* @param claimManager
|
* @param claimManager to handle claims
|
||||||
* @throws java.io.IOException
|
* @throws java.io.IOException if unable to init
|
||||||
*/
|
*/
|
||||||
void initialize(ContentClaimManager claimManager) throws IOException;
|
void initialize(ContentClaimManager claimManager) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shuts down the Content Repository, freeing any resources that may be held.
|
* Shuts down the Content Repository, freeing any resources that may be
|
||||||
* This is called when an administrator shuts down NiFi.
|
* held. This is called when an administrator shuts down NiFi.
|
||||||
*/
|
*/
|
||||||
void shutdown();
|
void shutdown();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the names of all Containers that exist for this Content
|
* @return the names of all Containers that exist for this Content
|
||||||
* Repository
|
* Repository
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Set<String> getContainerNames();
|
Set<String> getContainerNames();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the maximum number of bytes that can be stored in the storage
|
* @param containerName name of container to check capacity on
|
||||||
|
* @return the maximum number of bytes that can be stored in the storage
|
||||||
* mechanism that backs the container with the given name
|
* mechanism that backs the container with the given name
|
||||||
*
|
* @throws java.io.IOException if unable to check capacity
|
||||||
* @param containerName
|
|
||||||
* @return
|
|
||||||
* @throws java.io.IOException
|
|
||||||
*
|
|
||||||
* @throws IllegalArgumentException if no container exists with the given
|
* @throws IllegalArgumentException if no container exists with the given
|
||||||
* name
|
* name
|
||||||
*/
|
*/
|
||||||
long getContainerCapacity(String containerName) throws IOException;
|
long getContainerCapacity(String containerName) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of bytes available to be used used by the storage
|
* @param containerName to check space on
|
||||||
|
* @return the number of bytes available to be used used by the storage
|
||||||
* mechanism that backs the container with the given name
|
* mechanism that backs the container with the given name
|
||||||
*
|
* @throws java.io.IOException if unable to check space
|
||||||
* @param containerName
|
|
||||||
* @return
|
|
||||||
* @throws java.io.IOException
|
|
||||||
*
|
|
||||||
* @throws IllegalArgumentException if no container exists with the given
|
* @throws IllegalArgumentException if no container exists with the given
|
||||||
* name
|
* name
|
||||||
*/
|
*/
|
||||||
|
@ -92,14 +83,14 @@ public interface ContentRepository {
|
||||||
* loss tolerant. If true the repository might choose more volatile storage
|
* loss tolerant. If true the repository might choose more volatile storage
|
||||||
* options which could increase performance for a tradeoff with reliability
|
* options which could increase performance for a tradeoff with reliability
|
||||||
* @return newly created claim
|
* @return newly created claim
|
||||||
* @throws java.io.IOException
|
* @throws java.io.IOException if unable to create claim
|
||||||
*/
|
*/
|
||||||
ContentClaim create(boolean lossTolerant) throws IOException;
|
ContentClaim create(boolean lossTolerant) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Increments the number of claimants for the given claim
|
* Increments the number of claimants for the given claim
|
||||||
*
|
*
|
||||||
* @param claim
|
* @param claim to increment
|
||||||
* @return the number of claimants after incrementing
|
* @return the number of claimants after incrementing
|
||||||
*/
|
*/
|
||||||
int incrementClaimaintCount(ContentClaim claim);
|
int incrementClaimaintCount(ContentClaim claim);
|
||||||
|
@ -107,7 +98,7 @@ public interface ContentRepository {
|
||||||
/**
|
/**
|
||||||
* Obtains the current number of claimants for the given claim
|
* Obtains the current number of claimants for the given claim
|
||||||
*
|
*
|
||||||
* @param claim
|
* @param claim to get count of
|
||||||
* @return the number of claimants
|
* @return the number of claimants
|
||||||
*/
|
*/
|
||||||
int getClaimantCount(ContentClaim claim);
|
int getClaimantCount(ContentClaim claim);
|
||||||
|
@ -117,15 +108,15 @@ public interface ContentRepository {
|
||||||
* claim is null or content cannot be found or removed no exception will be
|
* claim is null or content cannot be found or removed no exception will be
|
||||||
* thrown.
|
* thrown.
|
||||||
*
|
*
|
||||||
* @param claim
|
* @param claim to decrement
|
||||||
* @return
|
* @return new claimant count for the given claim
|
||||||
*/
|
*/
|
||||||
int decrementClaimantCount(ContentClaim claim);
|
int decrementClaimantCount(ContentClaim claim);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the content indicated by the given claim
|
* Removes the content indicated by the given claim
|
||||||
*
|
*
|
||||||
* @param claim
|
* @param claim to remove
|
||||||
*
|
*
|
||||||
* @return a boolean indicating whether or not the destruction of the claim
|
* @return a boolean indicating whether or not the destruction of the claim
|
||||||
* was successful
|
* was successful
|
||||||
|
@ -136,9 +127,9 @@ public interface ContentRepository {
|
||||||
* Clones the content for the given content claim and returns content claim
|
* Clones the content for the given content claim and returns content claim
|
||||||
* of the new object
|
* of the new object
|
||||||
*
|
*
|
||||||
* @param original
|
* @param original to clone
|
||||||
* @param lossTolerant
|
* @param lossTolerant if can be place in a loss tolerant repository
|
||||||
* @return
|
* @return new claim
|
||||||
* @throws IOException if an IO error occurs. Any content written to the new
|
* @throws IOException if an IO error occurs. Any content written to the new
|
||||||
* destination prior to the error will be destroyed
|
* destination prior to the error will be destroyed
|
||||||
*/
|
*/
|
||||||
|
@ -156,7 +147,7 @@ public interface ContentRepository {
|
||||||
* @param footer if supplied will be appended to the output
|
* @param footer if supplied will be appended to the output
|
||||||
* @param demarcator if supplied will be placed in between each merged
|
* @param demarcator if supplied will be placed in between each merged
|
||||||
* object
|
* object
|
||||||
* @throws IOException
|
* @throws IOException if unable to merge
|
||||||
* @throws IllegalArgumentException if the given destination is included in
|
* @throws IllegalArgumentException if the given destination is included in
|
||||||
* the given claims
|
* the given claims
|
||||||
*/
|
*/
|
||||||
|
@ -167,9 +158,9 @@ public interface ContentRepository {
|
||||||
* claim within the repository.
|
* claim within the repository.
|
||||||
*
|
*
|
||||||
* @return the size of the claim
|
* @return the size of the claim
|
||||||
* @param content
|
* @param content to import from
|
||||||
* @param claim the claim to write imported content to
|
* @param claim the claim to write imported content to
|
||||||
* @throws IOException
|
* @throws IOException if failure to read given content
|
||||||
*/
|
*/
|
||||||
long importFrom(Path content, ContentClaim claim) throws IOException;
|
long importFrom(Path content, ContentClaim claim) throws IOException;
|
||||||
|
|
||||||
|
@ -179,11 +170,11 @@ public interface ContentRepository {
|
||||||
* argument
|
* argument
|
||||||
*
|
*
|
||||||
* @return the size of the claim
|
* @return the size of the claim
|
||||||
* @param content
|
* @param content to import from
|
||||||
* @param claim the claim to write imported content to
|
* @param claim the claim to write imported content to
|
||||||
* @param append if true, the content will be appended to the claim; if
|
* @param append if true, the content will be appended to the claim; if
|
||||||
* false, the content will replace the contents of the claim
|
* false, the content will replace the contents of the claim
|
||||||
* @throws IOException
|
* @throws IOException if unable to read content
|
||||||
*/
|
*/
|
||||||
long importFrom(Path content, ContentClaim claim, boolean append) throws IOException;
|
long importFrom(Path content, ContentClaim claim, boolean append) throws IOException;
|
||||||
|
|
||||||
|
@ -192,9 +183,9 @@ public interface ContentRepository {
|
||||||
* claim within the repository.
|
* claim within the repository.
|
||||||
*
|
*
|
||||||
* @return the size of the claim
|
* @return the size of the claim
|
||||||
* @param content
|
* @param content to import from
|
||||||
* @param claim the claim to write imported content to
|
* @param claim the claim to write imported content to
|
||||||
* @throws IOException
|
* @throws IOException if unable to read content
|
||||||
*/
|
*/
|
||||||
long importFrom(InputStream content, ContentClaim claim) throws IOException;
|
long importFrom(InputStream content, ContentClaim claim) throws IOException;
|
||||||
|
|
||||||
|
@ -202,11 +193,11 @@ public interface ContentRepository {
|
||||||
* Imports content from the given stream, appending or replacing the current
|
* Imports content from the given stream, appending or replacing the current
|
||||||
* claim, according to the value of the appen dargument
|
* claim, according to the value of the appen dargument
|
||||||
*
|
*
|
||||||
* @param content
|
* @param content to import from
|
||||||
* @param claim
|
* @param claim to write to
|
||||||
* @param append
|
* @param append whether to append or replace
|
||||||
* @return
|
* @return length of data imported in bytes
|
||||||
* @throws IOException
|
* @throws IOException if failure to read or write stream
|
||||||
*/
|
*/
|
||||||
long importFrom(InputStream content, ContentClaim claim, boolean append) throws IOException;
|
long importFrom(InputStream content, ContentClaim claim, boolean append) throws IOException;
|
||||||
|
|
||||||
|
@ -214,7 +205,7 @@ public interface ContentRepository {
|
||||||
* Exports the content of the given claim to the given destination.
|
* Exports the content of the given claim to the given destination.
|
||||||
*
|
*
|
||||||
* @return the size of the destination or the claim
|
* @return the size of the destination or the claim
|
||||||
* @param claim
|
* @param claim to export from
|
||||||
* @param destination where to export data
|
* @param destination where to export data
|
||||||
* @param append if true appends to the destination; false overwrites
|
* @param append if true appends to the destination; false overwrites
|
||||||
* @throws IOException if an IO error occurs. The state of the content for
|
* @throws IOException if an IO error occurs. The state of the content for
|
||||||
|
@ -227,7 +218,7 @@ public interface ContentRepository {
|
||||||
* Exports the content of the given claim to the given destination.
|
* Exports the content of the given claim to the given destination.
|
||||||
*
|
*
|
||||||
* @return the size of the destination or the claim
|
* @return the size of the destination or the claim
|
||||||
* @param claim
|
* @param claim to export from
|
||||||
* @param destination where to export data
|
* @param destination where to export data
|
||||||
* @param append if true appends to the destination; false overwrites
|
* @param append if true appends to the destination; false overwrites
|
||||||
* @param offset the offset at which the claim should start being copied
|
* @param offset the offset at which the claim should start being copied
|
||||||
|
@ -242,7 +233,7 @@ public interface ContentRepository {
|
||||||
* Exports the content of the given claim to the given destination.
|
* Exports the content of the given claim to the given destination.
|
||||||
*
|
*
|
||||||
* @return the size of the claim
|
* @return the size of the claim
|
||||||
* @param claim
|
* @param claim to export from
|
||||||
* @param destination where to export data
|
* @param destination where to export data
|
||||||
* @throws IOException if an IO error occurs.
|
* @throws IOException if an IO error occurs.
|
||||||
*/
|
*/
|
||||||
|
@ -253,7 +244,7 @@ public interface ContentRepository {
|
||||||
* and copying length bytes, to the given destination.
|
* and copying length bytes, to the given destination.
|
||||||
*
|
*
|
||||||
* @return the number of bytes copied
|
* @return the number of bytes copied
|
||||||
* @param claim
|
* @param claim to export from
|
||||||
* @param destination where to export data
|
* @param destination where to export data
|
||||||
* @param offset the offset into the claim at which the copy should begin
|
* @param offset the offset into the claim at which the copy should begin
|
||||||
* @param length the number of bytes to copy
|
* @param length the number of bytes to copy
|
||||||
|
@ -262,27 +253,27 @@ public interface ContentRepository {
|
||||||
long exportTo(ContentClaim claim, OutputStream destination, long offset, long length) throws IOException;
|
long exportTo(ContentClaim claim, OutputStream destination, long offset, long length) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param claim
|
* @param claim to get size of
|
||||||
* @return size in bytes of content for given claim
|
* @return size in bytes of content for given claim
|
||||||
* @throws IOException
|
* @throws IOException if size check failed
|
||||||
*/
|
*/
|
||||||
long size(ContentClaim claim) throws IOException;
|
long size(ContentClaim claim) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides access to the input stream for the given claim
|
* Provides access to the input stream for the given claim
|
||||||
*
|
*
|
||||||
* @param claim
|
* @param claim to read from
|
||||||
* @return InputStream over the content of the given claim
|
* @return InputStream over the content of the given claim
|
||||||
* @throws IOException
|
* @throws IOException if unable to read
|
||||||
*/
|
*/
|
||||||
InputStream read(ContentClaim claim) throws IOException;
|
InputStream read(ContentClaim claim) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtains an OutputStream to the content for the given claim.
|
* Obtains an OutputStream to the content for the given claim.
|
||||||
*
|
*
|
||||||
* @param claim
|
* @param claim to write to
|
||||||
* @return
|
* @return the stream to write to
|
||||||
* @throws IOException
|
* @throws IOException if unable to obtain stream
|
||||||
*/
|
*/
|
||||||
OutputStream write(ContentClaim claim) throws IOException;
|
OutputStream write(ContentClaim claim) throws IOException;
|
||||||
|
|
||||||
|
@ -300,15 +291,13 @@ public interface ContentRepository {
|
||||||
void cleanup();
|
void cleanup();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a boolean indicating whether or not the content specified by the
|
|
||||||
* given claim can be read, regardless of whether the content has been
|
|
||||||
* archived or not. If the ContentRepository does not implement archiving
|
|
||||||
* capabilities, this method will return <code>false</code>.
|
|
||||||
*
|
|
||||||
* @param contentClaim the Content Claim to check
|
* @param contentClaim the Content Claim to check
|
||||||
* @return
|
* @return Returns a boolean indicating whether or not the content specified
|
||||||
|
* by the given claim can be read, regardless of whether the content has
|
||||||
|
* been archived or not. If the ContentRepository does not implement
|
||||||
|
* archiving capabilities, this method will return <code>false</code>
|
||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException if unable to determine accessibility
|
||||||
*/
|
*/
|
||||||
boolean isAccessible(ContentClaim contentClaim) throws IOException;
|
boolean isAccessible(ContentClaim contentClaim) throws IOException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,28 +27,22 @@ import org.apache.nifi.flowfile.FlowFile;
|
||||||
public interface FlowFileRecord extends FlowFile {
|
public interface FlowFileRecord extends FlowFile {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the time (in millis since epoch) at which this FlowFile should no
|
* @return the time (in millis since epoch) at which this FlowFile should no
|
||||||
* longer be penalized.
|
* longer be penalized
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
long getPenaltyExpirationMillis();
|
long getPenaltyExpirationMillis();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link ContentClaim} that holds the FlowFile's content
|
* @return the {@link ContentClaim} that holds the FlowFile's content
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ContentClaim getContentClaim();
|
ContentClaim getContentClaim();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the byte offset into the {@link ContentClaim} at which the
|
* @return the byte offset into the {@link ContentClaim} at which the
|
||||||
* FlowFile's content occurs. This mechanism allows multiple FlowFiles to
|
* FlowFile's content occurs. This mechanism allows multiple FlowFiles to
|
||||||
* have the same ContentClaim, which can be significantly more efficient for
|
* have the same ContentClaim, which can be significantly more efficient for
|
||||||
* some implementations of
|
* some implementations of
|
||||||
* {@link nifi.controller.repository.ContentRepository ContentRepository}
|
* {@link nifi.controller.repository.ContentRepository ContentRepository}
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
long getContentClaimOffset();
|
long getContentClaimOffset();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ import org.apache.nifi.controller.repository.claim.ContentClaimManager;
|
||||||
/**
|
/**
|
||||||
* Implementations must be thread safe
|
* Implementations must be thread safe
|
||||||
*
|
*
|
||||||
* @author none
|
|
||||||
*/
|
*/
|
||||||
public interface FlowFileRepository extends Closeable {
|
public interface FlowFileRepository extends Closeable {
|
||||||
|
|
||||||
|
@ -36,28 +35,24 @@ public interface FlowFileRepository extends Closeable {
|
||||||
* ContentClaimManager that is to be used for interacting with Content
|
* ContentClaimManager that is to be used for interacting with Content
|
||||||
* Claims
|
* Claims
|
||||||
*
|
*
|
||||||
* @param claimManager
|
* @param claimManager for handling claims
|
||||||
* @throws java.io.IOException
|
* @throws java.io.IOException if unable to initialize repository
|
||||||
*/
|
*/
|
||||||
void initialize(ContentClaimManager claimManager) throws IOException;
|
void initialize(ContentClaimManager claimManager) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the maximum number of bytes that can be stored in the underlying
|
* @return the maximum number of bytes that can be stored in the underlying
|
||||||
* storage mechanism
|
* storage mechanism
|
||||||
*
|
*
|
||||||
* @return
|
* @throws IOException if computing capacity fails
|
||||||
*
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
long getStorageCapacity() throws IOException;
|
long getStorageCapacity() throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of bytes currently available for use by the underlying
|
* @return the number of bytes currently available for use by the underlying
|
||||||
* storage mechanism
|
* storage mechanism
|
||||||
*
|
*
|
||||||
* @return
|
* @throws IOException if computing usable space fails
|
||||||
*
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
long getUsableStorageSpace() throws IOException;
|
long getUsableStorageSpace() throws IOException;
|
||||||
|
|
||||||
|
@ -65,7 +60,7 @@ public interface FlowFileRepository extends Closeable {
|
||||||
* Updates the repository with the given RepositoryRecords.
|
* Updates the repository with the given RepositoryRecords.
|
||||||
*
|
*
|
||||||
* @param records the records to update the repository with
|
* @param records the records to update the repository with
|
||||||
* @throws java.io.IOException
|
* @throws java.io.IOException if update fails
|
||||||
*/
|
*/
|
||||||
void updateRepository(Collection<RepositoryRecord> records) throws IOException;
|
void updateRepository(Collection<RepositoryRecord> records) throws IOException;
|
||||||
|
|
||||||
|
@ -79,7 +74,7 @@ public interface FlowFileRepository extends Closeable {
|
||||||
* returned by a call to {@link #getNextFlowFileSequence()}
|
* returned by a call to {@link #getNextFlowFileSequence()}
|
||||||
*
|
*
|
||||||
* @return index of highest flow file identifier
|
* @return index of highest flow file identifier
|
||||||
* @throws IOException
|
* @throws IOException if load fails
|
||||||
*/
|
*/
|
||||||
long loadFlowFiles(QueueProvider queueProvider, long minimumSequenceNumber) throws IOException;
|
long loadFlowFiles(QueueProvider queueProvider, long minimumSequenceNumber) throws IOException;
|
||||||
|
|
||||||
|
@ -97,7 +92,7 @@ public interface FlowFileRepository extends Closeable {
|
||||||
/**
|
/**
|
||||||
* @return the max ID of all <code>FlowFile</code>s that currently exist in
|
* @return the max ID of all <code>FlowFile</code>s that currently exist in
|
||||||
* the repository.
|
* the repository.
|
||||||
* @throws IOException
|
* @throws IOException if computing max identifier fails
|
||||||
*/
|
*/
|
||||||
long getMaxFlowFileIdentifier() throws IOException;
|
long getMaxFlowFileIdentifier() throws IOException;
|
||||||
|
|
||||||
|
@ -109,7 +104,7 @@ public interface FlowFileRepository extends Closeable {
|
||||||
* @param flowFileQueue the queue that the FlowFiles belong to
|
* @param flowFileQueue the queue that the FlowFiles belong to
|
||||||
* @param swapLocation the location to which the FlowFiles were swapped
|
* @param swapLocation the location to which the FlowFiles were swapped
|
||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException if swap fails
|
||||||
*/
|
*/
|
||||||
void swapFlowFilesOut(List<FlowFileRecord> swappedOut, FlowFileQueue flowFileQueue, String swapLocation) throws IOException;
|
void swapFlowFilesOut(List<FlowFileRecord> swappedOut, FlowFileQueue flowFileQueue, String swapLocation) throws IOException;
|
||||||
|
|
||||||
|
@ -122,7 +117,7 @@ public interface FlowFileRepository extends Closeable {
|
||||||
* @param flowFileRecords the records that were swapped in
|
* @param flowFileRecords the records that were swapped in
|
||||||
* @param flowFileQueue the queue that the FlowFiles belong to
|
* @param flowFileQueue the queue that the FlowFiles belong to
|
||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException if swap fails
|
||||||
*/
|
*/
|
||||||
void swapFlowFilesIn(String swapLocation, List<FlowFileRecord> flowFileRecords, FlowFileQueue flowFileQueue) throws IOException;
|
void swapFlowFilesIn(String swapLocation, List<FlowFileRecord> flowFileRecords, FlowFileQueue flowFileQueue) throws IOException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,9 +55,9 @@ public interface FlowFileSwapManager {
|
||||||
* Notifies FlowFile queues of the number of FlowFiles and content size of
|
* Notifies FlowFile queues of the number of FlowFiles and content size of
|
||||||
* all FlowFiles that are currently swapped out
|
* all FlowFiles that are currently swapped out
|
||||||
*
|
*
|
||||||
* @param connectionProvider
|
* @param connectionProvider provider
|
||||||
* @param claimManager
|
* @param claimManager manager
|
||||||
* @return
|
* @return how many flowfiles have been recovered
|
||||||
*/
|
*/
|
||||||
long recoverSwappedFlowFiles(QueueProvider connectionProvider, ContentClaimManager claimManager);
|
long recoverSwappedFlowFiles(QueueProvider connectionProvider, ContentClaimManager claimManager);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,9 +27,7 @@ import org.apache.nifi.controller.FlowFileQueue;
|
||||||
public interface QueueProvider {
|
public interface QueueProvider {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all <code>FlowFileQueue</code>s that currently exist in the flow
|
* @return all <code>FlowFileQueue</code>s that currently exist in the flow
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Collection<FlowFileQueue> getAllQueues();
|
Collection<FlowFileQueue> getAllQueues();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,60 +26,44 @@ import org.apache.nifi.controller.repository.claim.ContentClaim;
|
||||||
public interface RepositoryRecord {
|
public interface RepositoryRecord {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The FlowFileQueue to which the FlowFile is to be transferred
|
* @return FlowFileQueue to which the FlowFile is to be transferred
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
FlowFileQueue getDestination();
|
FlowFileQueue getDestination();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The FlowFileQueue from which the record was pulled
|
* @return FlowFileQueue from which the record was pulled
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
FlowFileQueue getOriginalQueue();
|
FlowFileQueue getOriginalQueue();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of update that this record encapsulates
|
* @return type of update that this record encapsulates
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
RepositoryRecordType getType();
|
RepositoryRecordType getType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current ContentClaim for the FlowFile
|
* @return current ContentClaim for the FlowFile
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ContentClaim getCurrentClaim();
|
ContentClaim getCurrentClaim();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The original ContentClaim for the FlowFile before any changes were made
|
* @return original ContentClaim for the FlowFile before any changes were made
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ContentClaim getOriginalClaim();
|
ContentClaim getOriginalClaim();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The byte offset into the Content Claim where this FlowFile's content
|
* @return byte offset into the Content Claim where this FlowFile's content
|
||||||
* begins
|
* begins
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
long getCurrentClaimOffset();
|
long getCurrentClaimOffset();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The FlowFile being encapsulated by this record
|
* @return FlowFile being encapsulated by this record
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
FlowFileRecord getCurrent();
|
FlowFileRecord getCurrent();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not the FlowFile's attributes have changed since the FlowFile
|
* @return Whether or not the FlowFile's attributes have changed since the FlowFile
|
||||||
* was pulled from its queue (or created)
|
* was pulled from its queue (or created)
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
boolean isAttributesChanged();
|
boolean isAttributesChanged();
|
||||||
|
|
||||||
|
@ -90,11 +74,9 @@ public interface RepositoryRecord {
|
||||||
boolean isMarkedForAbort();
|
boolean isMarkedForAbort();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the FlowFile is swapped out of the Java heap space, provides the
|
* @return If the FlowFile is swapped out of the Java heap space, provides the
|
||||||
* location of the swap file, or <code>null</code> if the FlowFile is not
|
* location of the swap file, or <code>null</code> if the FlowFile is not
|
||||||
* swapped out
|
* swapped out
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getSwapLocation();
|
String getSwapLocation();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,11 +45,9 @@ public interface ContentClaim extends Comparable<ContentClaim> {
|
||||||
String getSection();
|
String getSection();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies whether or not the Claim is loss-tolerant. If so, we will
|
* @return Indicates whether or not the Claim is loss-tolerant. If so, we will
|
||||||
* attempt to keep the content but will not sacrifice a great deal of
|
* attempt to keep the content but will not sacrifice a great deal of
|
||||||
* performance to do so.
|
* performance to do so
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
boolean isLossTolerant();
|
boolean isLossTolerant();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,20 +28,18 @@ public interface ContentClaimManager {
|
||||||
* Creates a new Content Claim with the given id, container, section, and
|
* Creates a new Content Claim with the given id, container, section, and
|
||||||
* loss tolerance.
|
* loss tolerance.
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id of claim
|
||||||
* @param container
|
* @param container of claim
|
||||||
* @param section
|
* @param section of claim
|
||||||
* @param lossTolerant
|
* @param lossTolerant of claim
|
||||||
* @return
|
* @return new claim
|
||||||
*/
|
*/
|
||||||
ContentClaim newContentClaim(String container, String section, String id, boolean lossTolerant);
|
ContentClaim newContentClaim(String container, String section, String id, boolean lossTolerant);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of FlowFiles that hold a claim to a particular piece
|
* @param claim to obtain reference count for
|
||||||
|
* @return the number of FlowFiles that hold a claim to a particular piece
|
||||||
* of FlowFile content
|
* of FlowFile content
|
||||||
*
|
|
||||||
* @param claim
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
int getClaimantCount(ContentClaim claim);
|
int getClaimantCount(ContentClaim claim);
|
||||||
|
|
||||||
|
@ -49,8 +47,8 @@ public interface ContentClaimManager {
|
||||||
* Decreases by 1 the count of how many FlowFiles hold a claim to a
|
* Decreases by 1 the count of how many FlowFiles hold a claim to a
|
||||||
* particular piece of FlowFile content and returns the new count
|
* particular piece of FlowFile content and returns the new count
|
||||||
*
|
*
|
||||||
* @param claim
|
* @param claim to decrement claimants on
|
||||||
* @return
|
* @return new claimaint count
|
||||||
*/
|
*/
|
||||||
int decrementClaimantCount(ContentClaim claim);
|
int decrementClaimantCount(ContentClaim claim);
|
||||||
|
|
||||||
|
@ -58,8 +56,8 @@ public interface ContentClaimManager {
|
||||||
* Increases by 1 the count of how many FlowFiles hold a claim to a
|
* Increases by 1 the count of how many FlowFiles hold a claim to a
|
||||||
* particular piece of FlowFile content and returns the new count
|
* particular piece of FlowFile content and returns the new count
|
||||||
*
|
*
|
||||||
* @param claim
|
* @param claim to increment claims on
|
||||||
* @return
|
* @return new claimant count
|
||||||
*/
|
*/
|
||||||
int incrementClaimantCount(ContentClaim claim);
|
int incrementClaimantCount(ContentClaim claim);
|
||||||
|
|
||||||
|
@ -73,9 +71,10 @@ public interface ContentClaimManager {
|
||||||
* optimize its tasks, knowing that the Content Claim cannot be referenced
|
* optimize its tasks, knowing that the Content Claim cannot be referenced
|
||||||
* by any other component
|
* by any other component
|
||||||
*
|
*
|
||||||
* @param claim
|
* @param claim to increment
|
||||||
* @param newClaim
|
* @param newClaim provides a hint that no other process can have access to this
|
||||||
* @return
|
* claim right now
|
||||||
|
* @return new claim count
|
||||||
*/
|
*/
|
||||||
int incrementClaimantCount(ContentClaim claim, boolean newClaim);
|
int incrementClaimantCount(ContentClaim claim, boolean newClaim);
|
||||||
|
|
||||||
|
@ -105,7 +104,7 @@ public interface ContentClaimManager {
|
||||||
* unneeded claim. As such, it is now safe to destroy the contents.
|
* unneeded claim. As such, it is now safe to destroy the contents.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param claim
|
* @param claim to mark as now destructable
|
||||||
*/
|
*/
|
||||||
void markDestructable(ContentClaim claim);
|
void markDestructable(ContentClaim claim);
|
||||||
|
|
||||||
|
@ -114,8 +113,8 @@ public interface ContentClaimManager {
|
||||||
* of destructable content claims to the given {@code destination} so that
|
* of destructable content claims to the given {@code destination} so that
|
||||||
* they can be destroyed.
|
* they can be destroyed.
|
||||||
*
|
*
|
||||||
* @param destination
|
* @param destination to drain to
|
||||||
* @param maxElements
|
* @param maxElements max items to drain
|
||||||
*/
|
*/
|
||||||
void drainDestructableClaims(Collection<ContentClaim> destination, int maxElements);
|
void drainDestructableClaims(Collection<ContentClaim> destination, int maxElements);
|
||||||
|
|
||||||
|
@ -128,10 +127,10 @@ public interface ContentClaimManager {
|
||||||
* ready to be destroyed, the method will return without having added
|
* ready to be destroyed, the method will return without having added
|
||||||
* anything to the given {@code destination}.
|
* anything to the given {@code destination}.
|
||||||
*
|
*
|
||||||
* @param destination
|
* @param destination to drain to
|
||||||
* @param maxElements
|
* @param maxElements max items to drain
|
||||||
* @param timeout
|
* @param timeout maximum time to wait
|
||||||
* @param unit
|
* @param unit unit of time to wait
|
||||||
*/
|
*/
|
||||||
void drainDestructableClaims(Collection<ContentClaim> destination, int maxElements, long timeout, TimeUnit unit);
|
void drainDestructableClaims(Collection<ContentClaim> destination, int maxElements, long timeout, TimeUnit unit);
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,8 @@ public class ProcessGroupStatus implements Cloneable {
|
||||||
private long bytesReceived;
|
private long bytesReceived;
|
||||||
private int flowFilesSent;
|
private int flowFilesSent;
|
||||||
private long bytesSent;
|
private long bytesSent;
|
||||||
|
private int flowFilesTransferred;
|
||||||
|
private long bytesTransferred;
|
||||||
|
|
||||||
private Collection<ConnectionStatus> connectionStatus = new ArrayList<>();
|
private Collection<ConnectionStatus> connectionStatus = new ArrayList<>();
|
||||||
private Collection<ProcessorStatus> processorStatus = new ArrayList<>();
|
private Collection<ProcessorStatus> processorStatus = new ArrayList<>();
|
||||||
|
@ -227,6 +229,22 @@ public class ProcessGroupStatus implements Cloneable {
|
||||||
this.bytesSent = bytesSent;
|
this.bytesSent = bytesSent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getFlowFilesTransferred() {
|
||||||
|
return flowFilesTransferred;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowFilesTransferred(int flowFilesTransferred) {
|
||||||
|
this.flowFilesTransferred = flowFilesTransferred;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getBytesTransferred() {
|
||||||
|
return bytesTransferred;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBytesTransferred(long bytesTransferred) {
|
||||||
|
this.bytesTransferred = bytesTransferred;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProcessGroupStatus clone() {
|
public ProcessGroupStatus clone() {
|
||||||
|
|
||||||
|
@ -248,6 +266,8 @@ public class ProcessGroupStatus implements Cloneable {
|
||||||
clonedObj.bytesReceived = bytesReceived;
|
clonedObj.bytesReceived = bytesReceived;
|
||||||
clonedObj.flowFilesSent = flowFilesSent;
|
clonedObj.flowFilesSent = flowFilesSent;
|
||||||
clonedObj.bytesSent = bytesSent;
|
clonedObj.bytesSent = bytesSent;
|
||||||
|
clonedObj.flowFilesTransferred = flowFilesTransferred;
|
||||||
|
clonedObj.bytesTransferred = bytesTransferred;
|
||||||
|
|
||||||
if (connectionStatus != null) {
|
if (connectionStatus != null) {
|
||||||
final Collection<ConnectionStatus> statusList = new ArrayList<>();
|
final Collection<ConnectionStatus> statusList = new ArrayList<>();
|
||||||
|
@ -317,6 +337,18 @@ public class ProcessGroupStatus implements Cloneable {
|
||||||
builder.append(creationTimestamp);
|
builder.append(creationTimestamp);
|
||||||
builder.append(", activeThreadCount=");
|
builder.append(", activeThreadCount=");
|
||||||
builder.append(activeThreadCount);
|
builder.append(activeThreadCount);
|
||||||
|
builder.append(", flowFilesTransferred=");
|
||||||
|
builder.append(flowFilesTransferred);
|
||||||
|
builder.append(", bytesTransferred=");
|
||||||
|
builder.append(bytesTransferred);
|
||||||
|
builder.append(", flowFilesReceived=");
|
||||||
|
builder.append(flowFilesReceived);
|
||||||
|
builder.append(", bytesReceived=");
|
||||||
|
builder.append(bytesReceived);
|
||||||
|
builder.append(", flowFilesSent=");
|
||||||
|
builder.append(flowFilesSent);
|
||||||
|
builder.append(", bytesSent=");
|
||||||
|
builder.append(bytesSent);
|
||||||
builder.append(",\n\tconnectionStatus=");
|
builder.append(",\n\tconnectionStatus=");
|
||||||
|
|
||||||
for (final ConnectionStatus status : connectionStatus) {
|
for (final ConnectionStatus status : connectionStatus) {
|
||||||
|
@ -374,6 +406,12 @@ public class ProcessGroupStatus implements Cloneable {
|
||||||
target.setBytesRead(target.getBytesRead() + toMerge.getBytesRead());
|
target.setBytesRead(target.getBytesRead() + toMerge.getBytesRead());
|
||||||
target.setBytesWritten(target.getBytesWritten() + toMerge.getBytesWritten());
|
target.setBytesWritten(target.getBytesWritten() + toMerge.getBytesWritten());
|
||||||
target.setActiveThreadCount(target.getActiveThreadCount() + toMerge.getActiveThreadCount());
|
target.setActiveThreadCount(target.getActiveThreadCount() + toMerge.getActiveThreadCount());
|
||||||
|
target.setFlowFilesTransferred(target.getFlowFilesTransferred() + toMerge.getFlowFilesTransferred());
|
||||||
|
target.setBytesTransferred(target.getBytesTransferred() + toMerge.getBytesTransferred());
|
||||||
|
target.setFlowFilesReceived(target.getFlowFilesReceived() + toMerge.getFlowFilesReceived());
|
||||||
|
target.setBytesReceived(target.getBytesReceived() + toMerge.getBytesReceived());
|
||||||
|
target.setFlowFilesSent(target.getFlowFilesSent() + toMerge.getFlowFilesSent());
|
||||||
|
target.setBytesSent(target.getBytesSent() + toMerge.getBytesSent());
|
||||||
|
|
||||||
// connection status
|
// connection status
|
||||||
// sort by id
|
// sort by id
|
||||||
|
@ -425,7 +463,7 @@ public class ProcessGroupStatus implements Cloneable {
|
||||||
// processor run status is disabled/stopped/running is part of the flow configuration
|
// processor run status is disabled/stopped/running is part of the flow configuration
|
||||||
// and should not differ amongst nodes. however, whether a processor is invalid
|
// and should not differ amongst nodes. however, whether a processor is invalid
|
||||||
// can be driven by environmental conditions. this check allows any of those to
|
// can be driven by environmental conditions. this check allows any of those to
|
||||||
// take precedence over the configured run status.
|
// take precedence over the configured run status.
|
||||||
if (RunStatus.Invalid.equals(statusToMerge.getRunStatus())) {
|
if (RunStatus.Invalid.equals(statusToMerge.getRunStatus())) {
|
||||||
merged.setRunStatus(RunStatus.Invalid);
|
merged.setRunStatus(RunStatus.Invalid);
|
||||||
}
|
}
|
||||||
|
@ -454,7 +492,7 @@ public class ProcessGroupStatus implements Cloneable {
|
||||||
merged.setTransmitting(true);
|
merged.setTransmitting(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// should be unnecessary here since ports run status should not be affected by
|
// should be unnecessary here since ports run status should not be affected by
|
||||||
// environmental conditions but doing so in case that changes
|
// environmental conditions but doing so in case that changes
|
||||||
if (RunStatus.Invalid.equals(statusToMerge.getRunStatus())) {
|
if (RunStatus.Invalid.equals(statusToMerge.getRunStatus())) {
|
||||||
merged.setRunStatus(RunStatus.Invalid);
|
merged.setRunStatus(RunStatus.Invalid);
|
||||||
|
@ -484,7 +522,7 @@ public class ProcessGroupStatus implements Cloneable {
|
||||||
merged.setTransmitting(true);
|
merged.setTransmitting(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// should be unnecessary here since ports run status not should be affected by
|
// should be unnecessary here since ports run status not should be affected by
|
||||||
// environmental conditions but doing so in case that changes
|
// environmental conditions but doing so in case that changes
|
||||||
if (RunStatus.Invalid.equals(statusToMerge.getRunStatus())) {
|
if (RunStatus.Invalid.equals(statusToMerge.getRunStatus())) {
|
||||||
merged.setRunStatus(RunStatus.Invalid);
|
merged.setRunStatus(RunStatus.Invalid);
|
||||||
|
|
|
@ -33,7 +33,7 @@ public interface ComponentStatusRepository {
|
||||||
/**
|
/**
|
||||||
* Captures the status information provided in the given report
|
* Captures the status information provided in the given report
|
||||||
*
|
*
|
||||||
* @param rootGroupStatus
|
* @param rootGroupStatus status of root group
|
||||||
*/
|
*/
|
||||||
void capture(ProcessGroupStatus rootGroupStatus);
|
void capture(ProcessGroupStatus rootGroupStatus);
|
||||||
|
|
||||||
|
@ -42,22 +42,17 @@ public interface ComponentStatusRepository {
|
||||||
* timestamp that indicates the time at which the status report was
|
* timestamp that indicates the time at which the status report was
|
||||||
* generated. This can be used to replay historical values.
|
* generated. This can be used to replay historical values.
|
||||||
*
|
*
|
||||||
* @param rootGroupStatus
|
* @param rootGroupStatus status
|
||||||
* @param timestamp
|
* @param timestamp timestamp of capture
|
||||||
*/
|
*/
|
||||||
void capture(ProcessGroupStatus rootGroupStatus, Date timestamp);
|
void capture(ProcessGroupStatus rootGroupStatus, Date timestamp);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Date at which the latest capture was performed
|
* @return the Date at which the latest capture was performed
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Date getLastCaptureDate();
|
Date getLastCaptureDate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link StatusHistory} that provides the status information
|
|
||||||
* about the Connection with the given ID during the given time period.
|
|
||||||
*
|
|
||||||
* @param connectionId the ID of the Connection for which the Status is
|
* @param connectionId the ID of the Connection for which the Status is
|
||||||
* desired
|
* desired
|
||||||
* @param start the earliest date for which status information should be
|
* @param start the earliest date for which status information should be
|
||||||
|
@ -70,15 +65,13 @@ public interface ComponentStatusRepository {
|
||||||
* If the date range is large, the total number of data points could be far
|
* If the date range is large, the total number of data points could be far
|
||||||
* too many to process. Therefore, this parameter allows the requestor to
|
* too many to process. Therefore, this parameter allows the requestor to
|
||||||
* indicate how many samples to return.
|
* indicate how many samples to return.
|
||||||
* @return
|
* @return a {@link StatusHistory} that provides the status information
|
||||||
|
* about the Connection with the given ID during the given time period
|
||||||
*/
|
*/
|
||||||
StatusHistory getConnectionStatusHistory(String connectionId, Date start, Date end, int preferredDataPoints);
|
StatusHistory getConnectionStatusHistory(String connectionId, Date start, Date end, int preferredDataPoints);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link StatusHistory} that provides the status information
|
* @param processGroupId of group to get status of
|
||||||
* about the Process Group with the given ID during the given time period.
|
|
||||||
*
|
|
||||||
* @param processGroupId
|
|
||||||
* @param start the earliest date for which status information should be
|
* @param start the earliest date for which status information should be
|
||||||
* returned; if <code>null</code>, the start date should be assumed to be
|
* returned; if <code>null</code>, the start date should be assumed to be
|
||||||
* the beginning of time
|
* the beginning of time
|
||||||
|
@ -89,15 +82,13 @@ public interface ComponentStatusRepository {
|
||||||
* If the date range is large, the total number of data points could be far
|
* If the date range is large, the total number of data points could be far
|
||||||
* too many to process. Therefore, this parameter allows the requestor to
|
* too many to process. Therefore, this parameter allows the requestor to
|
||||||
* indicate how many samples to return.
|
* indicate how many samples to return.
|
||||||
* @return
|
* @return a {@link StatusHistory} that provides the status information
|
||||||
|
* about the Process Group with the given ID during the given time period
|
||||||
*/
|
*/
|
||||||
StatusHistory getProcessGroupStatusHistory(String processGroupId, Date start, Date end, int preferredDataPoints);
|
StatusHistory getProcessGroupStatusHistory(String processGroupId, Date start, Date end, int preferredDataPoints);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link StatusHistory} that provides the status information
|
* @param processorId to get status of
|
||||||
* about the Processor with the given ID during the given time period.
|
|
||||||
*
|
|
||||||
* @param processorId
|
|
||||||
* @param start the earliest date for which status information should be
|
* @param start the earliest date for which status information should be
|
||||||
* returned; if <code>null</code>, the start date should be assumed to be
|
* returned; if <code>null</code>, the start date should be assumed to be
|
||||||
* the beginning of time
|
* the beginning of time
|
||||||
|
@ -108,16 +99,13 @@ public interface ComponentStatusRepository {
|
||||||
* If the date range is large, the total number of data points could be far
|
* If the date range is large, the total number of data points could be far
|
||||||
* too many to process. Therefore, this parameter allows the requestor to
|
* too many to process. Therefore, this parameter allows the requestor to
|
||||||
* indicate how many samples to return.
|
* indicate how many samples to return.
|
||||||
* @return
|
* @return a {@link StatusHistory} that provides the status information
|
||||||
|
* about the Processor with the given ID during the given time period
|
||||||
*/
|
*/
|
||||||
StatusHistory getProcessorStatusHistory(String processorId, Date start, Date end, int preferredDataPoints);
|
StatusHistory getProcessorStatusHistory(String processorId, Date start, Date end, int preferredDataPoints);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link StatusHistory} that provides the status information
|
* @param remoteGroupId to get history of
|
||||||
* about the Remote Process Group with the given ID during the given time
|
|
||||||
* period.
|
|
||||||
*
|
|
||||||
* @param remoteGroupId
|
|
||||||
* @param start the earliest date for which status information should be
|
* @param start the earliest date for which status information should be
|
||||||
* returned; if <code>null</code>, the start date should be assumed to be
|
* returned; if <code>null</code>, the start date should be assumed to be
|
||||||
* the beginning of time
|
* the beginning of time
|
||||||
|
@ -128,39 +116,33 @@ public interface ComponentStatusRepository {
|
||||||
* If the date range is large, the total number of data points could be far
|
* If the date range is large, the total number of data points could be far
|
||||||
* too many to process. Therefore, this parameter allows the requestor to
|
* too many to process. Therefore, this parameter allows the requestor to
|
||||||
* indicate how many samples to return.
|
* indicate how many samples to return.
|
||||||
* @return
|
* @return a {@link StatusHistory} that provides the status information
|
||||||
|
* about the Remote Process Group with the given ID during the given time
|
||||||
|
* period
|
||||||
*/
|
*/
|
||||||
StatusHistory getRemoteProcessGroupStatusHistory(String remoteGroupId, Date start, Date end, int preferredDataPoints);
|
StatusHistory getRemoteProcessGroupStatusHistory(String remoteGroupId, Date start, Date end, int preferredDataPoints);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a List of all {@link MetricDescriptor}s that are applicable to
|
* @return a List of all {@link MetricDescriptor}s that are applicable to
|
||||||
* Process Groups
|
* Process Groups
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
List<MetricDescriptor<ProcessGroupStatus>> getProcessGroupMetricDescriptors();
|
List<MetricDescriptor<ProcessGroupStatus>> getProcessGroupMetricDescriptors();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a List of all {@link MetricDescriptor}s that are applicable to
|
* @return a List of all {@link MetricDescriptor}s that are applicable to
|
||||||
* Processors
|
* Processors
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
List<MetricDescriptor<ProcessorStatus>> getProcessorMetricDescriptors();
|
List<MetricDescriptor<ProcessorStatus>> getProcessorMetricDescriptors();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a List of all {@link MetricDescriptor}s that are applicable to
|
* @return a List of all {@link MetricDescriptor}s that are applicable to
|
||||||
* Remote Process Groups
|
* Remote Process Groups
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
List<MetricDescriptor<RemoteProcessGroupStatus>> getRemoteProcessGroupMetricDescriptors();
|
List<MetricDescriptor<RemoteProcessGroupStatus>> getRemoteProcessGroupMetricDescriptors();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a List of all {@link MetricDescriptor}s that are applicable to
|
* @return a List of all {@link MetricDescriptor}s that are applicable to
|
||||||
* Connections
|
* Connections
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
List<MetricDescriptor<ConnectionStatus>> getConnectionMetricDescriptors();
|
List<MetricDescriptor<ConnectionStatus>> getConnectionMetricDescriptors();
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,8 @@ package org.apache.nifi.controller.status.history;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes a particular metric that is derived from a Status History
|
* Describes a particular metric that is derived from a Status History
|
||||||
* @param <T>
|
*
|
||||||
|
* @param <T> type of metric
|
||||||
*/
|
*/
|
||||||
public interface MetricDescriptor<T> {
|
public interface MetricDescriptor<T> {
|
||||||
|
|
||||||
|
@ -32,44 +33,34 @@ public interface MetricDescriptor<T> {
|
||||||
/**
|
/**
|
||||||
* Specifies how the values should be formatted
|
* Specifies how the values should be formatted
|
||||||
*
|
*
|
||||||
* @return
|
* @return formatter for values
|
||||||
*/
|
*/
|
||||||
Formatter getFormatter();
|
Formatter getFormatter();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a human-readable description of the field
|
* @return a human-readable description of the field
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getDescription();
|
String getDescription();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a human-readable label for the field
|
* @return a human-readable label for the field
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getLabel();
|
String getLabel();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of a field
|
* @return the name of a field
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getField();
|
String getField();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link ValueMapper} that can be used to extract a value for the
|
* @return a {@link ValueMapper} that can be used to extract a value for the
|
||||||
* status history
|
* status history
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ValueMapper<T> getValueFunction();
|
ValueMapper<T> getValueFunction();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link ValueReducer} that can reduce multiple StatusSnapshots
|
* @return a {@link ValueReducer} that can reduce multiple StatusSnapshots
|
||||||
* into a single Long value
|
* into a single Long value
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ValueReducer<StatusSnapshot, Long> getValueReducer();
|
ValueReducer<StatusSnapshot, Long> getValueReducer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,25 +26,19 @@ import java.util.Map;
|
||||||
public interface StatusHistory {
|
public interface StatusHistory {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a Date indicating when this report was generated
|
* @return a Date indicating when this report was generated
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Date getDateGenerated();
|
Date getDateGenerated();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a Map of component field names and their values. The order in
|
* @return a Map of component field names and their values. The order in
|
||||||
* which these values are displayed is dependent on the natural ordering of
|
* which these values are displayed is dependent on the natural ordering of
|
||||||
* the Map returned.
|
* the Map returned
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Map<String, String> getComponentDetails();
|
Map<String, String> getComponentDetails();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A List of snapshots for a given component
|
* @return List of snapshots for a given component
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
List<StatusSnapshot> getStatusSnapshots();
|
List<StatusSnapshot> getStatusSnapshots();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,24 +25,18 @@ import java.util.Map;
|
||||||
public interface StatusSnapshot {
|
public interface StatusSnapshot {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rreturns the point in time for which the status values were obtained
|
* @return the point in time for which the status values were obtained
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Date getTimestamp();
|
Date getTimestamp();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a Map of MetricDescriptor to value
|
* @return a Map of MetricDescriptor to value
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Map<MetricDescriptor<?>, Long> getStatusMetrics();
|
Map<MetricDescriptor<?>, Long> getStatusMetrics();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link ValueReducer} that is capable of merging multiple
|
* @return a {@link ValueReducer} that is capable of merging multiple
|
||||||
* StatusSnapshot objects into a single one
|
* StatusSnapshot objects into a single one
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ValueReducer<StatusSnapshot, StatusSnapshot> getValueReducer();
|
ValueReducer<StatusSnapshot, StatusSnapshot> getValueReducer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,12 +22,10 @@ import org.apache.nifi.processor.exception.ProcessException;
|
||||||
public interface AttributeExpression {
|
public interface AttributeExpression {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Evaluates the expression without providing any FlowFile Attributes. This
|
* @return Evaluates the expression without providing any FlowFile Attributes. This
|
||||||
* will evaluate the expression based only on System Properties and JVM
|
* will evaluate the expression based only on System Properties and JVM
|
||||||
* Environment properties
|
* Environment properties
|
||||||
*
|
* @throws ProcessException if unable to evaluate
|
||||||
* @return
|
|
||||||
* @throws ProcessException
|
|
||||||
*/
|
*/
|
||||||
String evaluate() throws ProcessException;
|
String evaluate() throws ProcessException;
|
||||||
|
|
||||||
|
@ -36,9 +34,9 @@ public interface AttributeExpression {
|
||||||
* will evaluate the expression based only on System Properties and JVM
|
* will evaluate the expression based only on System Properties and JVM
|
||||||
* Environment properties but allows the values to be decorated
|
* Environment properties but allows the values to be decorated
|
||||||
*
|
*
|
||||||
* @param decorator
|
* @param decorator for attribute value
|
||||||
* @return
|
* @return evaluated value
|
||||||
* @throws ProcessException
|
* @throws ProcessException if failure in evaluation
|
||||||
*/
|
*/
|
||||||
String evaluate(AttributeValueDecorator decorator) throws ProcessException;
|
String evaluate(AttributeValueDecorator decorator) throws ProcessException;
|
||||||
|
|
||||||
|
@ -47,9 +45,9 @@ public interface AttributeExpression {
|
||||||
* id, etc. of the given FlowFile, as well as System Properties and JVM
|
* id, etc. of the given FlowFile, as well as System Properties and JVM
|
||||||
* Environment properties
|
* Environment properties
|
||||||
*
|
*
|
||||||
* @param flowFile
|
* @param flowFile to evaluate
|
||||||
* @return
|
* @return evaluated value
|
||||||
* @throws ProcessException
|
* @throws ProcessException if failure evaluating
|
||||||
*/
|
*/
|
||||||
String evaluate(FlowFile flowFile) throws ProcessException;
|
String evaluate(FlowFile flowFile) throws ProcessException;
|
||||||
|
|
||||||
|
@ -58,17 +56,15 @@ public interface AttributeExpression {
|
||||||
* id, etc. of the given FlowFile, as well as System Properties and JVM
|
* id, etc. of the given FlowFile, as well as System Properties and JVM
|
||||||
* Environment properties and allows the values to be decorated
|
* Environment properties and allows the values to be decorated
|
||||||
*
|
*
|
||||||
* @param flowFile
|
* @param flowFile to evaluate
|
||||||
* @param decorator
|
* @param decorator for evaluation
|
||||||
* @return
|
* @return evaluated value
|
||||||
* @throws ProcessException
|
* @throws ProcessException if failed to evaluate
|
||||||
*/
|
*/
|
||||||
String evaluate(FlowFile flowFile, AttributeValueDecorator decorator) throws ProcessException;
|
String evaluate(FlowFile flowFile, AttributeValueDecorator decorator) throws ProcessException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the type that is returned by the Expression
|
* @return the type that is returned by the Expression
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ResultType getResultType();
|
ResultType getResultType();
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@ public interface AttributeValueDecorator {
|
||||||
* Decorates the value of a FlowFile Attribute or System/JVM property in
|
* Decorates the value of a FlowFile Attribute or System/JVM property in
|
||||||
* some way
|
* some way
|
||||||
*
|
*
|
||||||
* @param attributeValue
|
* @param attributeValue to decorate
|
||||||
* @return
|
* @return decorated value
|
||||||
*/
|
*/
|
||||||
String decorate(String attributeValue);
|
String decorate(String attributeValue);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ public interface ExpressionLanguageCompiler {
|
||||||
* AttributeExpression that can be evaluated
|
* AttributeExpression that can be evaluated
|
||||||
*
|
*
|
||||||
* @param expression the Attribute Expression to be compiled
|
* @param expression the Attribute Expression to be compiled
|
||||||
* @return
|
* @return expression that can be evaluated
|
||||||
* @throws IllegalArgumentException if the given expression is not valid
|
* @throws IllegalArgumentException if the given expression is not valid
|
||||||
*/
|
*/
|
||||||
AttributeExpression compile(String expression) throws IllegalArgumentException;
|
AttributeExpression compile(String expression) throws IllegalArgumentException;
|
||||||
|
@ -34,8 +34,8 @@ public interface ExpressionLanguageCompiler {
|
||||||
* Indicates whether or not the given string is a valid Attribute
|
* Indicates whether or not the given string is a valid Attribute
|
||||||
* Expression.
|
* Expression.
|
||||||
*
|
*
|
||||||
* @param expression
|
* @param expression to validate
|
||||||
* @return
|
* @return if is value or not
|
||||||
*/
|
*/
|
||||||
boolean isValidExpression(String expression);
|
boolean isValidExpression(String expression);
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ public interface ExpressionLanguageCompiler {
|
||||||
* if the expression is syntactically valid or a String indicating why the
|
* if the expression is syntactically valid or a String indicating why the
|
||||||
* expression is invalid otherwise.
|
* expression is invalid otherwise.
|
||||||
*
|
*
|
||||||
* @param expression
|
* @param expression to validate
|
||||||
* @param allowSurroundingCharacters if <code>true</code> allows characters
|
* @param allowSurroundingCharacters if <code>true</code> allows characters
|
||||||
* to surround the Expression, otherwise the expression must be exactly
|
* to surround the Expression, otherwise the expression must be exactly
|
||||||
* equal to a valid Expression. E.g., <code>/${path}</code> is valid if and
|
* equal to a valid Expression. E.g., <code>/${path}</code> is valid if and
|
||||||
|
@ -60,7 +60,7 @@ public interface ExpressionLanguageCompiler {
|
||||||
* Returns the ResultType that will be returned by the given Expression
|
* Returns the ResultType that will be returned by the given Expression
|
||||||
*
|
*
|
||||||
* @param expression the Expression to evaluate
|
* @param expression the Expression to evaluate
|
||||||
* @return
|
* @return result type for the given expression
|
||||||
* @throws IllegalArgumentException if the given Expression is not a valid
|
* @throws IllegalArgumentException if the given Expression is not a valid
|
||||||
* Expression Language Expression; the message of this Exception will
|
* Expression Language Expression; the message of this Exception will
|
||||||
* indicate the problem if the expression is not syntactically valid.
|
* indicate the problem if the expression is not syntactically valid.
|
||||||
|
|
|
@ -48,24 +48,22 @@ public interface FlowFile extends Comparable<FlowFile> {
|
||||||
long getLineageStartDate();
|
long getLineageStartDate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the time at which the FlowFile was most recently added to a
|
* @return the time at which the FlowFile was most recently added to a
|
||||||
* FlowFile queue, or {@code null} if the FlowFile has never been enqueued.
|
* FlowFile queue, or {@code null} if the FlowFile has never been enqueued.
|
||||||
* This value will always be populated before it is passed to a
|
* This value will always be populated before it is passed to a
|
||||||
* {@link FlowFilePrioritizer}.
|
* {@link FlowFilePrioritizer}
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Long getLastQueueDate();
|
Long getLastQueueDate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return a set of identifiers that are unique to this FlowFile's lineage.
|
|
||||||
* If FlowFile X is derived from FlowFile Y, both FlowFiles will have the
|
|
||||||
* same value for the Lineage Claim ID.
|
|
||||||
*
|
|
||||||
* <p>
|
* <p>
|
||||||
* If a FlowFile is derived from multiple "parent" FlowFiles, all of the
|
* If a FlowFile is derived from multiple "parent" FlowFiles, all of the
|
||||||
* parents' Lineage Identifiers will be in the set.
|
* parents' Lineage Identifiers will be in the set.
|
||||||
* </p>
|
* </p>
|
||||||
|
*
|
||||||
|
* @return a set of identifiers that are unique to this FlowFile's lineage.
|
||||||
|
* If FlowFile X is derived from FlowFile Y, both FlowFiles will have the
|
||||||
|
* same value for the Lineage Claim ID.
|
||||||
*/
|
*/
|
||||||
Set<String> getLineageIdentifiers();
|
Set<String> getLineageIdentifiers();
|
||||||
|
|
||||||
|
@ -77,7 +75,7 @@ public interface FlowFile extends Comparable<FlowFile> {
|
||||||
/**
|
/**
|
||||||
* Obtains the attribute value for the given key
|
* Obtains the attribute value for the given key
|
||||||
*
|
*
|
||||||
* @param key
|
* @param key of the attribute
|
||||||
* @return value if found; null otherwise
|
* @return value if found; null otherwise
|
||||||
*/
|
*/
|
||||||
String getAttribute(String key);
|
String getAttribute(String key);
|
||||||
|
|
|
@ -16,36 +16,40 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.nifi.logging;
|
package org.apache.nifi.logging;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* The ComponentLog provides a mechanism to ensure that all NiFi components are logging and reporting
|
* The ComponentLog provides a mechanism to ensure that all NiFi components are
|
||||||
* information in a consistent way. When messages are logged to the ComponentLog, each message has the
|
* logging and reporting information in a consistent way. When messages are
|
||||||
* following characteristics:
|
* logged to the ComponentLog, each message has the following characteristics:
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>
|
* <li>
|
||||||
* The <code>toString()</code> of the component is automatically prepended to the message so that it is clear
|
* The <code>toString()</code> of the component is automatically prepended to
|
||||||
* which component is providing the information. This is important, since a single component may have many
|
* the message so that it is clear which component is providing the information.
|
||||||
* different instances within the same NiFi instance.
|
* This is important, since a single component may have many different instances
|
||||||
* </li>
|
* within the same NiFi instance.
|
||||||
* <li>
|
* </li>
|
||||||
* If the last value in an Object[] argument that is passed to the logger is a Throwable, then the logged message
|
* <li>
|
||||||
* will include a <code>toString()</code> of the Throwable; in addition, if the component's logger is set to
|
* If the last value in an Object[] argument that is passed to the logger is a
|
||||||
* DEBUG level via the logback configuration, the Stacktrace will also be logged. This provides a mechanism to easily
|
* Throwable, then the logged message will include a <code>toString()</code> of
|
||||||
* enable stacktraces in the logs when they are desired without filling the logs with unneeded stack traces for messages
|
* the Throwable; in addition, if the component's logger is set to DEBUG level
|
||||||
* that end up occurring often.
|
* via the logback configuration, the Stacktrace will also be logged. This
|
||||||
* </li>
|
* provides a mechanism to easily enable stacktraces in the logs when they are
|
||||||
* <li>
|
* desired without filling the logs with unneeded stack traces for messages that
|
||||||
* Any message that is logged with a Severity level that meets or exceeds the configured Bulletin Level for that component
|
* end up occurring often.
|
||||||
* will also cause a Bulletin to be generated, so that the message is visible in the UI, allowing Dataflow Managers
|
* </li>
|
||||||
* to understand that a problem exists and what the issue is.
|
* <li>
|
||||||
* </li>
|
* Any message that is logged with a Severity level that meets or exceeds the
|
||||||
|
* configured Bulletin Level for that component will also cause a Bulletin to be
|
||||||
|
* generated, so that the message is visible in the UI, allowing Dataflow
|
||||||
|
* Managers to understand that a problem exists and what the issue is.
|
||||||
|
* </li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface ComponentLog {
|
public interface ComponentLog {
|
||||||
|
|
||||||
void warn(String msg, Throwable t);
|
void warn(String msg, Throwable t);
|
||||||
|
|
||||||
void warn(String msg, Object[] os);
|
void warn(String msg, Object[] os);
|
||||||
|
|
|
@ -16,14 +16,14 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.nifi.logging;
|
package org.apache.nifi.logging;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ProcessorLog is an extension of ComponentLog but provides no additional functionality.
|
* The ProcessorLog is an extension of ComponentLog but provides no additional
|
||||||
* It exists because ProcessorLog was created first,
|
* functionality. It exists because ProcessorLog was created first, but when
|
||||||
* but when Controller Services and Reporting Tasks began to be used more heavily loggers
|
* Controller Services and Reporting Tasks began to be used more heavily loggers
|
||||||
* were needed for them as well. We did not want to return a ProcessorLog to a ControllerService
|
* were needed for them as well. We did not want to return a ProcessorLog to a
|
||||||
* or a ReportingTask, so all of the methods were moved to a higher interface named ComponentLog.
|
* ControllerService or a ReportingTask, so all of the methods were moved to a
|
||||||
* However, we kept the ProcessorLog interface around in order to maintain backward compatibility.
|
* higher interface named ComponentLog. However, we kept the ProcessorLog
|
||||||
|
* interface around in order to maintain backward compatibility.
|
||||||
*/
|
*/
|
||||||
public interface ProcessorLog extends ComponentLog {
|
public interface ProcessorLog extends ComponentLog {
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ import org.apache.nifi.logging.ProcessorLog;
|
||||||
* <p>
|
* <p>
|
||||||
* Thread safe</p>
|
* Thread safe</p>
|
||||||
*
|
*
|
||||||
* @author none
|
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractSessionFactoryProcessor extends AbstractConfigurableComponent implements Processor {
|
public abstract class AbstractSessionFactoryProcessor extends AbstractConfigurableComponent implements Processor {
|
||||||
|
|
||||||
|
@ -62,10 +61,8 @@ public abstract class AbstractSessionFactoryProcessor extends AbstractConfigurab
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link ControllerServiceLookup} that was passed to the
|
* @return the {@link ControllerServiceLookup} that was passed to the
|
||||||
* {@link #init(ProcessorInitializationContext)} method
|
* {@link #init(ProcessorInitializationContext)} method
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
protected final ControllerServiceLookup getControllerServiceLookup() {
|
protected final ControllerServiceLookup getControllerServiceLookup() {
|
||||||
return serviceLookup;
|
return serviceLookup;
|
||||||
|
@ -83,17 +80,15 @@ public abstract class AbstractSessionFactoryProcessor extends AbstractConfigurab
|
||||||
/**
|
/**
|
||||||
* Provides subclasses the ability to perform initialization logic
|
* Provides subclasses the ability to perform initialization logic
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context in which to perform initialization
|
||||||
*/
|
*/
|
||||||
protected void init(final ProcessorInitializationContext context) {
|
protected void init(final ProcessorInitializationContext context) {
|
||||||
// Provided for subclasses to override
|
// Provided for subclasses to override
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the processor is scheduled to run,
|
* @return <code>true</code> if the processor is scheduled to run,
|
||||||
* <code>false</code> otherwise
|
* <code>false</code> otherwise
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
protected final boolean isScheduled() {
|
protected final boolean isScheduled() {
|
||||||
return scheduled;
|
return scheduled;
|
||||||
|
|
|
@ -21,9 +21,6 @@ import java.util.regex.Pattern;
|
||||||
|
|
||||||
public enum DataUnit {
|
public enum DataUnit {
|
||||||
|
|
||||||
// 1024 * 1024 =
|
|
||||||
// 1024 * 1024 * 1024
|
|
||||||
// 1024 * 1024 * 1024 * 1024
|
|
||||||
/**
|
/**
|
||||||
* Bytes
|
* Bytes
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -35,8 +35,10 @@ public interface FlowFileFilter {
|
||||||
* whether or not the Processor is interested in filtering additional
|
* whether or not the Processor is interested in filtering additional
|
||||||
* FlowFiles
|
* FlowFiles
|
||||||
*
|
*
|
||||||
* @param flowFile
|
* @param flowFile to apply the filter to
|
||||||
* @return
|
* @return true if the given FlowFile should be selected and
|
||||||
|
* if Processor is interested in filtering additional
|
||||||
|
* FlowFiles
|
||||||
*/
|
*/
|
||||||
FlowFileFilterResult filter(FlowFile flowFile);
|
FlowFileFilterResult filter(FlowFile flowFile);
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,8 @@ public interface ProcessContext {
|
||||||
* Retrieves the current value set for the given descriptor, if a value is
|
* Retrieves the current value set for the given descriptor, if a value is
|
||||||
* set - else uses the descriptor to determine the appropriate default value
|
* set - else uses the descriptor to determine the appropriate default value
|
||||||
*
|
*
|
||||||
* @param descriptor
|
* @param descriptor to lookup the value of
|
||||||
* @return
|
* @return the property value of the given descriptor
|
||||||
*/
|
*/
|
||||||
PropertyValue getProperty(PropertyDescriptor descriptor);
|
PropertyValue getProperty(PropertyDescriptor descriptor);
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@ public interface ProcessContext {
|
||||||
* Retrieves the current value set for the given descriptor, if a value is
|
* Retrieves the current value set for the given descriptor, if a value is
|
||||||
* set - else uses the descriptor to determine the appropriate default value
|
* set - else uses the descriptor to determine the appropriate default value
|
||||||
*
|
*
|
||||||
* @param propertyName
|
* @param propertyName of the property to lookup the value for
|
||||||
* @return
|
* @return property value as retrieved by property name
|
||||||
*/
|
*/
|
||||||
PropertyValue getProperty(String propertyName);
|
PropertyValue getProperty(String propertyName);
|
||||||
|
|
||||||
|
@ -57,8 +57,9 @@ public interface ProcessContext {
|
||||||
* Creates and returns a {@link PropertyValue} object that can be used for
|
* Creates and returns a {@link PropertyValue} object that can be used for
|
||||||
* evaluating the value of the given String
|
* evaluating the value of the given String
|
||||||
*
|
*
|
||||||
* @param rawValue
|
* @param rawValue the raw input before any property evaluation has occurred
|
||||||
* @return
|
* @return a {@link PropertyValue} object that can be used for
|
||||||
|
* evaluating the value of the given String
|
||||||
*/
|
*/
|
||||||
PropertyValue newPropertyValue(String rawValue);
|
PropertyValue newPropertyValue(String rawValue);
|
||||||
|
|
||||||
|
@ -89,11 +90,9 @@ public interface ProcessContext {
|
||||||
String getAnnotationData();
|
String getAnnotationData();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a Map of all PropertyDescriptors to their configured values. This
|
* @return a Map of all PropertyDescriptors to their configured values. This
|
||||||
* Map may or may not be modifiable, but modifying its values will not
|
* Map may or may not be modifiable, but modifying its values will not
|
||||||
* change the values of the processor's properties
|
* change the values of the processor's properties
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Map<PropertyDescriptor, String> getProperties();
|
Map<PropertyDescriptor, String> getProperties();
|
||||||
|
|
||||||
|
@ -101,8 +100,8 @@ public interface ProcessContext {
|
||||||
* Encrypts the given value using the password provided in the NiFi
|
* Encrypts the given value using the password provided in the NiFi
|
||||||
* Properties
|
* Properties
|
||||||
*
|
*
|
||||||
* @param unencrypted
|
* @param unencrypted plaintext value
|
||||||
* @return
|
* @return encrypted value
|
||||||
*/
|
*/
|
||||||
String encrypt(String unencrypted);
|
String encrypt(String unencrypted);
|
||||||
|
|
||||||
|
@ -110,19 +109,17 @@ public interface ProcessContext {
|
||||||
* Decrypts the given value using the password provided in the NiFi
|
* Decrypts the given value using the password provided in the NiFi
|
||||||
* Properties
|
* Properties
|
||||||
*
|
*
|
||||||
* @param encrypted
|
* @param encrypted the encrypted value
|
||||||
* @return
|
* @return the plaintext value
|
||||||
*/
|
*/
|
||||||
String decrypt(String encrypted);
|
String decrypt(String encrypted);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a {@code ControllerServiceLookup} that can be used to obtain a
|
* @return a {@code ControllerServiceLookup} that can be used to obtain a
|
||||||
* Controller Service
|
* Controller Service
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ControllerServiceLookup getControllerServiceLookup();
|
ControllerServiceLookup getControllerServiceLookup();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the set of all relationships for which space is available to
|
* @return the set of all relationships for which space is available to
|
||||||
* receive new objects
|
* receive new objects
|
||||||
|
|
|
@ -60,7 +60,6 @@ import org.apache.nifi.provenance.ProvenanceReporter;
|
||||||
* A process session instance may be used continuously. That is, after each
|
* A process session instance may be used continuously. That is, after each
|
||||||
* commit or rollback, the session can be used again.</p>
|
* commit or rollback, the session can be used again.</p>
|
||||||
*
|
*
|
||||||
* @author unattributed
|
|
||||||
*/
|
*/
|
||||||
public interface ProcessSession {
|
public interface ProcessSession {
|
||||||
|
|
||||||
|
@ -136,7 +135,8 @@ public interface ProcessSession {
|
||||||
* single call.
|
* single call.
|
||||||
*
|
*
|
||||||
* @param maxResults the maximum number of FlowFiles to return
|
* @param maxResults the maximum number of FlowFiles to return
|
||||||
* @return
|
* @return up to <code>maxResults</code> FlowFiles from the work queue. If
|
||||||
|
* no FlowFiles are available, returns an empty list. Will not return null.
|
||||||
* @throws IllegalArgumentException if <code>maxResults</code> is less than
|
* @throws IllegalArgumentException if <code>maxResults</code> is less than
|
||||||
* 0
|
* 0
|
||||||
*/
|
*/
|
||||||
|
@ -152,8 +152,9 @@ public interface ProcessSession {
|
||||||
* returned.
|
* returned.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param filter
|
* @param filter to limit which flow files are returned
|
||||||
* @return
|
* @return all FlowFiles from all of the incoming queues for which the given
|
||||||
|
* {@link FlowFileFilter} indicates should be accepted.
|
||||||
*/
|
*/
|
||||||
List<FlowFile> get(FlowFileFilter filter);
|
List<FlowFile> get(FlowFileFilter filter);
|
||||||
|
|
||||||
|
@ -170,7 +171,7 @@ public interface ProcessSession {
|
||||||
* linkage to a parent FlowFile. This method is appropriate only when data
|
* linkage to a parent FlowFile. This method is appropriate only when data
|
||||||
* is received or created from an external system. Otherwise, this method
|
* is received or created from an external system. Otherwise, this method
|
||||||
* should be avoided and should instead use {@link #create(FlowFile)} or
|
* should be avoided and should instead use {@link #create(FlowFile)} or
|
||||||
* {@link #create(Collection<FlowFile>)}.
|
* {@see #create(Collection)}.
|
||||||
*
|
*
|
||||||
* When this method is used, a Provenance CREATE or RECEIVE Event should be
|
* When this method is used, a Provenance CREATE or RECEIVE Event should be
|
||||||
* generated. See the {@link #getProvenanceReporter()} method and
|
* generated. See the {@link #getProvenanceReporter()} method and
|
||||||
|
@ -188,8 +189,8 @@ public interface ProcessSession {
|
||||||
* event, depending on whether or not other FlowFiles are generated from the
|
* event, depending on whether or not other FlowFiles are generated from the
|
||||||
* same parent before the ProcessSession is committed.
|
* same parent before the ProcessSession is committed.
|
||||||
*
|
*
|
||||||
* @param parent
|
* @param parent to base the new flowfile on
|
||||||
* @return
|
* @return newly created flowfile
|
||||||
*/
|
*/
|
||||||
FlowFile create(FlowFile parent);
|
FlowFile create(FlowFile parent);
|
||||||
|
|
||||||
|
@ -201,8 +202,8 @@ public interface ProcessSession {
|
||||||
* only a single parent exists). This method will automatically generate a
|
* only a single parent exists). This method will automatically generate a
|
||||||
* Provenance JOIN event.
|
* Provenance JOIN event.
|
||||||
*
|
*
|
||||||
* @param parents
|
* @param parents which the new flowfile should inherit shared attributes from
|
||||||
* @return
|
* @return new flowfile
|
||||||
*/
|
*/
|
||||||
FlowFile create(Collection<FlowFile> parents);
|
FlowFile create(Collection<FlowFile> parents);
|
||||||
|
|
||||||
|
@ -239,9 +240,9 @@ public interface ProcessSession {
|
||||||
* Event, if the offset is 0 and the size is exactly equal to the size of
|
* Event, if the offset is 0 and the size is exactly equal to the size of
|
||||||
* the example FlowFile).
|
* the example FlowFile).
|
||||||
*
|
*
|
||||||
* @param example
|
* @param parent to base the new flowfile attributes on
|
||||||
* @param offset
|
* @param offset of the parent flowfile to base the child flowfile content on
|
||||||
* @param size
|
* @param size of the new flowfile from the offset
|
||||||
* @return a FlowFile with the specified size whose parent is first argument
|
* @return a FlowFile with the specified size whose parent is first argument
|
||||||
* to this function
|
* to this function
|
||||||
*
|
*
|
||||||
|
@ -250,14 +251,14 @@ public interface ProcessSession {
|
||||||
* the given FlowFile
|
* the given FlowFile
|
||||||
* @throws FlowFileHandlingException if the given FlowFile is already
|
* @throws FlowFileHandlingException if the given FlowFile is already
|
||||||
* transferred or removed or doesn't belong to this session, or if the
|
* transferred or removed or doesn't belong to this session, or if the
|
||||||
* specified offset + size exceeds that of the size of the example FlowFile.
|
* specified offset + size exceeds that of the size of the parent FlowFile.
|
||||||
* Automatic rollback will occur.
|
* Automatic rollback will occur.
|
||||||
* @throws MissingFlowFileException if the given FlowFile content cannot be
|
* @throws MissingFlowFileException if the given FlowFile content cannot be
|
||||||
* found. The FlowFile should no longer be reference, will be internally
|
* found. The FlowFile should no longer be reference, will be internally
|
||||||
* destroyed, and the session is automatically rolled back and what is left
|
* destroyed, and the session is automatically rolled back and what is left
|
||||||
* of the FlowFile is destroyed.
|
* of the FlowFile is destroyed.
|
||||||
*/
|
*/
|
||||||
FlowFile clone(FlowFile example, long offset, long size);
|
FlowFile clone(FlowFile parent, long offset, long size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a penalty for the given FlowFile which will make it unavailable to
|
* Sets a penalty for the given FlowFile which will make it unavailable to
|
||||||
|
@ -368,8 +369,8 @@ public interface ProcessSession {
|
||||||
* destination processor will have immediate visibility of the transferred
|
* destination processor will have immediate visibility of the transferred
|
||||||
* FlowFiles within the session.
|
* FlowFiles within the session.
|
||||||
*
|
*
|
||||||
* @param flowFile
|
* @param flowFile to transfer
|
||||||
* @param relationship
|
* @param relationship to transfer to
|
||||||
* @throws IllegalStateException if detected that this method is being
|
* @throws IllegalStateException if detected that this method is being
|
||||||
* called from within a callback of another method in this session and for
|
* called from within a callback of another method in this session and for
|
||||||
* the given FlowFile(s)
|
* the given FlowFile(s)
|
||||||
|
@ -389,7 +390,7 @@ public interface ProcessSession {
|
||||||
* the FlowFile will be maintained. FlowFiles that are created by the
|
* the FlowFile will be maintained. FlowFiles that are created by the
|
||||||
* processor cannot be transferred back to themselves via this method.
|
* processor cannot be transferred back to themselves via this method.
|
||||||
*
|
*
|
||||||
* @param flowFile
|
* @param flowFile to transfer
|
||||||
* @throws IllegalStateException if detected that this method is being
|
* @throws IllegalStateException if detected that this method is being
|
||||||
* called from within a callback of another method in this session and for
|
* called from within a callback of another method in this session and for
|
||||||
* the given FlowFile(s)
|
* the given FlowFile(s)
|
||||||
|
@ -410,7 +411,7 @@ public interface ProcessSession {
|
||||||
* created by the processor cannot be transferred back to themselves via
|
* created by the processor cannot be transferred back to themselves via
|
||||||
* this method.
|
* this method.
|
||||||
*
|
*
|
||||||
* @param flowFiles
|
* @param flowFiles to transfer
|
||||||
* @throws IllegalStateException if detected that this method is being
|
* @throws IllegalStateException if detected that this method is being
|
||||||
* called from within a callback of another method in this session and for
|
* called from within a callback of another method in this session and for
|
||||||
* the given FlowFile(s)
|
* the given FlowFile(s)
|
||||||
|
@ -435,8 +436,8 @@ public interface ProcessSession {
|
||||||
* destination processor will have immediate visibility of the transferred
|
* destination processor will have immediate visibility of the transferred
|
||||||
* FlowFiles within the session.
|
* FlowFiles within the session.
|
||||||
*
|
*
|
||||||
* @param flowFiles
|
* @param flowFiles to transfer
|
||||||
* @param relationship
|
* @param relationship to transfer to
|
||||||
* @throws IllegalStateException if detected that this method is being
|
* @throws IllegalStateException if detected that this method is being
|
||||||
* called from within a callback of another method in this session and for
|
* called from within a callback of another method in this session and for
|
||||||
* the given FlowFile(s)
|
* the given FlowFile(s)
|
||||||
|
@ -455,7 +456,7 @@ public interface ProcessSession {
|
||||||
* nothing else references it and this FlowFile will no longer be available
|
* nothing else references it and this FlowFile will no longer be available
|
||||||
* for further operation.
|
* for further operation.
|
||||||
*
|
*
|
||||||
* @param flowFile
|
* @param flowFile to remove
|
||||||
* @throws IllegalStateException if detected that this method is being
|
* @throws IllegalStateException if detected that this method is being
|
||||||
* called from within a callback of another method in this session and for
|
* called from within a callback of another method in this session and for
|
||||||
* the given FlowFile(s)
|
* the given FlowFile(s)
|
||||||
|
@ -471,7 +472,7 @@ public interface ProcessSession {
|
||||||
* nothing else references it and this FlowFile will no longer be available
|
* nothing else references it and this FlowFile will no longer be available
|
||||||
* for further operation.
|
* for further operation.
|
||||||
*
|
*
|
||||||
* @param flowFiles
|
* @param flowFiles to remove
|
||||||
* @throws IllegalStateException if detected that this method is being
|
* @throws IllegalStateException if detected that this method is being
|
||||||
* called from within a callback of another method in this session and for
|
* called from within a callback of another method in this session and for
|
||||||
* the given FlowFile(s)
|
* the given FlowFile(s)
|
||||||
|
@ -484,12 +485,12 @@ public interface ProcessSession {
|
||||||
/**
|
/**
|
||||||
* Executes the given callback against the contents corresponding to the
|
* Executes the given callback against the contents corresponding to the
|
||||||
* given FlowFile.
|
* given FlowFile.
|
||||||
*
|
*
|
||||||
* <i>Note</i>: The OutputStream provided to the given OutputStreamCallback
|
* <i>Note</i>: The OutputStream provided to the given OutputStreamCallback
|
||||||
* will not be accessible once this method has completed its execution.
|
* will not be accessible once this method has completed its execution.
|
||||||
*
|
*
|
||||||
* @param source
|
* @param source flowfile to retrieve content of
|
||||||
* @param reader
|
* @param reader that will be called to read the flowfile content
|
||||||
* @throws IllegalStateException if detected that this method is being
|
* @throws IllegalStateException if detected that this method is being
|
||||||
* called from within a callback of another method in this session and for
|
* called from within a callback of another method in this session and for
|
||||||
* the given FlowFile(s)
|
* the given FlowFile(s)
|
||||||
|
@ -501,7 +502,7 @@ public interface ProcessSession {
|
||||||
* destroyed, and the session is automatically rolled back and what is left
|
* destroyed, and the session is automatically rolled back and what is left
|
||||||
* of the FlowFile is destroyed.
|
* of the FlowFile is destroyed.
|
||||||
* @throws FlowFileAccessException if some IO problem occurs accessing
|
* @throws FlowFileAccessException if some IO problem occurs accessing
|
||||||
* FlowFile content; if an attempt is made to access the InputStream
|
* FlowFile content; if an attempt is made to access the InputStream
|
||||||
* provided to the given InputStreamCallback after this method completed its
|
* provided to the given InputStreamCallback after this method completed its
|
||||||
* execution
|
* execution
|
||||||
*/
|
*/
|
||||||
|
@ -511,8 +512,8 @@ public interface ProcessSession {
|
||||||
* Combines the content of all given source FlowFiles into a single given
|
* Combines the content of all given source FlowFiles into a single given
|
||||||
* destination FlowFile.
|
* destination FlowFile.
|
||||||
*
|
*
|
||||||
* @param sources
|
* @param sources the flowfiles to merge
|
||||||
* @param destination
|
* @param destination the flowfile to use as the merged result
|
||||||
* @return updated destination FlowFile (new size, etc...)
|
* @return updated destination FlowFile (new size, etc...)
|
||||||
* @throws IllegalStateException if detected that this method is being
|
* @throws IllegalStateException if detected that this method is being
|
||||||
* called from within a callback of another method in this session and for
|
* called from within a callback of another method in this session and for
|
||||||
|
@ -536,8 +537,8 @@ public interface ProcessSession {
|
||||||
* Combines the content of all given source FlowFiles into a single given
|
* Combines the content of all given source FlowFiles into a single given
|
||||||
* destination FlowFile.
|
* destination FlowFile.
|
||||||
*
|
*
|
||||||
* @param sources
|
* @param sources to merge together
|
||||||
* @param destination
|
* @param destination to merge to
|
||||||
* @param header bytes that will be added to the beginning of the merged
|
* @param header bytes that will be added to the beginning of the merged
|
||||||
* output. May be null or empty.
|
* output. May be null or empty.
|
||||||
* @param footer bytes that will be added to the end of the merged output.
|
* @param footer bytes that will be added to the end of the merged output.
|
||||||
|
@ -566,12 +567,12 @@ public interface ProcessSession {
|
||||||
/**
|
/**
|
||||||
* Executes the given callback against the content corresponding to the
|
* Executes the given callback against the content corresponding to the
|
||||||
* given FlowFile.
|
* given FlowFile.
|
||||||
*
|
|
||||||
* <i>Note</i>: The OutputStream provided to the given OutputStreamCallback
|
|
||||||
* will not be accessible once this method has completed its execution.
|
|
||||||
*
|
*
|
||||||
* @param source
|
* <i>Note</i>: The OutputStream provided to the given OutputStreamCallback
|
||||||
* @param writer
|
* will not be accessible once this method has completed its execution.
|
||||||
|
*
|
||||||
|
* @param source to write to
|
||||||
|
* @param writer used to write new content
|
||||||
* @return updated FlowFile
|
* @return updated FlowFile
|
||||||
* @throws IllegalStateException if detected that this method is being
|
* @throws IllegalStateException if detected that this method is being
|
||||||
* called from within a callback of another method in this session and for
|
* called from within a callback of another method in this session and for
|
||||||
|
@ -584,8 +585,8 @@ public interface ProcessSession {
|
||||||
* destroyed, and the session is automatically rolled back and what is left
|
* destroyed, and the session is automatically rolled back and what is left
|
||||||
* of the FlowFile is destroyed.
|
* of the FlowFile is destroyed.
|
||||||
* @throws FlowFileAccessException if some IO problem occurs accessing
|
* @throws FlowFileAccessException if some IO problem occurs accessing
|
||||||
* FlowFile content; if an attempt is made to access the OutputStream
|
* FlowFile content; if an attempt is made to access the OutputStream
|
||||||
* provided to the given OutputStreamCallaback after this method completed
|
* provided to the given OutputStreamCallaback after this method completed
|
||||||
* its execution
|
* its execution
|
||||||
*/
|
*/
|
||||||
FlowFile write(FlowFile source, OutputStreamCallback writer) throws FlowFileAccessException;
|
FlowFile write(FlowFile source, OutputStreamCallback writer) throws FlowFileAccessException;
|
||||||
|
@ -593,13 +594,13 @@ public interface ProcessSession {
|
||||||
/**
|
/**
|
||||||
* Executes the given callback against the content corresponding to the
|
* Executes the given callback against the content corresponding to the
|
||||||
* given flow file.
|
* given flow file.
|
||||||
*
|
|
||||||
* <i>Note</i>: The InputStream & OutputStream provided to the given
|
|
||||||
* StreamCallback will not be accessible once this method has completed its
|
|
||||||
* execution.
|
|
||||||
*
|
*
|
||||||
* @param source
|
* <i>Note</i>: The InputStream & OutputStream provided to the given
|
||||||
* @param writer
|
* StreamCallback will not be accessible once this method has completed its
|
||||||
|
* execution.
|
||||||
|
*
|
||||||
|
* @param source to read from and write to
|
||||||
|
* @param writer used to read the old content and write new content
|
||||||
* @return updated FlowFile
|
* @return updated FlowFile
|
||||||
* @throws IllegalStateException if detected that this method is being
|
* @throws IllegalStateException if detected that this method is being
|
||||||
* called from within a callback of another method in this session and for
|
* called from within a callback of another method in this session and for
|
||||||
|
@ -612,8 +613,8 @@ public interface ProcessSession {
|
||||||
* destroyed, and the session is automatically rolled back and what is left
|
* destroyed, and the session is automatically rolled back and what is left
|
||||||
* of the FlowFile is destroyed.
|
* of the FlowFile is destroyed.
|
||||||
* @throws FlowFileAccessException if some IO problem occurs accessing
|
* @throws FlowFileAccessException if some IO problem occurs accessing
|
||||||
* FlowFile content; if an attempt is made to access the InputStream or
|
* FlowFile content; if an attempt is made to access the InputStream or
|
||||||
* OutputStream provided to the given StreamCallback after this method
|
* OutputStream provided to the given StreamCallback after this method
|
||||||
* completed its execution
|
* completed its execution
|
||||||
*/
|
*/
|
||||||
FlowFile write(FlowFile source, StreamCallback writer) throws FlowFileAccessException;
|
FlowFile write(FlowFile source, StreamCallback writer) throws FlowFileAccessException;
|
||||||
|
@ -622,16 +623,16 @@ public interface ProcessSession {
|
||||||
* Executes the given callback against the content corresponding to the
|
* Executes the given callback against the content corresponding to the
|
||||||
* given FlowFile, such that any data written to the OutputStream of the
|
* given FlowFile, such that any data written to the OutputStream of the
|
||||||
* content will be appended to the end of FlowFile.
|
* content will be appended to the end of FlowFile.
|
||||||
*
|
*
|
||||||
* <i>Note</i>: The OutputStream provided to the given OutputStreamCallback
|
* <i>Note</i>: The OutputStream provided to the given OutputStreamCallback
|
||||||
* will not be accessible once this method has completed its execution.
|
* will not be accessible once this method has completed its execution.
|
||||||
*
|
*
|
||||||
* @param source
|
* @param source the flowfile for which content should be appended
|
||||||
* @param writer
|
* @param writer used to write new bytes to the flowfile content
|
||||||
* @return
|
* @return the updated flowfile reference for the new content
|
||||||
* @throws FlowFileAccessException if an attempt is made to access the
|
* @throws FlowFileAccessException if an attempt is made to access the
|
||||||
* OutputStream provided to the given OutputStreamCallaback after this method
|
* OutputStream provided to the given OutputStreamCallaback after this
|
||||||
* completed its execution
|
* method completed its execution
|
||||||
*/
|
*/
|
||||||
FlowFile append(FlowFile source, OutputStreamCallback writer) throws FlowFileAccessException;
|
FlowFile append(FlowFile source, OutputStreamCallback writer) throws FlowFileAccessException;
|
||||||
|
|
||||||
|
@ -687,8 +688,8 @@ public interface ProcessSession {
|
||||||
/**
|
/**
|
||||||
* Writes the content of the given FlowFile to the given destination path.
|
* Writes the content of the given FlowFile to the given destination path.
|
||||||
*
|
*
|
||||||
* @param flowFile
|
* @param flowFile to export the content of
|
||||||
* @param destination
|
* @param destination to export the content to
|
||||||
* @param append if true will append to the current content at the given
|
* @param append if true will append to the current content at the given
|
||||||
* path; if false will replace any current content
|
* path; if false will replace any current content
|
||||||
* @throws IllegalStateException if detected that this method is being
|
* @throws IllegalStateException if detected that this method is being
|
||||||
|
@ -709,8 +710,8 @@ public interface ProcessSession {
|
||||||
/**
|
/**
|
||||||
* Writes the content of the given FlowFile to the given destination stream
|
* Writes the content of the given FlowFile to the given destination stream
|
||||||
*
|
*
|
||||||
* @param flowFile
|
* @param flowFile to export the content of
|
||||||
* @param destination
|
* @param destination to export the content to
|
||||||
* @throws IllegalStateException if detected that this method is being
|
* @throws IllegalStateException if detected that this method is being
|
||||||
* called from within a callback of another method in this session and for
|
* called from within a callback of another method in this session and for
|
||||||
* the given FlowFile(s)
|
* the given FlowFile(s)
|
||||||
|
@ -729,7 +730,7 @@ public interface ProcessSession {
|
||||||
/**
|
/**
|
||||||
* Returns a ProvenanceReporter that is tied to this ProcessSession.
|
* Returns a ProvenanceReporter that is tied to this ProcessSession.
|
||||||
*
|
*
|
||||||
* @return
|
* @return the provenance reporter
|
||||||
*/
|
*/
|
||||||
ProvenanceReporter getProvenanceReporter();
|
ProvenanceReporter getProvenanceReporter();
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ public interface Processor extends ConfigurableComponent {
|
||||||
* Provides the processor with access to objects that may be of use
|
* Provides the processor with access to objects that may be of use
|
||||||
* throughout the life of the Processor
|
* throughout the life of the Processor
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context of initialization
|
||||||
*/
|
*/
|
||||||
void initialize(ProcessorInitializationContext context);
|
void initialize(ProcessorInitializationContext context);
|
||||||
|
|
||||||
|
|
|
@ -29,25 +29,19 @@ import org.apache.nifi.logging.ProcessorLog;
|
||||||
public interface ProcessorInitializationContext {
|
public interface ProcessorInitializationContext {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the unique identifier for this processor
|
* @return the unique identifier for this processor
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getIdentifier();
|
String getIdentifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link ProcessorLog} that is tied to this processor that can be
|
* @return a {@link ProcessorLog} that is tied to this processor that can be
|
||||||
* used to log events
|
* used to log events
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ProcessorLog getLogger();
|
ProcessorLog getLogger();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link ControllerServiceLookup} which can be used to obtain
|
* @return the {@link ControllerServiceLookup} which can be used to obtain
|
||||||
* Controller Services
|
* Controller Services
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ControllerServiceLookup getControllerServiceLookup();
|
ControllerServiceLookup getControllerServiceLookup();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,8 @@ import java.lang.annotation.Target;
|
||||||
* provided. This description can be provided to a user in logs, UI, etc.
|
* provided. This description can be provided to a user in logs, UI, etc.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.documentation.CapabilityDescription}
|
* @deprecated This Annotation has been replaced by the
|
||||||
|
* {@link org.apache.nifi.annotation.documentation.CapabilityDescription}
|
||||||
* annotation.
|
* annotation.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
|
|
|
@ -39,8 +39,8 @@ import java.lang.annotation.Target;
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.behavior.EventDriven}
|
* @deprecated This Annotation has been replaced by the
|
||||||
* annotation.
|
* {@link org.apache.nifi.annotation.behavior.EventDriven} annotation.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
|
|
|
@ -32,7 +32,8 @@ import java.lang.annotation.Target;
|
||||||
* be added to the graph.
|
* be added to the graph.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.lifecycle.OnAdded} annotation.
|
* @deprecated This Annotation has been replaced by the
|
||||||
|
* {@link org.apache.nifi.annotation.lifecycle.OnAdded} annotation.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.METHOD})
|
@Target({ElementType.METHOD})
|
||||||
|
|
|
@ -33,7 +33,8 @@ import java.lang.annotation.Target;
|
||||||
* be removed from the graph.
|
* be removed from the graph.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.lifecycle.OnRemoved} annotation.
|
* @deprecated This Annotation has been replaced by the
|
||||||
|
* {@link org.apache.nifi.annotation.lifecycle.OnRemoved} annotation.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.METHOD})
|
@Target({ElementType.METHOD})
|
||||||
|
|
|
@ -35,8 +35,9 @@ import java.lang.annotation.Target;
|
||||||
* be scheduled to run.
|
* be scheduled to run.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.lifecycle.OnScheduled} annotation.
|
* @deprecated This Annotation has been replaced by the
|
||||||
*/
|
* {@link org.apache.nifi.annotation.lifecycle.OnScheduled} annotation.
|
||||||
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.METHOD})
|
@Target({ElementType.METHOD})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
|
|
@ -29,7 +29,8 @@ import java.lang.annotation.Target;
|
||||||
* most once for each processor instance in a process lifetime.
|
* most once for each processor instance in a process lifetime.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.lifecycle.OnShutdown} annotation.
|
* @deprecated This Annotation has been replaced by the
|
||||||
|
* {@link org.apache.nifi.annotation.lifecycle.OnShutdown} annotation.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.METHOD})
|
@Target({ElementType.METHOD})
|
||||||
|
|
|
@ -46,7 +46,8 @@ import java.lang.annotation.Target;
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.lifecycle.OnStopped} annotation.
|
* @deprecated This Annotation has been replaced by the
|
||||||
|
* {@link org.apache.nifi.annotation.lifecycle.OnStopped} annotation.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.METHOD})
|
@Target({ElementType.METHOD})
|
||||||
|
|
|
@ -37,7 +37,8 @@ import java.lang.annotation.Target;
|
||||||
* be scheduled to run.
|
* be scheduled to run.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.lifecycle.OnUnscheduled} annotation.
|
* @deprecated This Annotation has been replaced by the
|
||||||
|
* {@link org.apache.nifi.annotation.lifecycle.OnUnscheduled} annotation.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.METHOD})
|
@Target({ElementType.METHOD})
|
||||||
|
|
|
@ -36,7 +36,8 @@ import java.lang.annotation.Target;
|
||||||
* repeated (implied idempotent behavior).
|
* repeated (implied idempotent behavior).
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.behavior.SideEffectFree} annotation.
|
* @deprecated This Annotation has been replaced by the
|
||||||
|
* {@link org.apache.nifi.annotation.behavior.SideEffectFree} annotation.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
|
|
|
@ -41,7 +41,8 @@ import java.lang.annotation.Target;
|
||||||
* from a remote source.
|
* from a remote source.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.behavior.SupportsBatching} annotation.
|
* @deprecated This Annotation has been replaced by the
|
||||||
|
* {@link org.apache.nifi.annotation.behavior.SupportsBatching} annotation.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
|
|
|
@ -29,9 +29,8 @@ import java.lang.annotation.Target;
|
||||||
* any way but serve as additional documentation and can be used to sort/filter
|
* any way but serve as additional documentation and can be used to sort/filter
|
||||||
* Processors.
|
* Processors.
|
||||||
*
|
*
|
||||||
* @author none
|
* @deprecated This Annotation has been replaced by the
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.documentation.Tags}
|
* {@link org.apache.nifi.annotation.documentation.Tags} annotation.
|
||||||
* annotation.
|
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
|
@ -40,8 +39,5 @@ import java.lang.annotation.Target;
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public @interface Tags {
|
public @interface Tags {
|
||||||
|
|
||||||
/**
|
|
||||||
* @return all tag values associated with the given processor
|
|
||||||
*/
|
|
||||||
public String[] value();
|
public String[] value();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,9 @@ import java.lang.annotation.Target;
|
||||||
* execution.
|
* execution.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.behavior.TriggerSerially} annotation.
|
* @deprecated This Annotation has been replaced by the
|
||||||
*/
|
* {@link org.apache.nifi.annotation.behavior.TriggerSerially} annotation.
|
||||||
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
|
|
@ -30,7 +30,9 @@ import java.lang.annotation.Target;
|
||||||
* destinations report that they have available space.
|
* destinations report that they have available space.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.behavior.TriggerWhenAnyDestinationAvailable} annotation.
|
* @deprecated This Annotation has been replaced by the
|
||||||
|
* {@link org.apache.nifi.annotation.behavior.TriggerWhenAnyDestinationAvailable}
|
||||||
|
* annotation.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
|
|
|
@ -32,7 +32,8 @@ import java.lang.annotation.Target;
|
||||||
* their queue or they present this annotation.
|
* their queue or they present this annotation.
|
||||||
*
|
*
|
||||||
* @author none
|
* @author none
|
||||||
* @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.behavior.TriggerWhenEmpty} annotation.
|
* @deprecated This Annotation has been replaced by the
|
||||||
|
* {@link org.apache.nifi.annotation.behavior.TriggerWhenEmpty} annotation.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Target({ElementType.TYPE})
|
@Target({ElementType.TYPE})
|
||||||
|
|
|
@ -30,8 +30,8 @@ public interface InputStreamCallback {
|
||||||
* automatically opened and closed though it is ok to close the stream
|
* automatically opened and closed though it is ok to close the stream
|
||||||
* manually.
|
* manually.
|
||||||
*
|
*
|
||||||
* @param in
|
* @param in the stream to read bytes from
|
||||||
* @throws IOException
|
* @throws IOException if issues reading from the underlying stream
|
||||||
*/
|
*/
|
||||||
void process(InputStream in) throws IOException;
|
void process(InputStream in) throws IOException;
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@ public interface OutputStreamCallback {
|
||||||
* manually - and quite important if any streams wrapping these streams open
|
* manually - and quite important if any streams wrapping these streams open
|
||||||
* resources which should be cleared.
|
* resources which should be cleared.
|
||||||
*
|
*
|
||||||
* @param out
|
* @param out the stream to write bytes to
|
||||||
* @throws IOException
|
* @throws IOException if issues writing to output stream
|
||||||
*/
|
*/
|
||||||
void process(OutputStream out) throws IOException;
|
void process(OutputStream out) throws IOException;
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,6 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author unattributed
|
|
||||||
*/
|
|
||||||
public interface StreamCallback {
|
public interface StreamCallback {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,9 +28,9 @@ public interface StreamCallback {
|
||||||
* manually - and quite important if any streams wrapping these streams open
|
* manually - and quite important if any streams wrapping these streams open
|
||||||
* resources which should be cleared.
|
* resources which should be cleared.
|
||||||
*
|
*
|
||||||
* @param in
|
* @param in the stream to read bytes from
|
||||||
* @param out
|
* @param out the stream to write bytes to
|
||||||
* @throws IOException
|
* @throws IOException if issues occur reading or writing the underlying streams
|
||||||
*/
|
*/
|
||||||
void process(InputStream in, OutputStream out) throws IOException;
|
void process(InputStream in, OutputStream out) throws IOException;
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@ public interface ProvenanceEventBuilder {
|
||||||
/**
|
/**
|
||||||
* Sets the type of {@link ProvenanceEventRecord}
|
* Sets the type of {@link ProvenanceEventRecord}
|
||||||
*
|
*
|
||||||
* @param eventType
|
* @param eventType of the event
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setEventType(ProvenanceEventType eventType);
|
ProvenanceEventBuilder setEventType(ProvenanceEventType eventType);
|
||||||
|
|
||||||
|
@ -38,15 +38,15 @@ public interface ProvenanceEventBuilder {
|
||||||
* given event
|
* given event
|
||||||
*
|
*
|
||||||
* @param event the event from which to populate the Builders values
|
* @param event the event from which to populate the Builders values
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder fromEvent(ProvenanceEventRecord event);
|
ProvenanceEventBuilder fromEvent(ProvenanceEventRecord event);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the date and time at which the FlowFile entered the flow
|
* Sets the date and time at which the FlowFile entered the flow
|
||||||
*
|
*
|
||||||
* @param entryDate
|
* @param entryDate of the flow file
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setFlowFileEntryDate(long entryDate);
|
ProvenanceEventBuilder setFlowFileEntryDate(long entryDate);
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ public interface ProvenanceEventBuilder {
|
||||||
* Sets the Lineage Identifiers. This is a set of all FlowFile UUID's that
|
* Sets the Lineage Identifiers. This is a set of all FlowFile UUID's that
|
||||||
* were involved in making this event occur.
|
* were involved in making this event occur.
|
||||||
*
|
*
|
||||||
* @param lineageIdentifiers
|
* @param lineageIdentifiers of the flowfiles in this event
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setLineageIdentifiers(Set<String> lineageIdentifiers);
|
ProvenanceEventBuilder setLineageIdentifiers(Set<String> lineageIdentifiers);
|
||||||
|
|
||||||
|
@ -63,12 +63,12 @@ public interface ProvenanceEventBuilder {
|
||||||
* Sets the Content Claim that the FlowFile was previously associated with
|
* Sets the Content Claim that the FlowFile was previously associated with
|
||||||
* before this event occurred.
|
* before this event occurred.
|
||||||
*
|
*
|
||||||
* @param container
|
* @param container for previous content
|
||||||
* @param section
|
* @param section for previous content
|
||||||
* @param identifier
|
* @param identifier for previous content
|
||||||
* @param offset
|
* @param offset for previous content
|
||||||
* @param size
|
* @param size for previous content
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setPreviousContentClaim(String container, String section, String identifier, Long offset, long size);
|
ProvenanceEventBuilder setPreviousContentClaim(String container, String section, String identifier, Long offset, long size);
|
||||||
|
|
||||||
|
@ -76,12 +76,12 @@ public interface ProvenanceEventBuilder {
|
||||||
* Sets the Content Claim that the FlowFile is associated with as a result
|
* Sets the Content Claim that the FlowFile is associated with as a result
|
||||||
* of this event
|
* of this event
|
||||||
*
|
*
|
||||||
* @param container
|
* @param container for resulting content
|
||||||
* @param section
|
* @param section for resulting content
|
||||||
* @param identifier
|
* @param identifier for resulting content
|
||||||
* @param offset
|
* @param offset for resulting content
|
||||||
* @param size
|
* @param size for resulting content
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setCurrentContentClaim(String container, String section, String identifier, Long offset, long size);
|
ProvenanceEventBuilder setCurrentContentClaim(String container, String section, String identifier, Long offset, long size);
|
||||||
|
|
||||||
|
@ -89,8 +89,8 @@ public interface ProvenanceEventBuilder {
|
||||||
* Sets the identifier of the FlowFile Queue from which the FlowFile was
|
* Sets the identifier of the FlowFile Queue from which the FlowFile was
|
||||||
* pulled
|
* pulled
|
||||||
*
|
*
|
||||||
* @param identifier
|
* @param identifier of the source queue
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setSourceQueueIdentifier(String identifier);
|
ProvenanceEventBuilder setSourceQueueIdentifier(String identifier);
|
||||||
|
|
||||||
|
@ -99,28 +99,28 @@ public interface ProvenanceEventBuilder {
|
||||||
* occurred and any attributes that were added or updated as a result of
|
* occurred and any attributes that were added or updated as a result of
|
||||||
* this event.
|
* this event.
|
||||||
*
|
*
|
||||||
* @param previousAttributes
|
* @param previousAttributes Map of all attributes before the event occurred
|
||||||
* @param updatedAttributes Map containing all attributes that were added or
|
* @param updatedAttributes Map containing all attributes that were added or
|
||||||
* updated. If any entry has a value of <code>null</code>, that attribute is
|
* updated. If any entry has a value of <code>null</code>, that attribute is
|
||||||
* considered removed
|
* considered removed
|
||||||
*
|
*
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setAttributes(Map<String, String> previousAttributes, Map<String, String> updatedAttributes);
|
ProvenanceEventBuilder setAttributes(Map<String, String> previousAttributes, Map<String, String> updatedAttributes);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the UUID to associate with the FlowFile
|
* Sets the UUID to associate with the FlowFile
|
||||||
*
|
*
|
||||||
* @param uuid
|
* @param uuid of the flowfile
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setFlowFileUUID(String uuid);
|
ProvenanceEventBuilder setFlowFileUUID(String uuid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the time at which the Provenance Event took place
|
* Sets the time at which the Provenance Event took place
|
||||||
*
|
*
|
||||||
* @param eventTime
|
* @param eventTime time of the event
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setEventTime(long eventTime);
|
ProvenanceEventBuilder setEventTime(long eventTime);
|
||||||
|
|
||||||
|
@ -128,16 +128,16 @@ public interface ProvenanceEventBuilder {
|
||||||
* Sets the amount of time that was required in order to perform the
|
* Sets the amount of time that was required in order to perform the
|
||||||
* function referred to by this event
|
* function referred to by this event
|
||||||
*
|
*
|
||||||
* @param millis
|
* @param millis of the event
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setEventDuration(long millis);
|
ProvenanceEventBuilder setEventDuration(long millis);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the time at which the FlowFile's lineage began
|
* Sets the time at which the FlowFile's lineage began
|
||||||
*
|
*
|
||||||
* @param startDate
|
* @param startDate start date of the event
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setLineageStartDate(long startDate);
|
ProvenanceEventBuilder setLineageStartDate(long startDate);
|
||||||
|
|
||||||
|
@ -145,8 +145,8 @@ public interface ProvenanceEventBuilder {
|
||||||
* Sets the unique identifier of the NiFi Component (such as a
|
* Sets the unique identifier of the NiFi Component (such as a
|
||||||
* {@link Processor}) that is generating the Event
|
* {@link Processor}) that is generating the Event
|
||||||
*
|
*
|
||||||
* @param componentId
|
* @param componentId that produced the event
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setComponentId(String componentId);
|
ProvenanceEventBuilder setComponentId(String componentId);
|
||||||
|
|
||||||
|
@ -154,8 +154,8 @@ public interface ProvenanceEventBuilder {
|
||||||
* Sets the type of the Component that is generating the Event. For
|
* Sets the type of the Component that is generating the Event. For
|
||||||
* {@link Processor}s, this is the Simple Class Name of the Processor.
|
* {@link Processor}s, this is the Simple Class Name of the Processor.
|
||||||
*
|
*
|
||||||
* @param componentType
|
* @param componentType of the component that made the event
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setComponentType(String componentType);
|
ProvenanceEventBuilder setComponentType(String componentType);
|
||||||
|
|
||||||
|
@ -167,8 +167,8 @@ public interface ProvenanceEventBuilder {
|
||||||
* and {@link ProvenanceEventType#SEND} and will be ignored for any other
|
* and {@link ProvenanceEventType#SEND} and will be ignored for any other
|
||||||
* event types.
|
* event types.
|
||||||
*
|
*
|
||||||
* @param sourceSystemFlowFileIdentifier
|
* @param sourceSystemFlowFileIdentifier identifier the remote system used
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setSourceSystemFlowFileIdentifier(String sourceSystemFlowFileIdentifier);
|
ProvenanceEventBuilder setSourceSystemFlowFileIdentifier(String sourceSystemFlowFileIdentifier);
|
||||||
|
|
||||||
|
@ -184,8 +184,8 @@ public interface ProvenanceEventBuilder {
|
||||||
* and {@link ProvenanceEventType#SEND} and will be ignored for any other
|
* and {@link ProvenanceEventType#SEND} and will be ignored for any other
|
||||||
* event types.
|
* event types.
|
||||||
*
|
*
|
||||||
* @param transitUri
|
* @param transitUri of the event
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setTransitUri(String transitUri);
|
ProvenanceEventBuilder setTransitUri(String transitUri);
|
||||||
|
|
||||||
|
@ -194,13 +194,13 @@ public interface ProvenanceEventBuilder {
|
||||||
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
||||||
* {@link ProvenanceEventType#CLONE}
|
* {@link ProvenanceEventType#CLONE}
|
||||||
*
|
*
|
||||||
* This is valid only for null null null null null {@link ProvenanceEventType#SPAWN},
|
* This is valid only for {@link ProvenanceEventType#SPAWN},
|
||||||
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
||||||
* {@link ProvenanceEventType#CLONE} events and will be ignored for any
|
* {@link ProvenanceEventType#CLONE} events and will be ignored for any
|
||||||
* other event types.
|
* other event types.
|
||||||
*
|
*
|
||||||
* @param parent
|
* @param parent flowfile that this event is derived from
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder addParentFlowFile(FlowFile parent);
|
ProvenanceEventBuilder addParentFlowFile(FlowFile parent);
|
||||||
|
|
||||||
|
@ -209,13 +209,13 @@ public interface ProvenanceEventBuilder {
|
||||||
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
||||||
* {@link ProvenanceEventType#CLONE}
|
* {@link ProvenanceEventType#CLONE}
|
||||||
*
|
*
|
||||||
* This is valid only for null null null null null {@link ProvenanceEventType#SPAWN},
|
* This is valid only for {@link ProvenanceEventType#SPAWN},
|
||||||
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
||||||
* {@link ProvenanceEventType#CLONE} events and will be ignored for any
|
* {@link ProvenanceEventType#CLONE} events and will be ignored for any
|
||||||
* other event types.
|
* other event types.
|
||||||
*
|
*
|
||||||
* @param parent
|
* @param parent previous parent of this event
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder removeParentFlowFile(FlowFile parent);
|
ProvenanceEventBuilder removeParentFlowFile(FlowFile parent);
|
||||||
|
|
||||||
|
@ -224,13 +224,13 @@ public interface ProvenanceEventBuilder {
|
||||||
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
||||||
* {@link ProvenanceEventType#CLONE}
|
* {@link ProvenanceEventType#CLONE}
|
||||||
*
|
*
|
||||||
* This is valid only for null null null null null {@link ProvenanceEventType#SPAWN},
|
* This is valid only for {@link ProvenanceEventType#SPAWN},
|
||||||
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
||||||
* {@link ProvenanceEventType#CLONE} events and will be ignored for any
|
* {@link ProvenanceEventType#CLONE} events and will be ignored for any
|
||||||
* other event types.
|
* other event types.
|
||||||
*
|
*
|
||||||
* @param child
|
* @param child the child to add
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder addChildFlowFile(FlowFile child);
|
ProvenanceEventBuilder addChildFlowFile(FlowFile child);
|
||||||
|
|
||||||
|
@ -239,13 +239,13 @@ public interface ProvenanceEventBuilder {
|
||||||
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
||||||
* {@link ProvenanceEventType#CLONE}
|
* {@link ProvenanceEventType#CLONE}
|
||||||
*
|
*
|
||||||
* This is valid only for null null null null null {@link ProvenanceEventType#SPAWN},
|
* This is valid only for {@link ProvenanceEventType#SPAWN},
|
||||||
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and
|
||||||
* {@link ProvenanceEventType#CLONE} events and will be ignored for any
|
* {@link ProvenanceEventType#CLONE} events and will be ignored for any
|
||||||
* other event types.
|
* other event types.
|
||||||
*
|
*
|
||||||
* @param child
|
* @param child to remove
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder removeChildFlowFile(FlowFile child);
|
ProvenanceEventBuilder removeChildFlowFile(FlowFile child);
|
||||||
|
|
||||||
|
@ -259,8 +259,8 @@ public interface ProvenanceEventBuilder {
|
||||||
* This is valid only for {@link ProvenanceEventType#ADDINFO} events and
|
* This is valid only for {@link ProvenanceEventType#ADDINFO} events and
|
||||||
* will be ignored for any other event types.
|
* will be ignored for any other event types.
|
||||||
*
|
*
|
||||||
* @param alternateIdentifierUri
|
* @param alternateIdentifierUri another identifier of the flowfile this event is for
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setAlternateIdentifierUri(String alternateIdentifierUri);
|
ProvenanceEventBuilder setAlternateIdentifierUri(String alternateIdentifierUri);
|
||||||
|
|
||||||
|
@ -268,8 +268,8 @@ public interface ProvenanceEventBuilder {
|
||||||
* Sets the details for this event. This is a free-form String that can
|
* Sets the details for this event. This is a free-form String that can
|
||||||
* contain any information that is relevant to this event.
|
* contain any information that is relevant to this event.
|
||||||
*
|
*
|
||||||
* @param details
|
* @param details a description of the event
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setDetails(String details);
|
ProvenanceEventBuilder setDetails(String details);
|
||||||
|
|
||||||
|
@ -279,8 +279,8 @@ public interface ProvenanceEventBuilder {
|
||||||
* {@link ProvenanceEventType#ROUTE} events and will be ignored for any
|
* {@link ProvenanceEventType#ROUTE} events and will be ignored for any
|
||||||
* other event types.
|
* other event types.
|
||||||
*
|
*
|
||||||
* @param relationship
|
* @param relationship to which flowfiles in this event were routed
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder setRelationship(Relationship relationship);
|
ProvenanceEventBuilder setRelationship(Relationship relationship);
|
||||||
|
|
||||||
|
@ -288,8 +288,8 @@ public interface ProvenanceEventBuilder {
|
||||||
* Populates the builder with as much information as it can from the given
|
* Populates the builder with as much information as it can from the given
|
||||||
* FlowFile
|
* FlowFile
|
||||||
*
|
*
|
||||||
* @param flowFile
|
* @param flowFile to source attributes for this event from
|
||||||
* @return
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder fromFlowFile(FlowFile flowFile);
|
ProvenanceEventBuilder fromFlowFile(FlowFile flowFile);
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ public interface ProvenanceEventBuilder {
|
||||||
* depend on the {@link ProvevenanceEventRepository} to generate the unique
|
* depend on the {@link ProvevenanceEventRepository} to generate the unique
|
||||||
* identifier.
|
* identifier.
|
||||||
*
|
*
|
||||||
* @return
|
* @return the event
|
||||||
*/
|
*/
|
||||||
ProvenanceEventRecord build();
|
ProvenanceEventRecord build();
|
||||||
|
|
||||||
|
|
|
@ -26,26 +26,20 @@ import java.util.Set;
|
||||||
public interface ProvenanceEventRecord {
|
public interface ProvenanceEventRecord {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a unique ID for this Provenance Event. Depending on the
|
* @return a unique ID for this Provenance Event. Depending on the
|
||||||
* implementation, the Event ID may be set to -1 until the event has been
|
* implementation, the Event ID may be set to -1 until the event has been
|
||||||
* added to the {@link ProvenanceEventRepository}
|
* added to the {@link ProvenanceEventRepository}
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
long getEventId();
|
long getEventId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the time at which this Provenance Event was created, as the
|
* @return the time at which this Provenance Event was created, as the
|
||||||
* number of milliseconds since epoch
|
* number of milliseconds since epoch
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
long getEventTime();
|
long getEventTime();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the EntryDate of the FlowFile to which this Event is associated
|
* @return the EntryDate of the FlowFile to which this Event is associated
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
long getFlowFileEntryDate();
|
long getFlowFileEntryDate();
|
||||||
|
|
||||||
|
@ -61,236 +55,181 @@ public interface ProvenanceEventRecord {
|
||||||
Set<String> getLineageIdentifiers();
|
Set<String> getLineageIdentifiers();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the size of the FlowFile to which this Event is associated
|
* @return the size of the FlowFile to which this Event is associated
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
long getFileSize();
|
long getFileSize();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the previous size of the FlowFile to which this Event is
|
* @return the previous size of the FlowFile to which this Event is
|
||||||
* associated, if the FlowFile previously had content and its size was
|
* associated, if the FlowFile previously had content and its size was
|
||||||
* known; otherwise, returns <code>null</code>
|
* known; otherwise, returns <code>null</code>
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Long getPreviousFileSize();
|
Long getPreviousFileSize();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the amount of time in milliseconds that elapsed while performing
|
* @return the amount of time in milliseconds that elapsed while performing
|
||||||
* this event. If not populated, the value -1 will be returned.
|
* this event. If not populated, the value -1 will be returned
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
long getEventDuration();
|
long getEventDuration();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the type of this Provenance Event
|
* @return the type of this Provenance Event
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ProvenanceEventType getEventType();
|
ProvenanceEventType getEventType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all FlowFile attributes that were associated with the FlowFile at
|
* @return all FlowFile attributes that were associated with the FlowFile at
|
||||||
* the time that this ProvenanceEvent was created
|
* the time that this ProvenanceEvent was created
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Map<String, String> getAttributes();
|
Map<String, String> getAttributes();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all FlowFile attributes that existed on the FlowFile before this
|
* @return all FlowFile attributes that existed on the FlowFile before this
|
||||||
* event occurred
|
* event occurred
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Map<String, String> getPreviousAttributes();
|
Map<String, String> getPreviousAttributes();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all FlowFile attributes that were updated as a result of this
|
* @return all FlowFile attributes that were updated as a result of this
|
||||||
* event
|
* event
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Map<String, String> getUpdatedAttributes();
|
Map<String, String> getUpdatedAttributes();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the ID of the Processor/component that created this Provenance
|
* @return the ID of the Processor/component that created this Provenance
|
||||||
* Event
|
* Event
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getComponentId();
|
String getComponentId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the fully-qualified Class Name of the Processor/component that
|
* @return the fully-qualified Class Name of the Processor/component that
|
||||||
* created this Provenance Event
|
* created this Provenance Event
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getComponentType();
|
String getComponentType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a URI that provides information about the System and Protocol
|
* @return a URI that provides information about the System and Protocol
|
||||||
* information over which the transfer occurred. The intent of this field is
|
* information over which the transfer occurred. The intent of this field is
|
||||||
* such that both the sender and the receiver can publish the events to an
|
* such that both the sender and the receiver can publish the events to an
|
||||||
* external Enterprise-wide system that is then able to correlate the SEND
|
* external Enterprise-wide system that is then able to correlate the SEND
|
||||||
* and RECEIVE events.
|
* and RECEIVE events.
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getTransitUri();
|
String getTransitUri();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the UUID that the Source System used to refer to this data; this
|
|
||||||
* is applicable only when the {@link ProvenanceEventType} is of type
|
|
||||||
* {@link ProvenanceEventType#RECEIVE RECEIVE}.
|
|
||||||
*
|
|
||||||
* Since the receiving system will usually refer to the data using a
|
* Since the receiving system will usually refer to the data using a
|
||||||
* different identifier than the source system, this information is used to
|
* different identifier than the source system, this information is used to
|
||||||
* correlate the receive system's FlowFile with the sending system's data
|
* correlate the receive system's FlowFile with the sending system's data
|
||||||
*
|
*
|
||||||
* @return
|
* @return the UUID that the Source System used to refer to this data; this
|
||||||
|
* is applicable only when the {@link ProvenanceEventType} is of type
|
||||||
|
* {@link ProvenanceEventType#RECEIVE RECEIVE}
|
||||||
*/
|
*/
|
||||||
String getSourceSystemFlowFileIdentifier();
|
String getSourceSystemFlowFileIdentifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the UUID of the FlowFile with which this Event is associated
|
* @return the UUID of the FlowFile with which this Event is associated
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getFlowFileUuid();
|
String getFlowFileUuid();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the UUID's of all Parent FlowFiles. This is applicable only when
|
* @return the UUID's of all Parent FlowFiles. This is applicable only when
|
||||||
* the {@link ProvenanceEventType} is of type
|
* the {@link ProvenanceEventType} is of type
|
||||||
* {@link ProvenanceEventType#SPAWN SPAWN}.
|
* {@link ProvenanceEventType#SPAWN SPAWN}
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
List<String> getParentUuids();
|
List<String> getParentUuids();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the UUID's of all Child FlowFiles. This is applicable only when
|
* @return the UUID's of all Child FlowFiles. This is applicable only when
|
||||||
* the {@link ProvenanceEventType} is of type
|
* the {@link ProvenanceEventType} is of type
|
||||||
* {@link ProvenanceEventType#SPAWN SPAWN}.
|
* {@link ProvenanceEventType#SPAWN SPAWN}
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
List<String> getChildUuids();
|
List<String> getChildUuids();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Alternate Identifier associated with the FlowFile with which
|
* @return the Alternate Identifier associated with the FlowFile with which
|
||||||
* this Event is associated. This is applicable only when the
|
* this Event is associated. This is applicable only when the
|
||||||
* {@link ProvenanceEventType} is of type
|
* {@link ProvenanceEventType} is of type
|
||||||
* {@link ProvenanceEventType#ADDINFO}.
|
* {@link ProvenanceEventType#ADDINFO}
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getAlternateIdentifierUri();
|
String getAlternateIdentifierUri();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the details for this record, if any were supplied. Otherwise,
|
* @return the details for this record, if any were supplied. Otherwise,
|
||||||
* returns <code>null</code>
|
* returns <code>null</code>
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
String getDetails();
|
String getDetails();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the relationship to which this record was routed if the event
|
* @return the relationship to which this record was routed if the event
|
||||||
* type is {@link ProvenanceEventType#ROUTE}. The relationship is applicable
|
* type is {@link ProvenanceEventType#ROUTE}. The relationship is applicable
|
||||||
* only to this type.
|
* only to this type
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
String getRelationship();
|
String getRelationship();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the identifier of the queue from which the FlowFile was taken, if
|
* @return the identifier of the queue from which the FlowFile was taken, if
|
||||||
* any. If the FlowFile is created as a result of this event (in this case,
|
* any. If the FlowFile is created as a result of this event (in this case,
|
||||||
* the Event Type is one of null null null null null {@link ProvenanceEventType#CREATE}, {@link ProvenanceEventType#RECEIVE},
|
* the Event Type is one of null null null null null null null null {@link ProvenanceEventType#CREATE}, {@link ProvenanceEventType#RECEIVE},
|
||||||
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, or
|
* {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, or
|
||||||
* {@link ProvenanceEventType#CLONE}), or if the queue identifier is
|
* {@link ProvenanceEventType#CLONE}), or if the queue identifier is
|
||||||
* unknown, then this method will return <code>null</code>.
|
* unknown, then this method will return <code>null</code>
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
String getSourceQueueIdentifier();
|
String getSourceQueueIdentifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Section for the Content Claim that this Event refers to, if
|
* @return the Section for the Content Claim that this Event refers to, if
|
||||||
* any; otherwise, returns <code>null</code>
|
* any; otherwise, returns <code>null</code>
|
||||||
*
|
*
|
||||||
* @return
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
String getContentClaimSection();
|
String getContentClaimSection();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Section for the Content Claim that the FlowFile previously
|
* @return the Section for the Content Claim that the FlowFile previously
|
||||||
* referenced, if any; otherwise, returns <code>null</code>
|
* referenced, if any; otherwise, returns <code>null</code>
|
||||||
*
|
*
|
||||||
* @return
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
String getPreviousContentClaimSection();
|
String getPreviousContentClaimSection();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Container for the Content Claim that this Event refers to, if
|
* @return the Container for the Content Claim that this Event refers to, if
|
||||||
* any; otherwise, returns <code>null</code>
|
* any; otherwise, returns <code>null</code>
|
||||||
*
|
*
|
||||||
* @return
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
String getContentClaimContainer();
|
String getContentClaimContainer();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Container for the Content Claim that the FlowFile previously
|
* @return the Container for the Content Claim that the FlowFile previously
|
||||||
* referenced, if any; otherwise, returns <code>null</code>
|
* referenced, if any; otherwise, returns <code>null</code>
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
String getPreviousContentClaimContainer();
|
String getPreviousContentClaimContainer();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Identifier for the Content Claim that this Event refers to,
|
* @return the Identifier for the Content Claim that this Event refers to,
|
||||||
* if any; otherwise, returns <code>null</code>
|
* if any; otherwise, returns <code>null</code>
|
||||||
*
|
*
|
||||||
* @return
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
String getContentClaimIdentifier();
|
String getContentClaimIdentifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Identifier for the Content Claim that the FlowFile previously
|
* @return the Identifier for the Content Claim that the FlowFile previously
|
||||||
* referenced, if any; otherwise, returns <code>null</code>
|
* referenced, if any; otherwise, returns <code>null</code>
|
||||||
*
|
*
|
||||||
* @return
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
String getPreviousContentClaimIdentifier();
|
String getPreviousContentClaimIdentifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the offset into the Content Claim at which the FlowFile's content
|
* @return the offset into the Content Claim at which the FlowFile's content
|
||||||
* begins, if any; otherwise, returns <code>null</code>
|
* begins, if any; otherwise, returns <code>null</code>
|
||||||
*
|
*
|
||||||
* @return
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
Long getContentClaimOffset();
|
Long getContentClaimOffset();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the offset into the Content Claim at which the FlowFile's
|
* @return the offset into the Content Claim at which the FlowFile's
|
||||||
* previous content began, if any; otherwise, returns <code>null</code>
|
* previous content began, if any; otherwise, returns <code>null</code>
|
||||||
*
|
*
|
||||||
* @return
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
Long getPreviousContentClaimOffset();
|
Long getPreviousContentClaimOffset();
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,8 +36,9 @@ public interface ProvenanceEventRepository {
|
||||||
/**
|
/**
|
||||||
* Performs any initialization needed. This should be called only by the
|
* Performs any initialization needed. This should be called only by the
|
||||||
* framework.
|
* framework.
|
||||||
* @param eventReporter
|
*
|
||||||
* @throws java.io.IOException
|
* @param eventReporter to report to
|
||||||
|
* @throws java.io.IOException if unable to initialize
|
||||||
*/
|
*/
|
||||||
void initialize(EventReporter eventReporter) throws IOException;
|
void initialize(EventReporter eventReporter) throws IOException;
|
||||||
|
|
||||||
|
@ -45,7 +46,7 @@ public interface ProvenanceEventRepository {
|
||||||
* Returns a {@link ProvenanceEventBuilder} that is capable of building
|
* Returns a {@link ProvenanceEventBuilder} that is capable of building
|
||||||
* {@link ProvenanceEventRecord}s
|
* {@link ProvenanceEventRecord}s
|
||||||
*
|
*
|
||||||
* @return
|
* @return builder
|
||||||
*/
|
*/
|
||||||
ProvenanceEventBuilder eventBuilder();
|
ProvenanceEventBuilder eventBuilder();
|
||||||
|
|
||||||
|
@ -54,7 +55,7 @@ public interface ProvenanceEventRepository {
|
||||||
* the event id has been populated. Depending on the implementation, the
|
* the event id has been populated. Depending on the implementation, the
|
||||||
* returned event may or may not be the same event given
|
* returned event may or may not be the same event given
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event to register
|
||||||
*/
|
*/
|
||||||
void registerEvent(ProvenanceEventRecord event);
|
void registerEvent(ProvenanceEventRecord event);
|
||||||
|
|
||||||
|
@ -66,7 +67,7 @@ public interface ProvenanceEventRepository {
|
||||||
* of the Collection are atomic. This detail is implementation-specific.
|
* of the Collection are atomic. This detail is implementation-specific.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param events
|
* @param events to register
|
||||||
*/
|
*/
|
||||||
void registerEvents(Iterable<ProvenanceEventRecord> events);
|
void registerEvents(Iterable<ProvenanceEventRecord> events);
|
||||||
|
|
||||||
|
@ -75,18 +76,16 @@ public interface ProvenanceEventRepository {
|
||||||
* repository starting with the given ID. The first ID in the repository
|
* repository starting with the given ID. The first ID in the repository
|
||||||
* will always be 0 or higher.
|
* will always be 0 or higher.
|
||||||
*
|
*
|
||||||
* @param firstRecordId
|
* @param firstRecordId id of the first record to retrieve
|
||||||
* @param maxRecords
|
* @param maxRecords maximum number of records to retrieve
|
||||||
* @return
|
* @return records
|
||||||
* @throws java.io.IOException
|
* @throws java.io.IOException if error reading from repository
|
||||||
*/
|
*/
|
||||||
List<ProvenanceEventRecord> getEvents(long firstRecordId, final int maxRecords) throws IOException;
|
List<ProvenanceEventRecord> getEvents(long firstRecordId, final int maxRecords) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the largest ID of any event that is queryable in the repository.
|
* @return the largest ID of any event that is queryable in the repository.
|
||||||
* If no queryable events exists, returns null
|
* If no queryable events exists, returns null
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Long getMaxEventId();
|
Long getMaxEventId();
|
||||||
|
|
||||||
|
@ -94,19 +93,18 @@ public interface ProvenanceEventRepository {
|
||||||
* Submits an asynchronous request to process the given query, returning an
|
* Submits an asynchronous request to process the given query, returning an
|
||||||
* identifier that can be used to fetch the results at a later time
|
* identifier that can be used to fetch the results at a later time
|
||||||
*
|
*
|
||||||
* @param query
|
* @param query to submit
|
||||||
* @return
|
* @return an identifier that can be used to fetch the results at a later
|
||||||
|
* time
|
||||||
*/
|
*/
|
||||||
QuerySubmission submitQuery(Query query);
|
QuerySubmission submitQuery(Query query);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the QueryResult associated with the given identifier, if the
|
* @param queryIdentifier of the query
|
||||||
|
*
|
||||||
|
* @return the QueryResult associated with the given identifier, if the
|
||||||
* query has finished processing. If the query has not yet finished running,
|
* query has finished processing. If the query has not yet finished running,
|
||||||
* returns <code>null</code>.
|
* returns <code>null</code>
|
||||||
*
|
|
||||||
* @param queryIdentifier
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
QuerySubmission retrieveQuerySubmission(String queryIdentifier);
|
QuerySubmission retrieveQuerySubmission(String queryIdentifier);
|
||||||
|
|
||||||
|
@ -123,21 +121,17 @@ public interface ProvenanceEventRepository {
|
||||||
ComputeLineageSubmission submitLineageComputation(String flowFileUuid);
|
ComputeLineageSubmission submitLineageComputation(String flowFileUuid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link ComputeLineageSubmission} associated with the given
|
* @param lineageIdentifier identifier of lineage to compute
|
||||||
|
* @return the {@link ComputeLineageSubmission} associated with the given
|
||||||
* identifier
|
* identifier
|
||||||
*
|
|
||||||
* @param lineageIdentifier
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ComputeLineageSubmission retrieveLineageSubmission(String lineageIdentifier);
|
ComputeLineageSubmission retrieveLineageSubmission(String lineageIdentifier);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Provenance Event Record with the given ID, if it exists, or
|
* @param id to lookup
|
||||||
|
* @return the Provenance Event Record with the given ID, if it exists, or
|
||||||
* {@code null} otherwise
|
* {@code null} otherwise
|
||||||
*
|
* @throws IOException if failure while retrieving event
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
ProvenanceEventRecord getEvent(long id) throws IOException;
|
ProvenanceEventRecord getEvent(long id) throws IOException;
|
||||||
|
|
||||||
|
@ -145,7 +139,7 @@ public interface ProvenanceEventRepository {
|
||||||
* Submits a request to expand the parents of the event with the given id
|
* Submits a request to expand the parents of the event with the given id
|
||||||
*
|
*
|
||||||
* @param eventId the one-up id of the Event to expand
|
* @param eventId the one-up id of the Event to expand
|
||||||
* @return
|
* @return a submission which can be checked for status
|
||||||
*
|
*
|
||||||
* @throws IllegalArgumentException if the given identifier identifies a
|
* @throws IllegalArgumentException if the given identifier identifies a
|
||||||
* Provenance Event that has a Type that is not expandable or if the
|
* Provenance Event that has a Type that is not expandable or if the
|
||||||
|
@ -157,7 +151,7 @@ public interface ProvenanceEventRepository {
|
||||||
* Submits a request to expand the children of the event with the given id
|
* Submits a request to expand the children of the event with the given id
|
||||||
*
|
*
|
||||||
* @param eventId the one-up id of the Event
|
* @param eventId the one-up id of the Event
|
||||||
* @return
|
* @return a submission which can be checked for status
|
||||||
*
|
*
|
||||||
* @throws IllegalArgumentException if the given identifier identifies a
|
* @throws IllegalArgumentException if the given identifier identifies a
|
||||||
* Provenance Event that has a Type that is not expandable or if the
|
* Provenance Event that has a Type that is not expandable or if the
|
||||||
|
@ -168,23 +162,19 @@ public interface ProvenanceEventRepository {
|
||||||
/**
|
/**
|
||||||
* Closes the repository, freeing any resources
|
* Closes the repository, freeing any resources
|
||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException if failure closing repository
|
||||||
*/
|
*/
|
||||||
void close() throws IOException;
|
void close() throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all fields that can be searched via the
|
* @return a list of all fields that can be searched via the
|
||||||
* {@link #submitQuery(nifi.provenance.search.Query)} method
|
* {@link #submitQuery(nifi.provenance.search.Query)} method
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
List<SearchableField> getSearchableFields();
|
List<SearchableField> getSearchableFields();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all FlowFile attributes that can be searched via the
|
* @return a list of all FlowFile attributes that can be searched via the
|
||||||
* {@link #submitQuery(nifi.provenance.search.Query)} method
|
* {@link #submitQuery(nifi.provenance.search.Query)} method
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
List<SearchableField> getSearchableAttributes();
|
List<SearchableField> getSearchableAttributes();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,46 +25,34 @@ import java.util.List;
|
||||||
public interface ComputeLineageResult {
|
public interface ComputeLineageResult {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all nodes for the graph
|
* @return all nodes for the graph
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public List<LineageNode> getNodes();
|
public List<LineageNode> getNodes();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all links for the graph
|
* @return all links for the graph
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public List<LineageEdge> getEdges();
|
public List<LineageEdge> getEdges();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the date at which this AsynchronousLineageResult will expire
|
* @return the date at which this AsynchronousLineageResult will expire
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Date getExpiration();
|
Date getExpiration();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If an error occurred while computing the lineage, this will return the
|
* @return If an error occurred while computing the lineage, this will return the
|
||||||
* serialized error; otherwise, returns <code>null</code>.
|
* serialized error; otherwise, returns <code>null</code>
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getError();
|
String getError();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns an integer between 0 and 100 (inclusive) that indicates what
|
* @return an integer between 0 and 100 (inclusive) that indicates what
|
||||||
* percentage of completion the computation has reached
|
* percentage of completion the computation has reached
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
int getPercentComplete();
|
int getPercentComplete();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether or not the lineage has finished running
|
* @return Indicates whether or not the lineage has finished running
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
boolean isFinished();
|
boolean isFinished();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,25 +22,19 @@ import java.util.Date;
|
||||||
public interface ComputeLineageSubmission {
|
public interface ComputeLineageSubmission {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link ComputeLineageResult} that contains the results. The
|
* @return the {@link ComputeLineageResult} that contains the results. The
|
||||||
* results may be partial if a call to
|
* results may be partial if a call to
|
||||||
* {@link ComputeLineageResult#isFinished()} returns <code>false</code>.
|
* {@link ComputeLineageResult#isFinished()} returns <code>false</code>
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
ComputeLineageResult getResult();
|
ComputeLineageResult getResult();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the date at which this lineage was submitted
|
* @return the date at which this lineage was submitted
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Date getSubmissionTime();
|
Date getSubmissionTime();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the generated identifier for this lineage result
|
* @return the generated identifier for this lineage result
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getLineageIdentifier();
|
String getLineageIdentifier();
|
||||||
|
|
||||||
|
@ -56,27 +50,21 @@ public interface ComputeLineageSubmission {
|
||||||
boolean isCanceled();
|
boolean isCanceled();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the type of Lineage Computation that was submitted
|
* @return the type of Lineage Computation that was submitted
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
LineageComputationType getLineageComputationType();
|
LineageComputationType getLineageComputationType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the Lineage Computation Type of this submission is
|
* @return If the Lineage Computation Type of this submission is
|
||||||
* {@link LineageComputationType.EXPAND_CHILDREN} or
|
* {@link LineageComputationType.EXPAND_CHILDREN} or
|
||||||
* {@link LineageComputationType.EXPAND_PARENTS}, indicates the ID event
|
* {@link LineageComputationType.EXPAND_PARENTS}, indicates the ID event
|
||||||
* that is to be expanded; otherwise, returns <code>null</code>.
|
* that is to be expanded; otherwise, returns <code>null</code>
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Long getExpandedEventId();
|
Long getExpandedEventId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all FlowFile UUID's that are encapsulated in this lineage
|
* @return all FlowFile UUID's that are encapsulated in this lineage
|
||||||
* computation submission
|
* computation submission
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Collection<String> getLineageFlowFileUuids();
|
Collection<String> getLineageFlowFileUuids();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,16 +25,12 @@ import java.util.List;
|
||||||
public interface Lineage {
|
public interface Lineage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all nodes for the graph
|
* @return all nodes for the graph
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public List<LineageNode> getNodes();
|
public List<LineageNode> getNodes();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all links for the graph
|
* @return all links for the graph
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public List<LineageEdge> getEdges();
|
public List<LineageEdge> getEdges();
|
||||||
|
|
||||||
|
|
|
@ -19,43 +19,33 @@ package org.apache.nifi.provenance.lineage;
|
||||||
public interface LineageNode {
|
public interface LineageNode {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the identifier of the Clustered NiFi Node that generated the
|
* @return the identifier of the Clustered NiFi Node that generated the
|
||||||
* event
|
* event
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getClusterNodeIdentifier();
|
String getClusterNodeIdentifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the type of the LineageNode
|
* @return the type of the LineageNode
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
LineageNodeType getNodeType();
|
LineageNodeType getNodeType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the UUID of the FlowFile for which this Node was created
|
* @return the UUID of the FlowFile for which this Node was created
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getFlowFileUuid();
|
String getFlowFileUuid();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the UUID for this LineageNode.
|
* @return the UUID for this LineageNode
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getIdentifier();
|
String getIdentifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the timestamp that corresponds to this Node. The meaning of the
|
* @return the timestamp that corresponds to this Node. The meaning of the
|
||||||
* timestamp may differ between implementations. For example, a
|
* timestamp may differ between implementations. For example, a
|
||||||
* {@link ProvenanceEventLineageNode}'s timestamp indicates the time at
|
* {@link ProvenanceEventLineageNode}'s timestamp indicates the time at
|
||||||
* which the event occurred. However, for a Node that reperesents a
|
* which the event occurred. However, for a Node that reperesents a
|
||||||
* FlowFile, for example, the timestamp may represent the time at which the
|
* FlowFile, for example, the timestamp may represent the time at which the
|
||||||
* FlowFile was created.
|
* FlowFile was created
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
long getTimestamp();
|
long getTimestamp();
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue