diff --git a/LICENSE b/LICENSE index d645695673..37579393e1 100644 --- a/LICENSE +++ b/LICENSE @@ -200,3 +200,387 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + +APACHE NIFI SUBCOMPONENTS: + +The Apache NiFi project contains subcomponents with separate copyright +notices and license terms. Your use of the source code for the these +subcomponents is subject to the terms and conditions of the following +licenses. + +The binary distribution of this product bundles 'Antlr 3' which is available +under a "3-clause BSD" license. For details see http://www.antlr3.org/license.html + + Copyright (c) 2010 Terence Parr + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. + +The binary distribution of this product bundles 'Paranamer Core' which is +available under a "3-clause BSD" license. +For details see http://paranamer.codehaus.org/paranamer + + Copyright (c) 2006 Paul Hammant & ThoughtWorks Inc + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. + +The binary distribution of this product bundles 'xmlenc Library' which is +available under The BSD 2-Clause license found here: +http://www.opensource.org/licenses/bsd-license.php +For details http://xmlenc.sourceforge.net + +The binary distribution of this product bundles 'Protocol Buffer Java API' +which is available under The BSD 2-Clause license found here: +http://www.opensource.org/licenses/bsd-license.php +For details http://code.google.com/p/protobuf + +The binary distribution of this product bundles 'JZlib' which is +available under a "3-clause BSD" license. +For details see http://www.jcraft.com/jzlib/ + + Copyright (c) 2000-2011 ymnk, JCraft,Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + + 3. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, + INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The binary distribution of this product bundles 'JSch' which is +available under a "3-clause BSD" license. +For details see http://www.jcraft.com/jsch/ + + Copyright (c) 2002-2014 Atsuhiko Yamanaka, JCraft,Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + + 3. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, + INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This product bundles 'Javascript D3 Library' which is available under a +"3-clause BSD" license. For details see http://d3js.org/ + + Copyright (c) 2010-2014, Michael Bostock + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * The name Michael Bostock may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The binary distribution of this product bundles 'BouncyCastle Provider' +which is available under an MIT style license. +For details see http://www.bouncycastle.org/java.html + + Copyright (c) 2000 - 2013 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org) + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +The binary distribution of this product bundles 'SLF4J' which is available +under an MIT style license. +For details see http://www.qos.ch + + Copyright (c) 2004-2013 QOS.ch + All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +This product bundles 'jQuery Grid' which is available under the MIT License. +http://www.opensource.org/licenses/mit-license.php +For details see http://jqgrid.com/ + Copyright (c) 2008, Tony Tomov, tony@trirand.com + +This product bundles 'CodeMirror' which is available under an MIT style license. +For details see http://codemirror.net/doc/compress.html + + Copyright (C) 2014 by Marijn Haverbeke and others + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +This product bundles 'jQuery UI' which is available under an MIT style license. +For details see http://jqueryui.com + + Copyright 2014 jQuery Foundation and other contributors, + http://jqueryui.com/ + + This software consists of voluntary contributions made by many + individuals (AUTHORS.txt, http://jqueryui.com/about) For exact + contribution history, see the revision history and logs, available + at http://jquery-ui.googlecode.com/svn/ + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +This product bundles 'SLICKGRID' which is available under an MIT style license. +For details see http://github.com/mleibman/slickgrid + Copyright (c) 2010 Michael Leibman, http://github.com/mleibman/slickgrid + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +This product bundles 'qTip2' which is available under an MIT style license. +For details see http://qtip2.com + + Copyright (c) 2012 Craig Michael Thompson + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + +This product bundles 'jQuery MiniColors' which is available under the MIT License. +http://opensource.org/licenses/MIT +For details see http://www.abeautifulsite.net/ + Copyright Cory LaViska for A Beautiful Site, LLC. (http://www.abeautifulsite.net/) + +The binary distribution of this product bundles the following libraries: + Expression Languagee 3.0 API, JavaServer Pages(TM) API, + JavaServer Pages(TM) Standard Tag Library API, Expression Language 3.0, + JSP implementation, JavaServer Pages (TM) TagLib Implementation, + Java Servlet API +which are all available under the CDDL 1.0 License. +https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html +For details see https://glassfish.java.net/ + Copyright (c) 2010-2014 Oracle and/or its affiliates. All rights reserved. + +The binary distribution of this product bundles the following libraries: + jersey-core, jersey-json, jersey-server, jersey-servlet, jersey-multipart, + jersey-spring, JAXB RI, JAXB API bundle for GlassFish V3, + MIME streaming extension, JavaMail API (compat) +which are all available under the CDDL 1.1 License. +http://glassfish.java.net/public/CDDL+GPL_1_1.html +For details see https://glassfish.java.net/ + Copyright (c) 2010-2014 Oracle and/or its affiliates. All rights reserved. + +The binary distribution of this product bundles 'H2 Database' which is available +under the MPL 2.0 license. +http://www.h2database.com/html/license.html#mpl2 +For details see http://www.h2database.com + This software contains unmodified binary redistributions for H2 database + engine (http://www.h2database.com/), which is dual licensed and available + under the MPL 2.0 (Mozilla Public License) or under the + EPL 1.0 (Eclipse Public License). + An original copy of the license agreement can be found + at: http://www.h2database.com/html/license.html + +The binary distribution of this product bundles 'Saxon-HE' which is available +under the MPL 2.0 license http://www.mozilla.org/MPL/2.0/ +For details see http://saxonica.com/download/opensource.xml + +The binary distribution of this product bundles 'AspectJ Weaver' which is +available under the EPL 1.0 license http://www.eclipse.org/legal/epl-v10.html +For details see http://www.aspectj.org + +The binary distribution of this product bundles 'Logback' which is available +under the EPL 1.0 license http://www.eclipse.org/legal/epl-v10.html +For details see http://logback.qos.ch + Copyright (C) 1999-2012, QOS.ch. All rights reserved. + +The binary distribution of this product bundles 'XZ for Java' which is available +in the 'public domain'. For details see http://tukaani.org/xz/java.html + +The binary distribution of this product bundles 'AOP Alliance' which is +available in the 'public domain'. +For details see http://aopalliance.sourceforge.net + +This product bundles 'json2.js' which is available in the 'public domain'. +For details see https://github.com/douglascrockford/JSON-js + diff --git a/NOTICE b/NOTICE index e02ae44d1d..41ecce9090 100644 --- a/NOTICE +++ b/NOTICE @@ -4,4 +4,11 @@ Copyright 2014 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). +Please note that this product bundles software libraries which are covered +by the following "weak copyleft" style licenses including; +CDDL v1.0, CDDL v1.1, MPL v2.0, and EPL v1.0 + +Please note that this product bundles software libraries which are licensed +to the 'public domain'. + Please see LICENSE for additional copyright and licensing information. diff --git a/README.md b/README.md index 3f051341b5..5fe3cb4a3d 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Apache NiFi supports powerful and scalable directed graphs of data routing, tran ## Getting Started -Execute /bin/nifi.sh +Execute /bin/nifi.sh start ## Getting Help If you have questions, you can reach out to our mailing list: dev@nifi.incubator.apache.org @@ -63,3 +63,33 @@ 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. + +## Export Control + +This distribution includes cryptographic software. The country in which you +currently reside may have restrictions on the import, possession, use, and/or +re-export to another country, of encryption software. BEFORE using any +encryption software, please check your country's laws, regulations and +policies concerning the import, possession, or use, and re-export of encryption +software, to see if this is permitted. See for more +information. + +The U.S. Government Department of Commerce, Bureau of Industry and Security +(BIS), has classified this software as Export Commodity Control Number (ECCN) +5D002.C.1, which includes information security software using or performing +cryptographic functions with asymmetric algorithms. The form and manner of this +Apache Software Foundation distribution makes it eligible for export under the +License Exception ENC Technology Software Unrestricted (TSU) exception (see the +BIS Export Administration Regulations, Section 740.13) for both object code and +source code. + +The following provides more details on the included cryptographic software: + +Apache NiFi uses BouncyCastle, Jasypt, JCraft Inc., and the built-in +java cryptography libraries for SSL, SSH, and the protection +of sensitive configuration parameters. See +http://bouncycastle.org/about.html +http://www.jasypt.org/faq.html +http://jcraft.com/c-info.html +http://www.oracle.com/us/products/export/export-regulations-345813.html +for more details on each of these libraries cryptography features. diff --git a/assembly/pom.xml b/assembly/pom.xml index 17cf29b481..7f7f695652 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -43,6 +43,19 @@ false + + unpack-docs + + unpack-dependencies + + generate-resources + + ${project.build.directory}/generated-docs + nifi-docs + org.apache.nifi + false + + @@ -123,6 +136,13 @@ provided zip + + org.apache.nifi + nifi-docs + resources + provided + zip + org.apache.nifi nifi-framework-nar @@ -325,16 +345,10 @@ 5 sec 10 0 sec - - bin - ${project.artifactId}-${project.version}/bin/${project.artifactId} - standard-rpm + rpm false @@ -343,101 +357,100 @@ org.codehaus.mojo rpm-maven-plugin - - - - rpm - - - - ${project.artifactId} - ${project.version} Apache NiFi (incubating) - - Apache Nifi (incubating) is dataflow system - based on the Flow-Based Programming concepts. - - NONE - http://nifi.apache.org + Apache Nifi (incubating) is dataflow system based on the Flow-Based Programming concepts. + Apache License, Version 2.0 and others (see included LICENSE file) + http://nifi.incubator.apache.org Utilities - - jdk - - /opt/${project.artifactId} + /opt/nifi _use_internal_dependency_generator 0 750 640 - nifi - nifi - - - /opt/${project.artifactId}/${project.artifactId}-${project.version} - - - /opt/${project.artifactId}/${project.artifactId}-${project.version}/bin - 750 - - - ${project.build.directory}/generated-resources/bin/nifi - ${project.artifactId} - true - - - ${project.build.directory}/generated-resources/bin/wrapper-linux-x86-32 - - - ${project.build.directory}/generated-resources/bin/wrapper-linux-x86-64 - - - - - /opt/${project.artifactId}/${project.artifactId}-${project.version}/conf - true - - - ${project.build.directory}/generated-resources/conf - - nifi.properties - - true - - - ${project.build.directory}/generated-resources/conf/nifi.properties - ${project.artifactId}.properties - true - - - - - /opt/${project.artifactId}/${project.artifactId}-${project.version}/lib - - - - ${project.build.directory}/generated-resources/lib - - - - - /opt/${project.artifactId}/${project.artifactId}-${project.version}/docs - - - ${project.build.directory}/generated-resources/docs - - - - - /opt/${project.artifactId}/${project.artifactId}-${project.version}/logs - - - ${project.build.directory}/generated-resources/logs - - - - + root + root + + + build-bin-rpm + + attached-rpm + + + bin + + nifi + + + + /opt/nifi/nifi-${project.version} + + + /opt/nifi/nifi-${project.version} + + + ../LICENSE + + + ../NOTICE + + + ../README.md + README + + + + + /opt/nifi/nifi-${project.version}/bin + 750 + + + ${project.build.directory}/generated-resources/bin/nifi.sh + nifi.sh + true + + + + + /opt/nifi/nifi-${project.version}/conf + true + + + ${project.build.directory}/generated-resources/conf + true + + + + + /opt/nifi/nifi-${project.version}/lib + + + org.apache.nifi:nifi-bootstrap + + + + + /opt/nifi/nifi-${project.version}/lib/bootstrap + + + org.apache.nifi:nifi-bootstrap + + + + + /opt/nifi/nifi-${project.version}/docs + + + ${project.build.directory}/generated-docs + + + + + + + diff --git a/assembly/src/main/assembly/dependencies.xml b/assembly/src/main/assembly/dependencies.xml index f90127af4d..4b77a32284 100644 --- a/assembly/src/main/assembly/dependencies.xml +++ b/assembly/src/main/assembly/dependencies.xml @@ -81,6 +81,13 @@ 0640 false + + ${project.build.directory}/generated-docs/ + docs + 0750 + 0640 + false + @@ -99,38 +106,31 @@ true - ${project.build.directory}/generated-resources/docs/README.md - docs - README.md - 0640 + ../README.md + ./ + README + 0644 true - ${project.build.directory}/generated-resources/DISCLAIMER + ../DISCLAIMER ./ DISCLAIMER - 0640 + 0644 true - ${project.build.directory}/generated-resources/DISCLAIMER - ./ - DISCLAIMER - 0640 - true - - - ${project.build.directory}/generated-resources/LICENSE + ../LICENSE ./ LICENSE - 0640 + 0644 true - ${project.build.directory}/generated-resources/NOTICE + ../NOTICE ./ NOTICE - 0640 + 0644 true diff --git a/commons/core-flowfile-attributes/pom.xml b/commons/core-flowfile-attributes/pom.xml deleted file mode 100644 index 5a82ffaf8a..0000000000 --- a/commons/core-flowfile-attributes/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - 4.0.0 - - - org.apache.nifi - nifi-commons-parent - 0.0.1-SNAPSHOT - - - nifi-core-flowfile-attributes - 0.0.1-SNAPSHOT - jar - - NiFi: Core FlowFile Attributes - diff --git a/commons/data-provenance-utils/pom.xml b/commons/data-provenance-utils/pom.xml index 162d4f3657..0024b7044e 100644 --- a/commons/data-provenance-utils/pom.xml +++ b/commons/data-provenance-utils/pom.xml @@ -34,7 +34,7 @@ org.apache.nifi - nifi-core-flowfile-attributes + nifi-utils diff --git a/commons/naive-search-ring-buffer/pom.xml b/commons/naive-search-ring-buffer/pom.xml deleted file mode 100644 index c9628f0b36..0000000000 --- a/commons/naive-search-ring-buffer/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - 4.0.0 - - - org.apache.nifi - nifi-commons-parent - 0.0.1-SNAPSHOT - - - naive-search-ring-buffer - 0.0.1-SNAPSHOT - jar - - NiFi Ring Buffer - - diff --git a/commons/nifi-file-utils/pom.xml b/commons/nifi-file-utils/pom.xml deleted file mode 100644 index 2af4d634b4..0000000000 --- a/commons/nifi-file-utils/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - org.apache.nifi - nifi-commons-parent - 0.0.1-SNAPSHOT - - - nifi-file-utils - 0.0.1-SNAPSHOT - jar - NiFi File Utils - - - - commons-codec - commons-codec - - - diff --git a/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java b/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java index 15208146a6..6fdc4c1819 100644 --- a/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java +++ b/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java @@ -374,20 +374,18 @@ public class NiFiProperties extends Properties { return getPropertyAsPort(REMOTE_INPUT_PORT, DEFAULT_REMOTE_INPUT_PORT); } + /** + * @return False if property value is 'false'; True otherwise. + */ public Boolean isSiteToSiteSecure() { - final String secureVal = getProperty(SITE_TO_SITE_SECURE); - if (secureVal == null) { - return null; - } + final String secureVal = getProperty(SITE_TO_SITE_SECURE, "true"); - if ("true".equalsIgnoreCase(secureVal)) { - return true; - } if ("false".equalsIgnoreCase(secureVal)) { return false; + }else{ + return true; } - throw new IllegalStateException("Property value for " + SITE_TO_SITE_SECURE + " is " + secureVal + "; expected 'true' or 'false'"); } /** diff --git a/commons/nifi-stream-utils/.gitignore b/commons/nifi-stream-utils/.gitignore deleted file mode 100755 index ea8c4bf7f3..0000000000 --- a/commons/nifi-stream-utils/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/commons/nifi-utils/pom.xml b/commons/nifi-utils/pom.xml index 6a6cee1c77..c5c2a68595 100644 --- a/commons/nifi-utils/pom.xml +++ b/commons/nifi-utils/pom.xml @@ -26,4 +26,8 @@ 0.0.1-SNAPSHOT jar NiFi Utils + diff --git a/commons/core-flowfile-attributes/src/main/java/org/apache/nifi/flowfile/attributes/CoreAttributes.java b/commons/nifi-utils/src/main/java/org/apache/nifi/flowfile/attributes/CoreAttributes.java similarity index 100% rename from commons/core-flowfile-attributes/src/main/java/org/apache/nifi/flowfile/attributes/CoreAttributes.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/flowfile/attributes/CoreAttributes.java diff --git a/commons/core-flowfile-attributes/src/main/java/org/apache/nifi/flowfile/attributes/FlowFileAttributeKey.java b/commons/nifi-utils/src/main/java/org/apache/nifi/flowfile/attributes/FlowFileAttributeKey.java similarity index 100% rename from commons/core-flowfile-attributes/src/main/java/org/apache/nifi/flowfile/attributes/FlowFileAttributeKey.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/flowfile/attributes/FlowFileAttributeKey.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/StandardVersionNegotiator.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/StandardVersionNegotiator.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/StandardVersionNegotiator.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/StandardVersionNegotiator.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/VersionNegotiator.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/VersionNegotiator.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/VersionNegotiator.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/VersionNegotiator.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/exception/TransmissionDisabledException.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/exception/TransmissionDisabledException.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/exception/TransmissionDisabledException.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/exception/TransmissionDisabledException.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/CompressionInputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/CompressionInputStream.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/CompressionInputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/CompressionInputStream.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/CompressionOutputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/CompressionOutputStream.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/CompressionOutputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/CompressionOutputStream.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/InterruptableInputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/InterruptableInputStream.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/InterruptableInputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/InterruptableInputStream.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/InterruptableOutputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/InterruptableOutputStream.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/InterruptableOutputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/InterruptableOutputStream.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/socket/BufferStateManager.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/BufferStateManager.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/socket/BufferStateManager.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/BufferStateManager.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelInputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelInputStream.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelInputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelInputStream.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelOutputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelOutputStream.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelOutputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelOutputStream.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelInputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelInputStream.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelInputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelInputStream.java diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelOutputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelOutputStream.java similarity index 100% rename from commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelOutputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelOutputStream.java diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/BufferedInputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/BufferedInputStream.java similarity index 97% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/BufferedInputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/BufferedInputStream.java index 57adb8c726..aaf37ea397 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/BufferedInputStream.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/BufferedInputStream.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.InputStream; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/BufferedOutputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/BufferedOutputStream.java similarity index 99% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/BufferedOutputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/BufferedOutputStream.java index 56caf655a8..eadfcab953 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/BufferedOutputStream.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/BufferedOutputStream.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.FilterOutputStream; import java.io.IOException; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteArrayInputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ByteArrayInputStream.java similarity index 99% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteArrayInputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ByteArrayInputStream.java index 9defab4281..284cd54837 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteArrayInputStream.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ByteArrayInputStream.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.InputStream; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteArrayOutputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ByteArrayOutputStream.java similarity index 99% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteArrayOutputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ByteArrayOutputStream.java index b504c235f5..459563b967 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteArrayOutputStream.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ByteArrayOutputStream.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.IOException; import java.io.OutputStream; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteCountingInputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ByteCountingInputStream.java similarity index 98% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteCountingInputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ByteCountingInputStream.java index 792cc32a10..8294af39f8 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteCountingInputStream.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ByteCountingInputStream.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.IOException; import java.io.InputStream; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteCountingOutputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ByteCountingOutputStream.java similarity index 98% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteCountingOutputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ByteCountingOutputStream.java index c7b77ffb59..d8e1a42254 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteCountingOutputStream.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ByteCountingOutputStream.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.IOException; import java.io.OutputStream; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/DataOutputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/DataOutputStream.java similarity index 99% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/DataOutputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/DataOutputStream.java index 6af06d3c87..1dd90f5ed3 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/DataOutputStream.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/DataOutputStream.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.DataOutput; import java.io.FilterOutputStream; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/GZIPOutputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/GZIPOutputStream.java similarity index 97% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/GZIPOutputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/GZIPOutputStream.java index 875b838209..2864bbb176 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/GZIPOutputStream.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/GZIPOutputStream.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.IOException; import java.io.OutputStream; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/LeakyBucketStreamThrottler.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/LeakyBucketStreamThrottler.java similarity index 99% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/LeakyBucketStreamThrottler.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/LeakyBucketStreamThrottler.java index 0ebe16dd62..bffbe261dd 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/LeakyBucketStreamThrottler.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/LeakyBucketStreamThrottler.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.IOException; import java.io.InputStream; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/NonCloseableInputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/NonCloseableInputStream.java similarity index 98% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/NonCloseableInputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/NonCloseableInputStream.java index 1fbb093fdd..0e75a22495 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/NonCloseableInputStream.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/NonCloseableInputStream.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.FilterInputStream; import java.io.IOException; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/NonCloseableOutputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/NonCloseableOutputStream.java similarity index 97% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/NonCloseableOutputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/NonCloseableOutputStream.java index 731e409aea..9c77637b23 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/NonCloseableOutputStream.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/NonCloseableOutputStream.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.FilterOutputStream; import java.io.IOException; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/NullOutputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/NullOutputStream.java similarity index 97% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/NullOutputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/NullOutputStream.java index 60475d457e..8452761c8a 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/NullOutputStream.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/NullOutputStream.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.IOException; import java.io.OutputStream; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/StreamThrottler.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/StreamThrottler.java similarity index 97% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/StreamThrottler.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/StreamThrottler.java index 8c2aa80047..9158050d03 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/StreamThrottler.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/StreamThrottler.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.Closeable; import java.io.IOException; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/StreamUtils.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/StreamUtils.java similarity index 98% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/StreamUtils.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/StreamUtils.java index 1596014291..8e3d606273 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/StreamUtils.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/StreamUtils.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.EOFException; import java.io.IOException; @@ -23,8 +23,8 @@ import java.io.OutputStream; import java.util.ArrayList; import java.util.List; -import org.apache.nifi.io.exception.BytePatternNotFoundException; -import org.apache.nifi.io.util.NonThreadSafeCircularBuffer; +import org.apache.nifi.stream.io.exception.BytePatternNotFoundException; +import org.apache.nifi.stream.io.util.NonThreadSafeCircularBuffer; public class StreamUtils { diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ZipOutputStream.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ZipOutputStream.java similarity index 97% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ZipOutputStream.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ZipOutputStream.java index f2857207bb..2b9050d888 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ZipOutputStream.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/ZipOutputStream.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; import java.io.OutputStream; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/exception/BytePatternNotFoundException.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/exception/BytePatternNotFoundException.java similarity index 95% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/exception/BytePatternNotFoundException.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/exception/BytePatternNotFoundException.java index 8935767d17..5d08616ab7 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/exception/BytePatternNotFoundException.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/exception/BytePatternNotFoundException.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io.exception; +package org.apache.nifi.stream.io.exception; import java.io.IOException; diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/util/NonThreadSafeCircularBuffer.java b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/util/NonThreadSafeCircularBuffer.java similarity index 98% rename from commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/util/NonThreadSafeCircularBuffer.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/util/NonThreadSafeCircularBuffer.java index 1b874889e6..b4b4c17ca2 100644 --- a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/util/NonThreadSafeCircularBuffer.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/util/NonThreadSafeCircularBuffer.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io.util; +package org.apache.nifi.stream.io.util; import java.util.Arrays; diff --git a/commons/naive-search-ring-buffer/src/main/java/org/apache/nifi/util/NaiveSearchRingBuffer.java b/commons/nifi-utils/src/main/java/org/apache/nifi/util/NaiveSearchRingBuffer.java similarity index 100% rename from commons/naive-search-ring-buffer/src/main/java/org/apache/nifi/util/NaiveSearchRingBuffer.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/util/NaiveSearchRingBuffer.java diff --git a/commons/nifi-file-utils/src/main/java/org/apache/nifi/file/FileUtils.java b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java similarity index 97% rename from commons/nifi-file-utils/src/main/java/org/apache/nifi/file/FileUtils.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java index 8920493a16..41a05576f6 100644 --- a/commons/nifi-file-utils/src/main/java/org/apache/nifi/file/FileUtils.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.file; +package org.apache.nifi.util.file; import java.io.BufferedInputStream; import java.io.Closeable; @@ -30,11 +30,12 @@ import java.nio.channels.FileChannel; import java.nio.channels.FileLock; import java.nio.file.Files; import java.nio.file.Path; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Random; -import org.apache.commons.codec.digest.DigestUtils; import org.slf4j.Logger; @@ -99,7 +100,7 @@ public class FileUtils { * * @param file * @param logger - * @return + * @return */ public static boolean deleteFile(final File file, final Logger logger) { return FileUtils.deleteFile(file, logger, 1); @@ -116,7 +117,7 @@ public class FileUtils { * @return true if given file no longer exists */ public static boolean deleteFile(final File file, final Logger logger, final int attempts) { - if(file == null){ + if (file == null) { return false; } boolean isGone = false; @@ -601,12 +602,22 @@ public class FileUtils { * @throws IOException if the MD5 hash could not be computed */ public static byte[] computeMd5Digest(final File file) throws IOException { - BufferedInputStream bis = null; + final MessageDigest digest; try { - bis = new BufferedInputStream(new FileInputStream(file)); - return DigestUtils.md5(bis); - } finally { - FileUtils.closeQuietly(bis); + digest = MessageDigest.getInstance("MD5"); + } catch (final NoSuchAlgorithmException nsae) { + throw new IOException(nsae); } + + try (final FileInputStream fis = new FileInputStream(file)) { + int len; + final byte[] buffer = new byte[8192]; + while ((len = fis.read(buffer)) > -1) { + if (len > 0) { + digest.update(buffer, 0, len); + } + } + } + return digest.digest(); } } diff --git a/commons/nifi-utils/src/main/java/org/apache/nifi/io/CompoundUpdateMonitor.java b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/CompoundUpdateMonitor.java similarity index 98% rename from commons/nifi-utils/src/main/java/org/apache/nifi/io/CompoundUpdateMonitor.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/CompoundUpdateMonitor.java index e22032bf6e..6f9c61664a 100644 --- a/commons/nifi-utils/src/main/java/org/apache/nifi/io/CompoundUpdateMonitor.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/CompoundUpdateMonitor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.util.file.monitor; import java.io.IOException; import java.nio.file.Path; diff --git a/commons/nifi-utils/src/main/java/org/apache/nifi/io/LastModifiedMonitor.java b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/LastModifiedMonitor.java similarity index 96% rename from commons/nifi-utils/src/main/java/org/apache/nifi/io/LastModifiedMonitor.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/LastModifiedMonitor.java index f4464652e9..e6be55827d 100644 --- a/commons/nifi-utils/src/main/java/org/apache/nifi/io/LastModifiedMonitor.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/LastModifiedMonitor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.util.file.monitor; import java.io.IOException; import java.nio.file.Files; diff --git a/commons/nifi-utils/src/main/java/org/apache/nifi/io/MD5SumMonitor.java b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/MD5SumMonitor.java similarity index 89% rename from commons/nifi-utils/src/main/java/org/apache/nifi/io/MD5SumMonitor.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/MD5SumMonitor.java index 1326c2aad5..8dea4bf46a 100644 --- a/commons/nifi-utils/src/main/java/org/apache/nifi/io/MD5SumMonitor.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/MD5SumMonitor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.util.file.monitor; import java.io.FileInputStream; import java.io.IOException; @@ -37,8 +37,10 @@ public class MD5SumMonitor implements UpdateMonitor { try (final FileInputStream fis = new FileInputStream(path.toFile())) { int len; final byte[] buffer = new byte[8192]; - while ((len = fis.read(buffer)) > 0) { - digest.update(buffer, 0, len); + while ((len = fis.read(buffer)) > -1) { + if (len > 0) { + digest.update(buffer, 0, len); + } } } diff --git a/commons/nifi-utils/src/main/java/org/apache/nifi/io/SynchronousFileWatcher.java b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/SynchronousFileWatcher.java similarity index 98% rename from commons/nifi-utils/src/main/java/org/apache/nifi/io/SynchronousFileWatcher.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/SynchronousFileWatcher.java index 785f1ace27..e0089c196b 100644 --- a/commons/nifi-utils/src/main/java/org/apache/nifi/io/SynchronousFileWatcher.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/SynchronousFileWatcher.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.util.file.monitor; import java.io.IOException; import java.nio.file.Path; diff --git a/commons/nifi-utils/src/main/java/org/apache/nifi/io/UpdateMonitor.java b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/UpdateMonitor.java similarity index 95% rename from commons/nifi-utils/src/main/java/org/apache/nifi/io/UpdateMonitor.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/UpdateMonitor.java index 33fb444242..20ed1dded1 100644 --- a/commons/nifi-utils/src/main/java/org/apache/nifi/io/UpdateMonitor.java +++ b/commons/nifi-utils/src/main/java/org/apache/nifi/util/file/monitor/UpdateMonitor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.util.file.monitor; import java.io.IOException; import java.nio.file.Path; diff --git a/commons/search-utils/src/main/java/org/apache/nifi/util/search/Search.java b/commons/nifi-utils/src/main/java/org/apache/nifi/util/search/Search.java similarity index 100% rename from commons/search-utils/src/main/java/org/apache/nifi/util/search/Search.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/util/search/Search.java diff --git a/commons/search-utils/src/main/java/org/apache/nifi/util/search/SearchTerm.java b/commons/nifi-utils/src/main/java/org/apache/nifi/util/search/SearchTerm.java similarity index 100% rename from commons/search-utils/src/main/java/org/apache/nifi/util/search/SearchTerm.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/util/search/SearchTerm.java diff --git a/commons/search-utils/src/main/java/org/apache/nifi/util/search/ahocorasick/AhoCorasick.java b/commons/nifi-utils/src/main/java/org/apache/nifi/util/search/ahocorasick/AhoCorasick.java similarity index 100% rename from commons/search-utils/src/main/java/org/apache/nifi/util/search/ahocorasick/AhoCorasick.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/util/search/ahocorasick/AhoCorasick.java diff --git a/commons/search-utils/src/main/java/org/apache/nifi/util/search/ahocorasick/Node.java b/commons/nifi-utils/src/main/java/org/apache/nifi/util/search/ahocorasick/Node.java similarity index 100% rename from commons/search-utils/src/main/java/org/apache/nifi/util/search/ahocorasick/Node.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/util/search/ahocorasick/Node.java diff --git a/commons/search-utils/src/main/java/org/apache/nifi/util/search/ahocorasick/SearchState.java b/commons/nifi-utils/src/main/java/org/apache/nifi/util/search/ahocorasick/SearchState.java similarity index 100% rename from commons/search-utils/src/main/java/org/apache/nifi/util/search/ahocorasick/SearchState.java rename to commons/nifi-utils/src/main/java/org/apache/nifi/util/search/ahocorasick/SearchState.java diff --git a/commons/remote-communications-utils/src/test/java/org/apache/nifi/remote/io/TestCompressionInputOutputStreams.java b/commons/nifi-utils/src/test/java/org/apache/nifi/remote/io/TestCompressionInputOutputStreams.java similarity index 100% rename from commons/remote-communications-utils/src/test/java/org/apache/nifi/remote/io/TestCompressionInputOutputStreams.java rename to commons/nifi-utils/src/test/java/org/apache/nifi/remote/io/TestCompressionInputOutputStreams.java diff --git a/commons/nifi-stream-utils/src/test/java/org/apache/nifi/io/TestLeakyBucketThrottler.java b/commons/nifi-utils/src/test/java/org/apache/nifi/stream/io/TestLeakyBucketThrottler.java similarity index 96% rename from commons/nifi-stream-utils/src/test/java/org/apache/nifi/io/TestLeakyBucketThrottler.java rename to commons/nifi-utils/src/test/java/org/apache/nifi/stream/io/TestLeakyBucketThrottler.java index 12e1801b25..52bd8dee49 100644 --- a/commons/nifi-stream-utils/src/test/java/org/apache/nifi/io/TestLeakyBucketThrottler.java +++ b/commons/nifi-utils/src/test/java/org/apache/nifi/stream/io/TestLeakyBucketThrottler.java @@ -14,8 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.io; +package org.apache.nifi.stream.io; +import org.apache.nifi.stream.io.ByteArrayInputStream; +import org.apache.nifi.stream.io.ByteArrayOutputStream; +import org.apache.nifi.stream.io.LeakyBucketStreamThrottler; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/commons/naive-search-ring-buffer/src/test/java/org/apache/nifi/util/TestNaiveSearchRingBuffer.java b/commons/nifi-utils/src/test/java/org/apache/nifi/util/TestNaiveSearchRingBuffer.java similarity index 100% rename from commons/naive-search-ring-buffer/src/test/java/org/apache/nifi/util/TestNaiveSearchRingBuffer.java rename to commons/nifi-utils/src/test/java/org/apache/nifi/util/TestNaiveSearchRingBuffer.java diff --git a/commons/nifi-utils/src/test/java/org/apache/nifi/util/timebuffer/TestCompoundUpdateMonitor.java b/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestCompoundUpdateMonitor.java similarity index 91% rename from commons/nifi-utils/src/test/java/org/apache/nifi/util/timebuffer/TestCompoundUpdateMonitor.java rename to commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestCompoundUpdateMonitor.java index c796a96935..f576e94b1e 100644 --- a/commons/nifi-utils/src/test/java/org/apache/nifi/util/timebuffer/TestCompoundUpdateMonitor.java +++ b/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestCompoundUpdateMonitor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.util.timebuffer; +package org.apache.nifi.util.file.monitor; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotSame; @@ -27,10 +27,6 @@ import java.io.OutputStream; import java.nio.file.Path; import java.util.UUID; -import org.apache.nifi.io.CompoundUpdateMonitor; -import org.apache.nifi.io.LastModifiedMonitor; -import org.apache.nifi.io.MD5SumMonitor; -import org.apache.nifi.io.UpdateMonitor; import org.junit.Test; diff --git a/commons/nifi-utils/src/test/java/org/apache/nifi/util/timebuffer/TestSynchronousFileWatcher.java b/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestSynchronousFileWatcher.java similarity index 92% rename from commons/nifi-utils/src/test/java/org/apache/nifi/util/timebuffer/TestSynchronousFileWatcher.java rename to commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestSynchronousFileWatcher.java index 4b2c0d587b..7125581b5e 100644 --- a/commons/nifi-utils/src/test/java/org/apache/nifi/util/timebuffer/TestSynchronousFileWatcher.java +++ b/commons/nifi-utils/src/test/java/org/apache/nifi/util/file/monitor/TestSynchronousFileWatcher.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.nifi.util.timebuffer; +package org.apache.nifi.util.file.monitor; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -30,9 +30,6 @@ import java.nio.file.StandardCopyOption; import org.junit.Test; -import org.apache.nifi.io.MD5SumMonitor; -import org.apache.nifi.io.SynchronousFileWatcher; -import org.apache.nifi.io.UpdateMonitor; public class TestSynchronousFileWatcher { diff --git a/commons/nifi-stream-utils/src/test/resources/logback-test.xml b/commons/nifi-utils/src/test/resources/logback-test.xml similarity index 65% rename from commons/nifi-stream-utils/src/test/resources/logback-test.xml rename to commons/nifi-utils/src/test/resources/logback-test.xml index 0f3f60c309..8651d47d8c 100644 --- a/commons/nifi-stream-utils/src/test/resources/logback-test.xml +++ b/commons/nifi-utils/src/test/resources/logback-test.xml @@ -24,25 +24,9 @@ - - - - - - - - - - - - - - + diff --git a/commons/pom.xml b/commons/pom.xml index fc7a1c3ee7..19a7ae0b27 100644 --- a/commons/pom.xml +++ b/commons/pom.xml @@ -29,22 +29,16 @@ NiFi :: Commons Parent - core-flowfile-attributes data-provenance-utils flowfile-packager - naive-search-ring-buffer nifi-expression-language - nifi-file-utils nifi-logging-utils nifi-properties nifi-security-utils nifi-socket-utils - nifi-stream-utils nifi-utils nifi-web-utils processor-utilities - remote-communications-utils - search-utils wali diff --git a/commons/remote-communications-utils/pom.xml b/commons/remote-communications-utils/pom.xml deleted file mode 100644 index 4eb0133d23..0000000000 --- a/commons/remote-communications-utils/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - 4.0.0 - - - org.apache.nifi - nifi-commons-parent - 0.0.1-SNAPSHOT - - - remote-communications-utils - 0.0.1-SNAPSHOT - jar - - remote-communications-utils - diff --git a/commons/search-utils/pom.xml b/commons/search-utils/pom.xml deleted file mode 100644 index 7caacc8a27..0000000000 --- a/commons/search-utils/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - 4.0.0 - - - org.apache.nifi - nifi-commons-parent - 0.0.1-SNAPSHOT - - - nifi-search-utils - 0.0.1-SNAPSHOT - jar - - search-utils - - diff --git a/commons/wali/pom.xml b/commons/wali/pom.xml index 5a06a3f881..347c8ccef3 100644 --- a/commons/wali/pom.xml +++ b/commons/wali/pom.xml @@ -35,7 +35,7 @@ org.apache.nifi - nifi-stream-utils + nifi-utils diff --git a/commons/wali/src/main/java/org/wali/MinimalLockingWriteAheadLog.java b/commons/wali/src/main/java/org/wali/MinimalLockingWriteAheadLog.java index 95cf4da06c..19208d393a 100644 --- a/commons/wali/src/main/java/org/wali/MinimalLockingWriteAheadLog.java +++ b/commons/wali/src/main/java/org/wali/MinimalLockingWriteAheadLog.java @@ -58,8 +58,8 @@ import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.regex.Pattern; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/UserService.java b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/UserService.java index 76e54d6ee1..86256fd408 100644 --- a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/UserService.java +++ b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/UserService.java @@ -17,8 +17,11 @@ package org.apache.nifi.admin.service; import java.util.Collection; +import java.util.List; +import java.util.Map; import java.util.Set; import org.apache.nifi.authorization.Authority; +import org.apache.nifi.authorization.DownloadAuthorization; import org.apache.nifi.user.NiFiUser; import org.apache.nifi.user.NiFiUserGroup; @@ -43,6 +46,16 @@ public interface UserService { */ Boolean hasPendingUserAccount(); + /** + * Determines if the users in the dnChain are authorized to download content + * with the specified attributes. + * + * @param dnChain + * @param attributes + * @return + */ + DownloadAuthorization authorizeDownload(List dnChain, Map attributes); + /** * Updates a user group using the specified group comprised of the specified * users. Returns all the users that are currently in the specified group. diff --git a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/AuthorizeDownloadAction.java b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/AuthorizeDownloadAction.java new file mode 100644 index 0000000000..d1b994c366 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/AuthorizeDownloadAction.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.admin.service.action; + +import java.util.List; +import java.util.Map; +import org.apache.nifi.admin.dao.DAOFactory; +import org.apache.nifi.admin.service.AccountNotFoundException; +import org.apache.nifi.admin.service.AdministrationException; +import org.apache.nifi.authorization.AuthorityProvider; +import org.apache.nifi.authorization.DownloadAuthorization; +import org.apache.nifi.authorization.exception.AuthorityAccessException; +import org.apache.nifi.authorization.exception.UnknownIdentityException; + +/** + * Attempts to obtain authorization to download the content with the specified + * attributes for the specified user. + */ +public class AuthorizeDownloadAction implements AdministrationAction { + + private final List dnChain; + private final Map attributes; + + public AuthorizeDownloadAction(List dnChain, Map attributes) { + this.dnChain = dnChain; + this.attributes = attributes; + } + + @Override + public DownloadAuthorization execute(DAOFactory daoFactory, AuthorityProvider authorityProvider) { + try { + return authorityProvider.authorizeDownload(dnChain, attributes); + } catch (UnknownIdentityException uie) { + throw new AccountNotFoundException(uie.getMessage(), uie); + } catch (AuthorityAccessException aae) { + throw new AdministrationException(aae.getMessage(), aae); + } + } + +} diff --git a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/impl/StandardUserService.java b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/impl/StandardUserService.java index 63aa93bafb..5c9af4b721 100644 --- a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/impl/StandardUserService.java +++ b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/impl/StandardUserService.java @@ -18,6 +18,8 @@ package org.apache.nifi.admin.service.impl; import java.io.IOException; import java.util.Collection; +import java.util.List; +import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReentrantReadWriteLock; @@ -27,6 +29,7 @@ import org.apache.nifi.admin.service.AccountDisabledException; import org.apache.nifi.admin.service.AccountPendingException; import org.apache.nifi.admin.service.AdministrationException; import org.apache.nifi.admin.service.UserService; +import org.apache.nifi.admin.service.action.AuthorizeDownloadAction; import org.apache.nifi.admin.service.action.AuthorizeUserAction; import org.apache.nifi.admin.service.action.DeleteUserAction; import org.apache.nifi.admin.service.action.DisableUserAction; @@ -48,6 +51,7 @@ import org.apache.nifi.admin.service.transaction.Transaction; import org.apache.nifi.admin.service.transaction.TransactionBuilder; import org.apache.nifi.admin.service.transaction.TransactionException; import org.apache.nifi.authorization.Authority; +import org.apache.nifi.authorization.DownloadAuthorization; import org.apache.nifi.user.NiFiUser; import org.apache.nifi.user.NiFiUserGroup; import org.apache.nifi.util.FormatUtils; @@ -440,7 +444,7 @@ public class StandardUserService implements UserService { * modifying a user account. This method should only be invoked from within * a write lock. * - * @param id + * @param group */ @Override public void invalidateUserGroupAccount(String group) { @@ -500,6 +504,36 @@ public class StandardUserService implements UserService { } } + @Override + public DownloadAuthorization authorizeDownload(final List dnChain, final Map attributes) { + Transaction transaction = null; + + readLock.lock(); + try { + // start the transaction + transaction = transactionBuilder.start(); + + // authorize the download + AuthorizeDownloadAction authorizeDownload = new AuthorizeDownloadAction(dnChain, attributes); + DownloadAuthorization downloadAuthorization = transaction.execute(authorizeDownload); + + // commit the transaction + transaction.commit(); + + // return the authorization + return downloadAuthorization; + } catch (TransactionException | DataAccessException te) { + rollback(transaction); + throw new AdministrationException(te); + } catch (Throwable t) { + rollback(transaction); + throw t; + } finally { + closeQuietly(transaction); + readLock.unlock(); + } + } + @Override public Collection getUsers() { Transaction transaction = null; diff --git a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/authorization/AuthorityProviderFactoryBean.java b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/authorization/AuthorityProviderFactoryBean.java index b05d32fa9c..31a01be82f 100644 --- a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/authorization/AuthorityProviderFactoryBean.java +++ b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/authorization/AuthorityProviderFactoryBean.java @@ -24,6 +24,7 @@ import java.lang.reflect.Method; import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Set; import javax.xml.XMLConstants; @@ -365,6 +366,11 @@ public class AuthorityProviderFactoryBean implements FactoryBean, ApplicationCon public void ungroup(String group) throws AuthorityAccessException { } + @Override + public DownloadAuthorization authorizeDownload(List dnChain, Map attributes) throws UnknownIdentityException, AuthorityAccessException { + return DownloadAuthorization.approved(); + } + @Override public void initialize(AuthorityProviderInitializationContext initializationContext) throws ProviderCreationException { } @@ -465,6 +471,13 @@ public class AuthorityProviderFactoryBean implements FactoryBean, ApplicationCon } } + @Override + public DownloadAuthorization authorizeDownload(List dnChain, Map attributes) throws UnknownIdentityException, AuthorityAccessException { + try (final NarCloseable narCloseable = NarCloseable.withNarLoader()) { + return baseProvider.authorizeDownload(dnChain, attributes); + } + } + @Override public void initialize(AuthorityProviderInitializationContext initializationContext) throws ProviderCreationException { try (final NarCloseable narCloseable = NarCloseable.withNarLoader()) { diff --git a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/user/NiFiUser.java b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/user/NiFiUser.java index 984a572459..415160af4b 100644 --- a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/user/NiFiUser.java +++ b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/user/NiFiUser.java @@ -43,6 +43,8 @@ public class NiFiUser implements Serializable { private AccountStatus status; private EnumSet authorities; + + private NiFiUser chain; /* getters / setters */ public Date getCreation() { @@ -117,6 +119,14 @@ public class NiFiUser implements Serializable { this.lastAccessed = lastAccessed; } + public NiFiUser getChain() { + return chain; + } + + public void setChain(NiFiUser chain) { + this.chain = chain; + } + public Set getAuthorities() { if (authorities == null) { authorities = EnumSet.noneOf(Authority.class); diff --git a/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/impl/NiFiAuthorizationServiceTest.java b/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/impl/NiFiAuthorizationServiceTest.java deleted file mode 100644 index 5c8b75ac73..0000000000 --- a/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/impl/NiFiAuthorizationServiceTest.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.nifi.admin.service.impl; - -import org.junit.Ignore; - -/** - * - */ -@Ignore -public class NiFiAuthorizationServiceTest { - -// private static final String UNKNOWN_USER_IN_CACHE_DN = "unknown-user-in-cache-dn"; -// private static final String PENDING_USER_DN = "pending-user-dn"; -// private static final String DISABLED_USER_DN = "disabled-user-dn"; -// private static final String UNKNOWN_USER_IN_IDENTITY_PROVIDER_DN = "unknown-user-in-identity-provider-dn"; -// private static final String ACCESS_EXCEPTION_IN_IDENTITY_PROVIDER_DN = "access-exception-in-identity-provider-dn"; -// private static final String UNABLE_TO_UPDATE_CACHE_DN = "unable-to-update-cache-dn"; -// private static final String VERIFICATION_REQUIRED_DN = "verification-required-dn"; -// private static final String VERIFICATION_NOT_REQUIRED_DN = "verification-not-required-dn"; -// private static final String NEW_USER_DN = "new-user-dn"; -// -// private UserService userService; -// private AuthorityProvider authorityProvider; -// private UserDAO userDAO; -// -// @Before -// public void setup() throws Exception { -// // mock the web security properties -// NiFiProperties properties = Mockito.mock(NiFiProperties.class); -// Mockito.when(properties.getSupportNewAccountRequests()).thenReturn(Boolean.TRUE); -// Mockito.when(properties.getUserCredentialCacheDurationSeconds()).thenReturn(60); -// -// // mock the authority provider -// -// // mock the admin service -// userDAO = Mockito.mock(UserDAO.class); -// Mockito.doAnswer(new Answer() { -// -// @Override -// public Object answer(InvocationOnMock invocation) throws Throwable { -// Object[] args = invocation.getArguments(); -// String dn = (String) args[0]; -// -// NiFiUser user = null; -// switch (dn) { -// case PENDING_USER_DN: -// user = new NiFiUser(); -// user.setDn(dn); -// user.setStatus(AccountStatus.PENDING); -// break; -// case DISABLED_USER_DN: -// user = new NiFiUser(); -// user.setDn(dn); -// user.setStatus(AccountStatus.DISABLED); -// break; -// case UNKNOWN_USER_IN_IDENTITY_PROVIDER_DN: -// case UNABLE_TO_UPDATE_CACHE_DN: -// case ACCESS_EXCEPTION_IN_IDENTITY_PROVIDER_DN: -// user = new NiFiUser(); -// user.setDn(dn); -// user.setStatus(AccountStatus.ACTIVE); -// break; -// case VERIFICATION_REQUIRED_DN: { -// Calendar calendar = Calendar.getInstance(); -// calendar.add(Calendar.SECOND, -65); -// user = new NiFiUser(); -// user.setDn(dn); -// user.setStatus(AccountStatus.ACTIVE); -// user.setLastVerified(calendar.getTime()); -// user.getAuthorities().addAll(EnumSet.of(Authority.ROLE_ADMIN, Authority.ROLE_DFM)); -// break; -// } -// case VERIFICATION_NOT_REQUIRED_DN: { -// Calendar calendar = Calendar.getInstance(); -// calendar.add(Calendar.SECOND, -5); -// user = new NiFiUser(); -// user.setDn(dn); -// user.setStatus(AccountStatus.ACTIVE); -// user.setLastVerified(calendar.getTime()); -// user.getAuthorities().addAll(EnumSet.of(Authority.ROLE_ADMIN, Authority.ROLE_DFM)); -// break; -// } -// } -// return user; -// } -// }).when(userDAO).getUser(Mockito.anyString()); -// Mockito.doAnswer(new Answer() { -// -// @Override -// public Object answer(InvocationOnMock invocation) throws Throwable { -// Object[] args = invocation.getArguments(); -// NiFiUser user = (NiFiUser) args[0]; -// -// if (UNABLE_TO_UPDATE_CACHE_DN.equals(user.getDn())) { -// throw new AdministrationException(); -// } -// return user; -// } -// }).when(userDAO).updateUser(Mockito.any(NiFiUser.class)); -// Mockito.doNothing().when(userDAO).createUser(Mockito.any(NiFiUser.class)); -// -// // mock the authority provider -// authorityProvider = Mockito.mock(AuthorityProvider.class); -// Mockito.doAnswer(new Answer() { -// -// @Override -// public Object answer(InvocationOnMock invocation) throws Throwable { -// Object[] args = invocation.getArguments(); -// String dn = (String) args[0]; -// -// boolean hasDn = false; -// if (VERIFICATION_REQUIRED_DN.equals(dn) || NEW_USER_DN.equals(dn)) { -// hasDn = true; -// } -// return hasDn; -// } -// }).when(authorityProvider).doesDnExist(Mockito.anyString()); -// Mockito.doAnswer(new Answer() { -// -// @Override -// public Object answer(InvocationOnMock invocation) throws Throwable { -// Object[] args = invocation.getArguments(); -// String dn = (String) args[0]; -// -// Set authorities = null; -// switch (dn) { -// case VERIFICATION_REQUIRED_DN: -// case NEW_USER_DN: -// authorities = new HashSet<>(); -// authorities.add("ROLE_MONITOR"); -// break; -// case DISABLED_USER_DN: -// throw new UnknownIdentityException("Unable to find user"); -// } -// return authorities; -// } -// }).when(authorityProvider).getAuthorities(Mockito.anyString()); -// -// // create an instance of the authorization service -// userService = new UserServiceImpl(); -// ((UserServiceImpl) userService).setAuthorityProvider(authorityProvider); -// ((UserServiceImpl) userService).set(authorityProvider); -// -//// authorizationService.setIdentityProvider(identityProvider); -//// authorizationService.setAuthorityProvider(authorityProvider); -//// authorizationService.setProperties(properties); -// } -// -// /** -// * Ensures the authorization service correctly handles users who are -// * unknown. -// * -// * @throws Exception -// */ -// @Test(expected = org.springframework.security.core.userdetails.UsernameNotFoundException.class) -// public void testUnknownUserInCache() throws Exception { -// authorizationService.loadUserByUsername(WebUtils.formatProxyDn(UNKNOWN_USER_IN_CACHE_DN)); -// } -// -// /** -// * Ensures the authorization service correctly handles users whose accounts -// * are PENDING. -// * -// * @throws Exception -// */ -// @Test(expected = nifi.admin.service.AccountPendingException.class) -// public void testPendingUser() throws Exception { -// authorizationService.loadUserByUsername(WebUtils.formatProxyDn(PENDING_USER_DN)); -// } -// -// /** -// * Ensures the authorization service correctly handles users whose accounts -// * are DISABLED. -// * -// * @throws Exception -// */ -// @Test(expected = org.springframework.security.authentication.DisabledException.class) -// public void testDisabledUser() throws Exception { -// authorizationService.loadUserByUsername(WebUtils.formatProxyDn(DISABLED_USER_DN)); -// } -// -// /** -// * Ensures the authorization service correctly handles users whose are in -// * the cache but have been removed from the identity provider. -// * -// * @throws Exception -// */ -// @Test(expected = org.springframework.security.authentication.DisabledException.class) -// public void testUnknownUserInIdentityProvider() throws Exception { -// authorizationService.loadUserByUsername(WebUtils.formatProxyDn(UNKNOWN_USER_IN_IDENTITY_PROVIDER_DN)); -// } -// -// /** -// * Ensures the authorization service correctly handles cases when the cache -// * is unable to be updated. -// * -// * @throws Exception -// */ -// @Test(expected = org.springframework.security.authentication.AuthenticationServiceException.class) -// public void testUnableToUpdateCache() throws Exception { -// authorizationService.loadUserByUsername(WebUtils.formatProxyDn(UNABLE_TO_UPDATE_CACHE_DN)); -// } -// -// /** -// * Ensures the authorization service correctly handles cases when the -// * identity provider has an access exception. -// * -// * @throws Exception -// */ -// @Test(expected = org.springframework.security.authentication.AuthenticationServiceException.class) -// public void testUnableToAccessIdentity() throws Exception { -// authorizationService.loadUserByUsername(WebUtils.formatProxyDn(ACCESS_EXCEPTION_IN_IDENTITY_PROVIDER_DN)); -// } -// -// /** -// * Ensures that user authorities are properly loaded from the authority -// * provider. -// * -// * @throws Exception -// */ -// @Test -// public void testVerificationRequiredUser() throws Exception { -// NiFiUserDetails userDetails = (NiFiUserDetails) authorizationService.loadUserByUsername(WebUtils.formatProxyDn(VERIFICATION_REQUIRED_DN)); -// NiFiUser user = userDetails.getNiFiUser(); -// Mockito.verify(authorityProvider).getAuthorities(VERIFICATION_REQUIRED_DN); -// -// // ensure the user details -// Assert.assertEquals(VERIFICATION_REQUIRED_DN, user.getDn()); -// Assert.assertEquals(1, user.getAuthorities().size()); -// Assert.assertTrue(user.getAuthorities().contains(Authority.ROLE_MONITOR)); -// } -// -// /** -// * Ensures that user authorities are not loaded when the cache is still -// * valid. -// * -// * @throws Exception -// */ -// @Test -// public void testVerificationNotRequiredUser() throws Exception { -// NiFiUserDetails userDetails = (NiFiUserDetails) authorizationService.loadUserByUsername(WebUtils.formatProxyDn(VERIFICATION_NOT_REQUIRED_DN)); -// NiFiUser user = userDetails.getNiFiUser(); -// Mockito.verify(authorityProvider, Mockito.never()).getAuthorities(VERIFICATION_NOT_REQUIRED_DN); -// -// // ensure the user details -// Assert.assertEquals(VERIFICATION_NOT_REQUIRED_DN, user.getDn()); -// Assert.assertEquals(2, user.getAuthorities().size()); -// Assert.assertTrue(user.getAuthorities().contains(Authority.ROLE_ADMIN)); -// Assert.assertTrue(user.getAuthorities().contains(Authority.ROLE_DFM)); -// } -// -// /** -// * Ensures that new users are automatically created when the authority -// * provider has their authorities. -// * -// * @throws Exception -// */ -// @Test -// public void testNewUser() throws Exception { -// NiFiUserDetails userDetails = (NiFiUserDetails) authorizationService.loadUserByUsername(WebUtils.formatProxyDn(NEW_USER_DN)); -// NiFiUser user = userDetails.getNiFiUser(); -// Mockito.verify(authorityProvider).getAuthorities(NEW_USER_DN); -// -// // ensure the user details -// Assert.assertEquals(NEW_USER_DN, user.getDn()); -// Assert.assertEquals(1, user.getAuthorities().size()); -// Assert.assertTrue(user.getAuthorities().contains(Authority.ROLE_MONITOR)); -// } -} diff --git a/nar-bundles/framework-bundle/framework/client-dto/pom.xml b/nar-bundles/framework-bundle/framework/client-dto/pom.xml index 4b210da0ba..924e83a74e 100644 --- a/nar-bundles/framework-bundle/framework/client-dto/pom.xml +++ b/nar-bundles/framework-bundle/framework/client-dto/pom.xml @@ -35,9 +35,8 @@ attach-sources - verify - jar + jar-no-fork diff --git a/nar-bundles/framework-bundle/framework/cluster-authorization-provider/src/main/java/org/apache/nifi/cluster/authorization/NodeAuthorizationProvider.java b/nar-bundles/framework-bundle/framework/cluster-authorization-provider/src/main/java/org/apache/nifi/cluster/authorization/NodeAuthorizationProvider.java index c81e9d0f4a..840422ff54 100644 --- a/nar-bundles/framework-bundle/framework/cluster-authorization-provider/src/main/java/org/apache/nifi/cluster/authorization/NodeAuthorizationProvider.java +++ b/nar-bundles/framework-bundle/framework/cluster-authorization-provider/src/main/java/org/apache/nifi/cluster/authorization/NodeAuthorizationProvider.java @@ -22,12 +22,15 @@ import org.apache.nifi.cluster.authorization.protocol.message.ProtocolMessage; import java.io.IOException; import java.net.InetSocketAddress; import java.net.Socket; +import java.util.List; +import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; import org.apache.nifi.authorization.Authority; import org.apache.nifi.authorization.AuthorityProvider; import org.apache.nifi.authorization.AuthorityProviderConfigurationContext; import org.apache.nifi.authorization.AuthorityProviderInitializationContext; +import org.apache.nifi.authorization.DownloadAuthorization; import org.apache.nifi.authorization.annotation.AuthorityProviderContext; import org.apache.nifi.authorization.exception.AuthorityAccessException; import org.apache.nifi.authorization.exception.IdentityAlreadyExistsException; @@ -282,6 +285,11 @@ public class NodeAuthorizationProvider implements AuthorityProvider, Application throw new AuthorityAccessException("Nodes are not allowed to ungroup."); } + @Override + public DownloadAuthorization authorizeDownload(List dnChain, Map attributes) throws UnknownIdentityException, AuthorityAccessException { + return DownloadAuthorization.approved(); + } + @Override public String getGroupForUser(String dn) throws UnknownIdentityException, AuthorityAccessException { // create message diff --git a/nar-bundles/framework-bundle/framework/cluster/pom.xml b/nar-bundles/framework-bundle/framework/cluster/pom.xml index 78f4527e0e..67128020c3 100644 --- a/nar-bundles/framework-bundle/framework/cluster/pom.xml +++ b/nar-bundles/framework-bundle/framework/cluster/pom.xml @@ -42,7 +42,7 @@ org.apache.nifi - nifi-file-utils + nifi-utils org.apache.nifi diff --git a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/firewall/impl/FileBasedClusterNodeFirewall.java b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/firewall/impl/FileBasedClusterNodeFirewall.java index bcee661b0c..916ec14655 100644 --- a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/firewall/impl/FileBasedClusterNodeFirewall.java +++ b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/firewall/impl/FileBasedClusterNodeFirewall.java @@ -22,7 +22,7 @@ import java.net.UnknownHostException; import java.util.*; import org.apache.commons.net.util.SubnetUtils; import org.apache.nifi.cluster.firewall.ClusterNodeFirewall; -import org.apache.nifi.file.FileUtils; +import org.apache.nifi.util.file.FileUtils; import org.apache.nifi.logging.NiFiLog; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java index 702f081f2d..b7b142b488 100644 --- a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java +++ b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/flow/impl/DataFlowDaoImpl.java @@ -48,11 +48,11 @@ import org.apache.nifi.cluster.protocol.DataFlow; import org.apache.nifi.cluster.protocol.NodeIdentifier; import org.apache.nifi.cluster.protocol.StandardDataFlow; import org.apache.nifi.cluster.protocol.jaxb.message.NodeIdentifierAdapter; -import org.apache.nifi.file.FileUtils; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.ByteArrayInputStream; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.util.file.FileUtils; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.ByteArrayInputStream; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.NiFiLog; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; diff --git a/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/firewall/impl/FileBasedClusterNodeFirewallTest.java b/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/firewall/impl/FileBasedClusterNodeFirewallTest.java index 2fcf7ef184..e5db7cac69 100644 --- a/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/firewall/impl/FileBasedClusterNodeFirewallTest.java +++ b/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/firewall/impl/FileBasedClusterNodeFirewallTest.java @@ -16,10 +16,9 @@ */ package org.apache.nifi.cluster.firewall.impl; -import org.apache.nifi.cluster.firewall.impl.FileBasedClusterNodeFirewall; import java.io.File; import java.io.IOException; -import org.apache.nifi.file.FileUtils; +import org.apache.nifi.util.file.FileUtils; import org.junit.After; import org.junit.Before; import static org.junit.Assert.*; diff --git a/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/flow/impl/DataFlowManagementServiceImplTest.java b/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/flow/impl/DataFlowManagementServiceImplTest.java index 6294dfc0da..f9ba016e3a 100644 --- a/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/flow/impl/DataFlowManagementServiceImplTest.java +++ b/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/flow/impl/DataFlowManagementServiceImplTest.java @@ -74,8 +74,8 @@ public class DataFlowManagementServiceImplTest { @Before public void setup() throws IOException { - primaryLocation = new File(System.getProperty("java.io.tmpdir") + "/primary"); - restoreLocation = new File(System.getProperty("java.io.tmpdir") + "/restore"); + primaryLocation = new File(System.getProperty("java.io.tmpdir") + "/primary" + this.getClass().getSimpleName()); + restoreLocation = new File(System.getProperty("java.io.tmpdir") + "/restore" + this.getClass().getSimpleName()); FileUtils.deleteDirectory(primaryLocation); FileUtils.deleteDirectory(restoreLocation); @@ -114,6 +114,8 @@ public class DataFlowManagementServiceImplTest { ex.printStackTrace(System.out); } } + FileUtils.deleteDirectory(primaryLocation); + FileUtils.deleteDirectory(restoreLocation); } diff --git a/nar-bundles/framework-bundle/framework/core-api/pom.xml b/nar-bundles/framework-bundle/framework/core-api/pom.xml index b163cd0396..63645f358c 100644 --- a/nar-bundles/framework-bundle/framework/core-api/pom.xml +++ b/nar-bundles/framework-bundle/framework/core-api/pom.xml @@ -30,7 +30,7 @@ org.apache.nifi - remote-communications-utils + nifi-utils org.apache.nifi @@ -48,10 +48,6 @@ org.apache.commons commons-lang3 - - org.apache.nifi - nifi-utils - org.quartz-scheduler quartz diff --git a/nar-bundles/framework-bundle/framework/core/pom.xml b/nar-bundles/framework-bundle/framework/core/pom.xml index 1836d32fdb..47b52ea1d5 100644 --- a/nar-bundles/framework-bundle/framework/core/pom.xml +++ b/nar-bundles/framework-bundle/framework/core/pom.xml @@ -40,10 +40,6 @@ org.apache.nifi nifi-utils - - org.apache.nifi - nifi-file-utils - org.apache.nifi nifi-properties @@ -52,10 +48,6 @@ org.apache.nifi site-to-site - - org.apache.nifi - nifi-core-flowfile-attributes - ch.qos.logback logback-classic diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java index ad95f8ec6f..4b8d43b66a 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java @@ -62,7 +62,7 @@ import org.apache.nifi.controller.repository.claim.ContentClaim; import org.apache.nifi.controller.repository.claim.ContentClaimManager; import org.apache.nifi.engine.FlowEngine; import org.apache.nifi.events.EventReporter; -import org.apache.nifi.io.BufferedOutputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; import org.apache.nifi.processor.QueueSize; import org.apache.nifi.reporting.Severity; import org.apache.nifi.util.FormatUtils; diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java index 545017abb1..bb98418fac 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java @@ -125,7 +125,7 @@ import org.apache.nifi.groups.ProcessGroup; import org.apache.nifi.groups.RemoteProcessGroup; import org.apache.nifi.groups.RemoteProcessGroupPortDescriptor; import org.apache.nifi.groups.StandardProcessGroup; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.LogLevel; import org.apache.nifi.logging.LogRepository; import org.apache.nifi.logging.LogRepositoryFactory; @@ -447,10 +447,11 @@ public class FlowController implements EventAccess, ControllerServiceProvider, H rootGroup.setName(DEFAULT_ROOT_GROUP_NAME); instanceId = UUID.randomUUID().toString(); - if (Boolean.TRUE.equals(isSiteToSiteSecure) && sslContext == null) { - LOG.error("Unable to create Secure Site-to-Site Listener because not all required Keystore/Truststore Properties are set. Site-to-Site functionality will be disabled until this problem is has been fixed."); + if (remoteInputSocketPort == null){ + LOG.info("Not enabling Site-to-Site functionality because nifi.remote.input.socket.port is not set"); externalSiteListener = null; - } else if (remoteInputSocketPort == null) { + } else if (isSiteToSiteSecure && sslContext == null) { + LOG.error("Unable to create Secure Site-to-Site Listener because not all required Keystore/Truststore Properties are set. Site-to-Site functionality will be disabled until this problem is has been fixed."); externalSiteListener = null; } else { // Register the SocketFlowFileServerProtocol as the appropriate resource for site-to-site Server Protocol diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowUnmarshaller.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowUnmarshaller.java index fa33b49f4c..42d7f1c15c 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowUnmarshaller.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowUnmarshaller.java @@ -26,7 +26,7 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.apache.nifi.encrypt.StringEncryptor; -import org.apache.nifi.io.ByteArrayInputStream; +import org.apache.nifi.stream.io.ByteArrayInputStream; import org.apache.nifi.web.api.dto.FlowSnippetDTO; import org.apache.nifi.web.api.dto.ProcessGroupDTO; diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/SnippetManager.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/SnippetManager.java index 415472f6c3..3a9662edad 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/SnippetManager.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/SnippetManager.java @@ -25,10 +25,10 @@ import java.util.List; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import org.apache.nifi.io.ByteArrayInputStream; -import org.apache.nifi.io.ByteArrayOutputStream; -import org.apache.nifi.io.DataOutputStream; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.ByteArrayInputStream; +import org.apache.nifi.stream.io.ByteArrayOutputStream; +import org.apache.nifi.stream.io.DataOutputStream; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.persistence.StandardSnippetDeserializer; import org.apache.nifi.persistence.StandardSnippetSerializer; diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowService.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowService.java index 144373733a..d459b0047c 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowService.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowService.java @@ -59,7 +59,7 @@ import org.apache.nifi.cluster.protocol.message.ReconnectionRequestMessage; import org.apache.nifi.cluster.protocol.message.ReconnectionResponseMessage; import org.apache.nifi.engine.FlowEngine; import org.apache.nifi.events.BulletinFactory; -import org.apache.nifi.file.FileUtils; +import org.apache.nifi.util.file.FileUtils; import org.apache.nifi.groups.ProcessGroup; import org.apache.nifi.lifecycle.LifeCycleStartException; import org.apache.nifi.logging.LogLevel; diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java index 17a1702c6d..ffea644ca2 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java @@ -52,7 +52,7 @@ import org.apache.nifi.connectable.Size; import org.apache.nifi.controller.exception.ProcessorInstantiationException; import org.apache.nifi.controller.label.Label; import org.apache.nifi.events.BulletinFactory; -import org.apache.nifi.file.FileUtils; +import org.apache.nifi.util.file.FileUtils; import org.apache.nifi.fingerprint.FingerprintException; import org.apache.nifi.fingerprint.FingerprintFactory; import org.apache.nifi.flowfile.FlowFilePrioritizer; diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/TemplateManager.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/TemplateManager.java index 68acc2f14c..aa095d132d 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/TemplateManager.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/TemplateManager.java @@ -42,10 +42,10 @@ import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; -import org.apache.nifi.io.ByteArrayInputStream; -import org.apache.nifi.io.ByteArrayOutputStream; -import org.apache.nifi.io.DataOutputStream; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.ByteArrayInputStream; +import org.apache.nifi.stream.io.ByteArrayOutputStream; +import org.apache.nifi.stream.io.DataOutputStream; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.persistence.TemplateDeserializer; import org.apache.nifi.persistence.TemplateSerializer; import org.apache.nifi.web.api.dto.ConnectableDTO; diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java index 5fbbfd5533..a3e24c4bd6 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java @@ -65,8 +65,8 @@ import org.apache.nifi.controller.repository.claim.ContentClaim; import org.apache.nifi.controller.repository.claim.ContentClaimManager; import org.apache.nifi.controller.repository.io.SyncOnCloseOutputStream; import org.apache.nifi.engine.FlowEngine; -import org.apache.nifi.file.FileUtils; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.util.file.FileUtils; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.util.FormatUtils; import org.apache.nifi.util.LongHolder; import org.apache.nifi.util.NiFiProperties; diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java index 60dcdb3f75..3d3e854a28 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java @@ -53,9 +53,9 @@ import org.apache.nifi.controller.repository.io.LimitedInputStream; import org.apache.nifi.controller.repository.io.LongHolder; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.NonCloseableInputStream; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.NonCloseableInputStream; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.processor.DataUnit; import org.apache.nifi.processor.FlowFileFilter; import org.apache.nifi.processor.ProcessSession; diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/VolatileContentRepository.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/VolatileContentRepository.java index e39436e839..8deda3c25d 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/VolatileContentRepository.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/VolatileContentRepository.java @@ -44,8 +44,8 @@ import org.apache.nifi.controller.repository.claim.StandardContentClaim; import org.apache.nifi.controller.repository.io.ArrayManagedOutputStream; import org.apache.nifi.controller.repository.io.MemoryManager; import org.apache.nifi.engine.FlowEngine; -import org.apache.nifi.io.ByteArrayInputStream; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.ByteArrayInputStream; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.processor.DataUnit; import org.apache.nifi.util.NiFiProperties; diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/service/ControllerServiceLoader.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/service/ControllerServiceLoader.java index 5afb239529..42bd55f170 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/service/ControllerServiceLoader.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/service/ControllerServiceLoader.java @@ -36,7 +36,7 @@ import javax.xml.parsers.ParserConfigurationException; import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; -import org.apache.nifi.file.FileUtils; +import org.apache.nifi.util.file.FileUtils; import org.apache.nifi.util.DomUtils; import org.apache.commons.logging.Log; diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/persistence/StandardXMLFlowConfigurationDAO.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/persistence/StandardXMLFlowConfigurationDAO.java index cabb2726f9..c11aa72c78 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/persistence/StandardXMLFlowConfigurationDAO.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/persistence/StandardXMLFlowConfigurationDAO.java @@ -57,7 +57,7 @@ import org.apache.nifi.controller.reporting.StandardReportingInitializationConte import org.apache.nifi.controller.service.ControllerServiceLoader; import org.apache.nifi.controller.service.ControllerServiceNode; import org.apache.nifi.encrypt.StringEncryptor; -import org.apache.nifi.file.FileUtils; +import org.apache.nifi.util.file.FileUtils; import org.apache.nifi.nar.NarCloseable; import org.apache.nifi.reporting.InitializationException; import org.apache.nifi.reporting.ReportingInitializationContext; diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java index b2f541cd34..2c1b0857f2 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java @@ -72,7 +72,7 @@ import org.apache.nifi.groups.ProcessGroup; import org.apache.nifi.groups.ProcessGroupCounts; import org.apache.nifi.groups.RemoteProcessGroup; import org.apache.nifi.groups.RemoteProcessGroupPortDescriptor; -import org.apache.nifi.io.BufferedOutputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; import org.apache.nifi.remote.exception.BadRequestException; import org.apache.nifi.remote.exception.HandshakeException; import org.apache.nifi.remote.exception.PortNotRunningException; diff --git a/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/TestWriteAheadFlowFileRepository.java b/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/TestWriteAheadFlowFileRepository.java index 82c052b01a..054ef5ea77 100644 --- a/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/TestWriteAheadFlowFileRepository.java +++ b/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/TestWriteAheadFlowFileRepository.java @@ -35,7 +35,7 @@ import java.util.List; import org.apache.nifi.connectable.Connection; import org.apache.nifi.controller.FlowFileQueue; import org.apache.nifi.controller.repository.claim.StandardContentClaimManager; -import org.apache.nifi.file.FileUtils; +import org.apache.nifi.util.file.FileUtils; import org.junit.Test; import org.mockito.Mockito; diff --git a/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/io/TestLimitedOutputStream.java b/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/io/TestLimitedOutputStream.java index f13a752b0e..da0c414326 100644 --- a/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/io/TestLimitedOutputStream.java +++ b/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/io/TestLimitedOutputStream.java @@ -16,13 +16,12 @@ */ package org.apache.nifi.controller.repository.io; -import org.apache.nifi.controller.repository.io.LimitedInputStream; import static org.junit.Assert.assertEquals; import java.io.IOException; import java.io.InputStream; -import org.apache.nifi.io.ByteArrayInputStream; +import org.apache.nifi.stream.io.ByteArrayInputStream; import org.junit.Test; diff --git a/nar-bundles/framework-bundle/framework/file-authorization-provider/pom.xml b/nar-bundles/framework-bundle/framework/file-authorization-provider/pom.xml index cb01488466..691210809e 100644 --- a/nar-bundles/framework-bundle/framework/file-authorization-provider/pom.xml +++ b/nar-bundles/framework-bundle/framework/file-authorization-provider/pom.xml @@ -23,7 +23,7 @@ file-authorization-provider 0.0.1-SNAPSHOT - Authorization Provider: File + NiFi File Authorization Provider @@ -62,7 +62,7 @@ org.apache.nifi - nifi-file-utils + nifi-utils org.apache.nifi diff --git a/nar-bundles/framework-bundle/framework/file-authorization-provider/src/main/java/org/apache/nifi/authorization/FileAuthorizationProvider.java b/nar-bundles/framework-bundle/framework/file-authorization-provider/src/main/java/org/apache/nifi/authorization/FileAuthorizationProvider.java index 0f4a75c3ef..5657369ff8 100644 --- a/nar-bundles/framework-bundle/framework/file-authorization-provider/src/main/java/org/apache/nifi/authorization/FileAuthorizationProvider.java +++ b/nar-bundles/framework-bundle/framework/file-authorization-provider/src/main/java/org/apache/nifi/authorization/FileAuthorizationProvider.java @@ -21,6 +21,8 @@ import java.io.IOException; import java.util.Collection; import java.util.EnumSet; import java.util.HashSet; +import java.util.List; +import java.util.Map; import java.util.Set; import javax.xml.XMLConstants; import javax.xml.bind.JAXBContext; @@ -36,7 +38,7 @@ import org.apache.nifi.authorization.exception.AuthorityAccessException; import org.apache.nifi.authorization.exception.IdentityAlreadyExistsException; import org.apache.nifi.authorization.exception.ProviderCreationException; import org.apache.nifi.authorization.exception.UnknownIdentityException; -import org.apache.nifi.file.FileUtils; +import org.apache.nifi.util.file.FileUtils; import org.apache.nifi.user.generated.ObjectFactory; import org.apache.nifi.user.generated.Role; import org.apache.nifi.user.generated.User; @@ -492,6 +494,20 @@ public class FileAuthorizationProvider implements AuthorityProvider { } } + /** + * Grants access to download content regardless of FlowFile attributes. + * + * @param dnChain + * @param attributes + * @return + * @throws UnknownIdentityException + * @throws AuthorityAccessException + */ + @Override + public DownloadAuthorization authorizeDownload(List dnChain, Map attributes) throws UnknownIdentityException, AuthorityAccessException { + return DownloadAuthorization.approved(); + } + /** * Locates the user with the specified DN. * diff --git a/nar-bundles/framework-bundle/framework/file-authorization-provider/src/test/java/org/apache/nifi/authorization/FileAuthorizationProviderTest.java b/nar-bundles/framework-bundle/framework/file-authorization-provider/src/test/java/org/apache/nifi/authorization/FileAuthorizationProviderTest.java index 3d0196dbe1..d02d4d7919 100644 --- a/nar-bundles/framework-bundle/framework/file-authorization-provider/src/test/java/org/apache/nifi/authorization/FileAuthorizationProviderTest.java +++ b/nar-bundles/framework-bundle/framework/file-authorization-provider/src/test/java/org/apache/nifi/authorization/FileAuthorizationProviderTest.java @@ -20,7 +20,7 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import org.apache.nifi.authorization.exception.ProviderCreationException; -import org.apache.nifi.file.FileUtils; +import org.apache.nifi.util.file.FileUtils; import org.apache.nifi.util.NiFiProperties; import org.junit.After; import org.junit.Before; diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/DISCLAIMER b/nar-bundles/framework-bundle/framework/resources/src/main/resources/DISCLAIMER deleted file mode 100644 index 0f8e7a1ecc..0000000000 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/DISCLAIMER +++ /dev/null @@ -1,15 +0,0 @@ -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/ diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/LICENSE b/nar-bundles/framework-bundle/framework/resources/src/main/resources/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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. diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/NOTICE b/nar-bundles/framework-bundle/framework/resources/src/main/resources/NOTICE deleted file mode 100644 index e02ae44d1d..0000000000 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/NOTICE +++ /dev/null @@ -1,7 +0,0 @@ -Apache NiFi -Copyright 2014 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -Please see LICENSE for additional copyright and licensing information. diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi-status.bat b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi-status.bat index d00f31cf55..07dd6c71c3 100644 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi-status.bat +++ b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi-status.bat @@ -1,5 +1,4 @@ @echo off - rem rem Licensed to the Apache Software Foundation (ASF) under one or more rem contributor license agreements. See the NOTICE file distributed with @@ -20,8 +19,10 @@ rem rem Use JAVA_HOME if it's set; otherwise, just use java IF "%JAVA_HOME%"=="" (SET JAVA_EXE=java) ELSE (SET JAVA_EXE=%JAVA_HOME%\bin\java.exe) -SET LIB_DIR=%~dp0..\lib\bootstrap -SET CONF_DIR=%~dp0..\conf +SET NIFI_ROOT=%~dp0..\ +CD /d "%NIFI_ROOT%" +SET LIB_DIR=lib\bootstrap +SET CONF_DIR=conf SET BOOTSTRAP_CONF_FILE=%CONF_DIR%\bootstrap.conf SET JAVA_ARGS=-Dorg.apache.nifi.bootstrap.config.file=%BOOTSTRAP_CONF_FILE% diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/run-nifi.bat b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/run-nifi.bat index 5bab3886b1..03123d6b43 100644 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/run-nifi.bat +++ b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/run-nifi.bat @@ -16,12 +16,13 @@ rem See the License for the specific language governing permissions and rem limitations under the License. rem - rem Use JAVA_HOME if it's set; otherwise, just use java IF "%JAVA_HOME%"=="" (SET JAVA_EXE=java) ELSE (SET JAVA_EXE=%JAVA_HOME%\bin\java.exe) -SET LIB_DIR=%~dp0..\lib\bootstrap -SET CONF_DIR=%~dp0..\conf +SET NIFI_ROOT=%~dp0..\ +CD /d "%NIFI_ROOT%" +SET LIB_DIR=lib\bootstrap +SET CONF_DIR=conf SET BOOTSTRAP_CONF_FILE=%CONF_DIR%\bootstrap.conf SET JAVA_ARGS=-Dorg.apache.nifi.bootstrap.config.file=%BOOTSTRAP_CONF_FILE% diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/start-nifi.bat b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/start-nifi.bat index 882b719c29..6cc873342f 100644 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/start-nifi.bat +++ b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/start-nifi.bat @@ -1,5 +1,4 @@ @echo off - rem rem Licensed to the Apache Software Foundation (ASF) under one or more rem contributor license agreements. See the NOTICE file distributed with @@ -17,12 +16,13 @@ rem See the License for the specific language governing permissions and rem limitations under the License. rem - rem Use JAVA_HOME if it's set; otherwise, just use java IF "%JAVA_HOME%"=="" (SET JAVA_EXE=java) ELSE (SET JAVA_EXE=%JAVA_HOME%\bin\java.exe) -SET LIB_DIR=%~dp0..\lib\bootstrap -SET CONF_DIR=%~dp0..\conf +SET NIFI_ROOT=%~dp0..\ +CD /d "%NIFI_ROOT%" +SET LIB_DIR=lib\bootstrap +SET CONF_DIR=conf SET BOOTSTRAP_CONF_FILE=%CONF_DIR%\bootstrap.conf SET JAVA_ARGS=-Dorg.apache.nifi.bootstrap.config.file=%BOOTSTRAP_CONF_FILE% diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/stop-nifi.bat b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/stop-nifi.bat index 40c2d57b45..e4fc81d200 100644 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/stop-nifi.bat +++ b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/stop-nifi.bat @@ -1,5 +1,4 @@ @echo off - rem rem Licensed to the Apache Software Foundation (ASF) under one or more rem contributor license agreements. See the NOTICE file distributed with @@ -20,8 +19,10 @@ rem rem Use JAVA_HOME if it's set; otherwise, just use java IF "%JAVA_HOME%"=="" (SET JAVA_EXE=java) ELSE (SET JAVA_EXE=%JAVA_HOME%\bin\java.exe) -SET LIB_DIR=%~dp0..\lib\bootstrap -SET CONF_DIR=%~dp0..\conf +SET NIFI_ROOT=%~dp0..\ +CD /d "%NIFI_ROOT%" +SET LIB_DIR=lib\bootstrap +SET CONF_DIR=conf SET BOOTSTRAP_CONF_FILE=%CONF_DIR%\bootstrap.conf SET JAVA_ARGS=-Dorg.apache.nifi.bootstrap.config.file=%BOOTSTRAP_CONF_FILE% diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/bootstrap.conf b/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/bootstrap.conf index 6208560ffb..79ece96c92 100644 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/bootstrap.conf +++ b/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/bootstrap.conf @@ -15,7 +15,7 @@ graceful.shutdown.seconds=20 java.arg.1=-Dorg.apache.jasper.compiler.disablejsr199=true # JVM memory settings -java.arg.2=-Xms256m +java.arg.2=-Xms512m java.arg.3=-Xmx512m # Enable Remote Debugging @@ -29,6 +29,6 @@ java.arg.6=-Djava.protocol.handler.pkgs=sun.net.www.protocol # Java 7 and below have issues with Code Cache. The following lines allow us to run well even with # many classes loaded in the JVM. -java.arg.7=-XX:+ReservedCodeCacheSize=256m -java.arg.8=-XX:CodeCacheFlushingMinimumFreeSpace=10m -java.arg.9=-XX:+UseCodeCacheFlushing +#java.arg.7=-XX:ReservedCodeCacheSize=256m +#java.arg.8=-XX:CodeCacheFlushingMinimumFreeSpace=10m +#java.arg.9=-XX:+UseCodeCacheFlushing diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/docs/README.md b/nar-bundles/framework-bundle/framework/resources/src/main/resources/docs/README.md deleted file mode 100644 index 3f051341b5..0000000000 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/docs/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# Apache NiFi - -Apache NiFi is a dataflow system based on the concepts of flow-based programming. It is currently apart of the Apache Incubator. - -## Table of Contents - -- [Features](#features) -- [Getting Started](#getting-started) -- [Getting Help](#getting-help) -- [Requirements](#requirements) -- [License](#license) -- [Disclaimer](#disclaimer) - -## Features - -Apache NiFi supports powerful and scalable directed graphs of data routing, transformation, and system mediation logic. Some of the high-level capabilities and objectives of Apache NiFi include: - -- Web-based user interface for seamless experience between design, control, feedback, and monitoring of data flows -- Highly configurable along several dimensions of quality of service such as loss tolerant versus guaranteed delivery, low latency versus high throughput, and priority based queuing -- Fine-grained data provenance for all data received, forked, joined, cloned, modified, sent, and ultimately dropped as data reaches its configured end-state -- Component-based extension model along well defined interfaces enabling rapid development and effective testing - -## Getting Started - -Execute /bin/nifi.sh - -## Getting Help -If you have questions, you can reach out to our mailing list: dev@nifi.incubator.apache.org -([archive](http://mail-archives.apache.org/mod_mbox/incubator-nifi-dev)). -We're also often available in IRC: #nifi on -[irc.freenode.net](http://webchat.freenode.net/?channels=#nifi). - - -## Requirements -* JDK 1.7 or higher - -## 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. diff --git a/nar-bundles/framework-bundle/framework/site-to-site/pom.xml b/nar-bundles/framework-bundle/framework/site-to-site/pom.xml index 30cd325f61..81a9146cfc 100644 --- a/nar-bundles/framework-bundle/framework/site-to-site/pom.xml +++ b/nar-bundles/framework-bundle/framework/site-to-site/pom.xml @@ -29,10 +29,6 @@ org.apache.nifi nifi-security - - org.apache.nifi - nifi-core-flowfile-attributes - org.apache.nifi nifi-administration @@ -49,10 +45,6 @@ org.apache.nifi core-api - - org.apache.nifi - nifi-stream-utils - com.sun.jersey jersey-client @@ -73,10 +65,6 @@ org.apache.httpcomponents httpclient - - org.apache.nifi - remote-communications-utils - org.mockito mockito-core diff --git a/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/codec/StandardFlowFileCodec.java b/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/codec/StandardFlowFileCodec.java index 59feb181b4..d18a4ee9f2 100644 --- a/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/codec/StandardFlowFileCodec.java +++ b/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/codec/StandardFlowFileCodec.java @@ -27,7 +27,7 @@ import java.util.List; import java.util.Map; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.processor.ProcessSession; import org.apache.nifi.processor.io.InputStreamCallback; import org.apache.nifi.processor.io.OutputStreamCallback; diff --git a/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelInput.java b/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelInput.java index de27343a30..9e451fdd5c 100644 --- a/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelInput.java +++ b/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelInput.java @@ -20,8 +20,8 @@ import java.io.IOException; import java.io.InputStream; import java.nio.channels.SocketChannel; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.ByteCountingInputStream; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.ByteCountingInputStream; import org.apache.nifi.remote.io.InterruptableInputStream; import org.apache.nifi.remote.protocol.CommunicationsInput; diff --git a/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelOutput.java b/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelOutput.java index 80c338c8c6..26c01649b4 100644 --- a/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelOutput.java +++ b/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/SocketChannelOutput.java @@ -20,8 +20,8 @@ import java.io.IOException; import java.io.OutputStream; import java.nio.channels.SocketChannel; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.ByteCountingOutputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.ByteCountingOutputStream; import org.apache.nifi.remote.io.InterruptableOutputStream; import org.apache.nifi.remote.protocol.CommunicationsOutput; diff --git a/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelInput.java b/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelInput.java index f7f5bf941f..60ef33f24e 100644 --- a/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelInput.java +++ b/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelInput.java @@ -19,8 +19,8 @@ package org.apache.nifi.remote.io.socket.ssl; import java.io.IOException; import java.io.InputStream; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.ByteCountingInputStream; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.ByteCountingInputStream; import org.apache.nifi.remote.protocol.CommunicationsInput; public class SSLSocketChannelInput implements CommunicationsInput { diff --git a/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelOutput.java b/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelOutput.java index 76d714a07a..dc3d68fbbd 100644 --- a/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelOutput.java +++ b/nar-bundles/framework-bundle/framework/site-to-site/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannelOutput.java @@ -19,8 +19,8 @@ package org.apache.nifi.remote.io.socket.ssl; import java.io.IOException; import java.io.OutputStream; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.ByteCountingOutputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.ByteCountingOutputStream; import org.apache.nifi.remote.protocol.CommunicationsOutput; public class SSLSocketChannelOutput implements CommunicationsOutput { diff --git a/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java b/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java index 3900cfc416..5d370904d2 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java +++ b/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java @@ -384,14 +384,24 @@ public class JettyServer implements NiFiServer { // load the docs directory final File docsDir = Paths.get("docs").toRealPath().toFile(); final Resource docsResource = Resource.newResource(docsDir); - // load the component documentation working directory + // load the component documentation working directory final String componentDocsDirPath = props.getProperty(NiFiProperties.COMPONENT_DOCS_DIRECTORY, "work/docs/components"); final File workingDocsDirectory = Paths.get(componentDocsDirPath).toRealPath().getParent().toFile(); final Resource workingDocsResource = Resource.newResource(workingDocsDirectory); + // load the rest documentation + final File webApiDocsDir = new File(webApiContext.getTempDirectory(), "webapp/docs"); + if (!webApiDocsDir.exists()) { + final boolean made = webApiDocsDir.mkdirs(); + if (!made) { + throw new RuntimeException(webApiDocsDir.getAbsolutePath() + " could not be created"); + } + } + final Resource webApiDocsResource = Resource.newResource(webApiDocsDir); + // create resources for both docs locations - final ResourceCollection resources = new ResourceCollection(docsResource, workingDocsResource); + final ResourceCollection resources = new ResourceCollection(docsResource, workingDocsResource, webApiDocsResource); resourceHandler.setBaseResource(resources); // create the context handler @@ -642,12 +652,6 @@ public class JettyServer implements NiFiServer { for (final String url : urls) { logger.info(String.format("%s/nifi", url)); } - - // log the rest api location - logger.info("The REST API documentation is available at the following URLs:"); - for (final String url : urls) { - logger.info(String.format("%s/nifi-api/docs", url)); - } } } diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml b/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml index 3e4b6101b9..8a9b2d1ddd 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml @@ -23,7 +23,7 @@ org.apache.nifi nifi-web-api war - NiFi Web Rest Api + NiFi Rest Api docs @@ -34,7 +34,7 @@ src/main/enunciate/images - ${project.build.directory}/${project.artifactId}-${project.version}/docs/img + ${project.build.directory}/${project.artifactId}-${project.version}/docs/rest-api/img @@ -51,7 +51,7 @@ docs - ${project.build.directory}/${project.artifactId}-${project.version}/docs + ${project.build.directory}/${project.artifactId}-${project.version}/docs/rest-api diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/default.css b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/default.css deleted file mode 100755 index ccfd3211f8..0000000000 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/default.css +++ /dev/null @@ -1,266 +0,0 @@ -/*############################################################# -Name: Transparentia -Date: 2006-08-20 -Description: Simple, lightweight and slightly blue. -Author: Viktor Persson -URL: http://templates.arcsin.se - -Feel free to use and modify but please provide credits. -#############################################################*/ - -/* standard elements */ -* { - margin: 0; - padding: 0; -} - -a { - color: #496878; -} - -a:hover { - color: #6a90a4; -} - -body { - background-color: #DFE8EC; - color: #444; - font: normal 62.5% "Lucida Sans Unicode",sans-serif; - margin: 0; -} - -input { - color: #555; - font: normal 1.1em "Lucida Sans Unicode",sans-serif; -} - -p, cite, code, ul { - font-size: 12px; - padding-bottom: 1.2em; -} - -h1 { - font-size: 1.4em; - margin-bottom: 4px; -} - -h2 { - font-size: 1.2em; -} - -code { - background: url(img/bgcode.gif); - border: 1px solid #F0F0F0; - border-left: 6px solid #39F; - color: #555; - display: block; - font: normal 1.1em "Lucida Sans Unicode",serif; - margin-bottom: 12px; - padding: 8px 10px; - white-space: pre; -} - -cite { - background: url(img/quote.gif) no-repeat; - color: #666; - display: block; - font: normal 1.3em "Lucida Sans Unicode",serif; - padding-left: 28px; -} - -h1, h2, h3 { - color: #294c58; - padding-top: 6px; -} - -/* misc */ -.clearer { - clear: both; -} - -.deprecated { - color: red; -} - -.errortext { - color: red; - padding: 6px 12px; - font-variant:small-caps; -} - -/* structure */ -.container { - background: url(img/bgcontainer.png) repeat-y; - margin: 0 auto; - padding-bottom: 6px; - width: 767px; -} - -.header { - background: url(img/header.png) no-repeat; -} - -/* title */ -.title h1 { - font: normal 3em Verdana,sans-serif; - height: 150px; - line-height: 150px; - margin-bottom: 8px; - text-align: center; - position: relative; - left: -5000px; -} - -/* main */ -.main { - clear: both; - padding: 8px 18px; -} - -/* main left */ -.sidenav h1, .sidenav ul { - padding-left: 12px; -} - -.sidenav { - background: #EEE; - border: 1px solid #E5E5E5; - float: left; - width: 200px; -} - -.sidenav h1 { - color: #666; - font-size: 1.2em; - /*height: 20px;*/ - margin-top: 1.2em; -} - -.sidenav ul { - border-top: 1px solid #FAFAFA; - background: url(img/bgul.gif) repeat-x; - margin: 0; - padding: 0; -} - -.sidenav li { - border: 1px solid #FAFAFA; - border-top: none; - list-style: none; - margin: 0; -} - -.sidenav li a { - color: #777; - display: block; - font-size: 0.9em; - padding: 3px 6px 3px 14px; - text-decoration: none; -} - -.sidenav li a:hover { - color: #111; -} - -/* content */ -.content { - float: right; - width: 520px; -} - -.content .item { - padding: 6px 12px; - background: #FFF; - margin-bottom: 8px; -} - -.content .descr { - color: #333; -} - -.content li { - list-style: url(img/li.png); - margin-left: 18px; -} - -.content table { - background: url(img/bgcode.gif); - border: 1px solid #F0F0F0; - border-left: 6px solid #6a90a4; - color: #555; - display: block; - font: normal 1.1em "Lucida Sans Unicode",serif; - margin-bottom: 12px; - padding: 8px 10px; -} - -.content table tr td { - vertical-align:top; - text-align:left; - padding: 3px 3px 3px 3px; -} - -.content table tr th { - vertical-align:top; - text-align:left; - padding: 3px 3px 3px 3px; -} - -.content h1 { - /* text-decoration:underline;*/ -} - -.content h1 a { - color: #333; -} - -/* footer */ -.footer { - background: #FFF; - color: #999; - font-size: 1.1em; - margin: 0 auto; - text-align: center; - padding: 6px; - width: 720px; -} - -.footer a { - color: #666; - text-decoration: none; -} - -.footer a:hover { - color: #999; - text-decoration: underline; -} - -/* widecontent (content with no sidenav) */ -.widecontent { - background: #FFF; - border: 1px solid #EEE; - color: #666; - font-size: 1.1em; - margin: 0 auto; - padding: 6px; - width: 720px; -} - -.widecontent a { - color: #36C; - text-decoration: none; -} - -.widecontent a:hover { - color: #06F; - text-decoration: underline; -} - -.widecontent h1 { - padding: 6px 12px; - text-decoration:underline; -} - -.widecontent form { - padding: 6px 12px; -} diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/enunciate.xml b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/enunciate.xml index 781e6b149d..daaa553edf 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/enunciate.xml +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/enunciate.xml @@ -29,6 +29,8 @@ - + + + diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/bgcode.gif b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/bgcode.gif deleted file mode 100755 index 6f996823cd..0000000000 Binary files a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/bgcode.gif and /dev/null differ diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/bgcontainer.png b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/bgcontainer.png deleted file mode 100755 index 5b34fda02b..0000000000 Binary files a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/bgcontainer.png and /dev/null differ diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/bgul.gif b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/bgul.gif deleted file mode 100755 index ff689c8637..0000000000 Binary files a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/bgul.gif and /dev/null differ diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/header.png b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/header.png deleted file mode 100755 index 3383d33e57..0000000000 Binary files a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/header.png and /dev/null differ diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/home.png b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/home.png new file mode 100644 index 0000000000..be12052493 Binary files /dev/null and b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/home.png differ diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/li.png b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/li.png deleted file mode 100755 index 3acc10630b..0000000000 Binary files a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/li.png and /dev/null differ diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/quote.gif b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/quote.gif deleted file mode 100755 index fa145bbde6..0000000000 Binary files a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/quote.gif and /dev/null differ diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/search.gif b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/search.gif deleted file mode 100755 index ed553417a5..0000000000 Binary files a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/images/search.gif and /dev/null differ diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/override.css b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/override.css new file mode 100644 index 0000000000..1cd8e7f61b --- /dev/null +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/enunciate/override.css @@ -0,0 +1,178 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400"; + +html, html a { + -webkit-font-smoothing: antialiased; + text-shadow: 1px 1px 1px rgba(0,0,0,0.004); +} + +#site-name { + padding-left: 0; +} + +#site-name a { + font-variant: normal !important; + letter-spacing: 1px; +} + +#primary { + padding-right: 0; +} + +#primary li:hover { + border-bottom: 6px solid #7098ad; +} + +.xbreadcrumbs { + background-color: #7098ad !important; + color: #fff !important; +} + +.xbreadcrumbs li a, .xbreadcrumbs li.current a { + font-size: 13px !important; + color: #fff !important; +} + +.xbreadcrumbs li a.home { + background: url(img/home.png) no-repeat left center; + line-height: 16px; +} + +.xbreadcrumbs li ul { + top: 26px !important; + background-color: #e3ebee !important; +} + +.xbreadcrumbs li ul li a, .xbreadcrumbs li.current ul li a { + color: #444 !important; +} + +.home { + color: #444; + font-family: "Open Sans","DejaVu Sans",sans-serif !important; +} + +p { + font-family: 'Noto Serif', 'DejaVu Serif', serif; + font-size: 16px; +} + +p strong { + font-weight: bold; +} + +a { + color: #496878; +} + +a:hover { + color: #6a90a4; +} + +.container { + width: 940px !important; + padding: 0 10px; + background-color: #fff; +} + +#main h2, #main h3 { + border-width: 0; +} + +#main p.note { + background-color: #fefefe; + border: 1px solid #ccc; + border-left: 6px solid #ccc; + color: #555; + display: block; + margin-bottom: 12px; + padding: 5px 8px; + font-family: "Open Sans","DejaVu Sans",sans-serif; + font-size: 16px; +} + +ul.navigation li, ul.xbreadcrumbs li { + font-family: "Open Sans","DejaVu Sans",sans-serif; + font-size: 16px; +} + +ul li { + font-family: 'Noto Serif', 'DejaVu Serif', serif; + font-size: 16px; +} + +/* tables */ + +table { + background-color: #fefefe; + border: 1px solid #ccc; + border-left: 6px solid #ccc; + color: #555; + display: block; + margin-bottom: 12px; + padding: 5px 8px; +} + +table tbody tr td { + font-size: 14px; + vertical-align:top; + text-align:left; + padding: 4px; + border-width: 0; +} + +table tbody tr th { + font-size: 16px; + vertical-align:top; + text-align:left; + padding: 4px; + border-width: 0; +} + +/* code */ + +code { + font-size: 14px; + background-color: #fefefe; + border: 1px solid #ccc; + border-left: 6px solid #ccc; + color: #555; + margin-bottom: 10px; + padding: 5px 8px; + white-space: pre; +} + +h1, h2 { + font-weight: normal; + color: #ba3925; +} + +/* footer */ + +#footer { + border-top: 3px solid #eee; +} + +/* width */ + +.span-18 { + width: 921px !important; +} + +.span-20 { + width: 935px !important; +} \ No newline at end of file diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProvenanceResource.java b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProvenanceResource.java index 50bfbeb073..f0b38a1b96 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProvenanceResource.java +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProvenanceResource.java @@ -54,7 +54,7 @@ import org.apache.nifi.cluster.manager.impl.WebClusterManager; import org.apache.nifi.cluster.node.Node; import org.apache.nifi.cluster.protocol.NodeIdentifier; import org.apache.nifi.controller.repository.claim.ContentDirection; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.util.NiFiProperties; import org.apache.nifi.web.NiFiServiceFacade; import static org.apache.nifi.web.api.ApplicationResource.CLIENT_ID; @@ -160,13 +160,13 @@ public class ProvenanceResource extends ApplicationResource { */ @POST @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) - @PreAuthorize("hasRole('ROLE_PROVENANCE')") + @PreAuthorize("hasRole('ROLE_PROVENANCE') and hasRole('ROLE_DFM')") @Path("/replays") @TypeHint(ProvenanceEventEntity.class) public Response submitReplay( @Context HttpServletRequest httpServletRequest, @FormParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) ClientIdParameter clientId, - @QueryParam("clusterNodeId") String clusterNodeId, + @FormParam("clusterNodeId") String clusterNodeId, @FormParam("eventId") LongParameter eventId) { // ensure the event id is specified @@ -190,7 +190,7 @@ public class ProvenanceResource extends ApplicationResource { targetNodes.add(targetNode.getNodeId()); // replicate the request to the specific node - return clusterManager.applyRequest(HttpMethod.GET, getAbsolutePath(), getRequestParameters(true), getHeaders(), targetNodes).getResponse(); + return clusterManager.applyRequest(HttpMethod.POST, getAbsolutePath(), getRequestParameters(true), getHeaders(), targetNodes).getResponse(); } } @@ -231,7 +231,7 @@ public class ProvenanceResource extends ApplicationResource { @GET @Produces(MediaType.APPLICATION_OCTET_STREAM) @Path("/events/{id}/content/input") - @PreAuthorize("hasRole('ROLE_PROVENANCE') and hasRole('ROLE_DFM')") + @PreAuthorize("hasRole('ROLE_PROVENANCE')") public Response getInputContent( @QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) ClientIdParameter clientId, @QueryParam("clusterNodeId") String clusterNodeId, @@ -305,7 +305,7 @@ public class ProvenanceResource extends ApplicationResource { @GET @Produces(MediaType.APPLICATION_OCTET_STREAM) @Path("/events/{id}/content/output") - @PreAuthorize("hasRole('ROLE_PROVENANCE') and hasRole('ROLE_DFM')") + @PreAuthorize("hasRole('ROLE_PROVENANCE')") public Response getOutputContent( @QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) ClientIdParameter clientId, @QueryParam("clusterNodeId") String clusterNodeId, diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java index 2c2d4dca06..07e3150241 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java @@ -111,8 +111,11 @@ import org.apache.nifi.web.util.DownloadableContent; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.admin.service.UserService; +import org.apache.nifi.authorization.DownloadAuthorization; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.security.access.AccessDeniedException; /** * @@ -124,6 +127,7 @@ public class ControllerFacade implements ControllerServiceProvider { // nifi components private FlowController flowController; private FlowService flowService; + private UserService userService; // properties private NiFiProperties properties; @@ -787,6 +791,28 @@ public class ControllerFacade implements ControllerServiceProvider { throw new ResourceNotFoundException("Unable to find the specified event."); } + // get the flowfile attributes + final Map attributes = event.getAttributes(); + + // calculate the dn chain + final List dnChain = new ArrayList<>(); + + // build the dn chain + NiFiUser chainedUser = user; + do { + // add the entry for this user + dnChain.add(chainedUser.getDn()); + + // go to the next user in the chain + chainedUser = chainedUser.getChain(); + } while (chainedUser != null); + + // ensure the users in this chain are allowed to download this content + final DownloadAuthorization downloadAuthorization = userService.authorizeDownload(dnChain, attributes); + if (!downloadAuthorization.isApproved()) { + throw new AccessDeniedException(downloadAuthorization.getExplanation()); + } + // get the filename and fall back to the idnetifier (should never happen) String filename = event.getAttributes().get(CoreAttributes.FILENAME.key()); if (filename == null) { @@ -1329,6 +1355,10 @@ public class ControllerFacade implements ControllerServiceProvider { this.properties = properties; } + public void setUserService(UserService userService) { + this.userService = userService; + } + public void setFlowService(FlowService flowService) { this.flowService = flowService; } diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/util/ClientResponseUtils.java b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/util/ClientResponseUtils.java index 70ea7d604e..6a587aa71c 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/util/ClientResponseUtils.java +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/util/ClientResponseUtils.java @@ -19,7 +19,7 @@ package org.apache.nifi.web.util; import com.sun.jersey.api.client.ClientResponse; import java.io.BufferedInputStream; import java.io.IOException; -import org.apache.nifi.io.NullOutputStream; +import org.apache.nifi.stream.io.NullOutputStream; import org.apache.nifi.logging.NiFiLog; import org.apache.commons.io.IOUtils; import org.slf4j.Logger; diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/resources/nifi-web-api-context.xml b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/resources/nifi-web-api-context.xml index 484ceff0e3..39677cacfd 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/resources/nifi-web-api-context.xml +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/resources/nifi-web-api-context.xml @@ -80,6 +80,7 @@ + diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/webapp/WEB-INF/web.xml b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/webapp/WEB-INF/web.xml index 8986a4596b..2ee9670ab2 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/webapp/WEB-INF/web.xml +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/webapp/WEB-INF/web.xml @@ -15,6 +15,7 @@ --> nifi-api + contextConfigLocation @@ -26,12 +27,15 @@ classpath:nifi-cluster-protocol-context.xml + org.springframework.web.context.ContextLoaderListener + org.apache.nifi.web.contextlistener.ApplicationStartupContextListener + jerseySpring com.sun.jersey.spi.spring.container.servlet.SpringServlet @@ -44,10 +48,7 @@ jerseySpring /* - - default - /docs/* - + timer org.apache.nifi.web.filter.TimerFilter @@ -56,6 +57,7 @@ timer /* + threadLocal org.apache.nifi.web.filter.ThreadLocalFilter @@ -64,6 +66,7 @@ threadLocal /* + springSecurityFilterChain org.springframework.web.filter.DelegatingFilterProxy @@ -72,6 +75,7 @@ springSecurityFilterChain /* + requestLogger org.apache.nifi.web.filter.RequestLogger @@ -80,6 +84,7 @@ requestLogger /* + gzipCompressionFilter org.eclipse.jetty.servlets.GzipFilter @@ -88,6 +93,7 @@ gzipCompressionFilter /* + nodeRequestFilter org.apache.nifi.web.filter.NodeRequestFilter diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/test/java/org/apache/nifi/integration/util/NiFiTestAuthorizationProvider.java b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/test/java/org/apache/nifi/integration/util/NiFiTestAuthorizationProvider.java index d1e75124a8..48f18a9bf6 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/test/java/org/apache/nifi/integration/util/NiFiTestAuthorizationProvider.java +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/test/java/org/apache/nifi/integration/util/NiFiTestAuthorizationProvider.java @@ -19,6 +19,7 @@ package org.apache.nifi.integration.util; import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Set; import org.apache.nifi.authorization.Authority; @@ -29,6 +30,7 @@ import org.apache.nifi.authorization.exception.AuthorityAccessException; import org.apache.nifi.authorization.exception.ProviderCreationException; import org.apache.nifi.authorization.exception.UnknownIdentityException; import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.authorization.DownloadAuthorization; /** * @@ -169,4 +171,9 @@ public class NiFiTestAuthorizationProvider implements AuthorityProvider { public void ungroup(String group) throws UnknownIdentityException, AuthorityAccessException { } + @Override + public DownloadAuthorization authorizeDownload(List dnChain, Map attributes) throws UnknownIdentityException, AuthorityAccessException { + return DownloadAuthorization.approved(); + } + } diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp index a899603e8b..9b2d6df9d8 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp @@ -20,13 +20,14 @@ + NiFi Documentation - + @@ -38,11 +39,14 @@
-
Documents
-
@@ -99,6 +103,16 @@
+
+
Developer
+ +
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/no-documentation-found.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/no-documentation-found.jsp index ba1cca8820..567d0bed74 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/no-documentation-found.jsp +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/no-documentation-found.jsp @@ -18,14 +18,14 @@ - Component documentation not found + NiFi - - + - -
No usage documentation found.
+ +

Yikes!

+

Unable to locate the documentation for the selected item.

\ No newline at end of file diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/css/component-usage.css b/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/css/component-usage.css index b0f2e46383..816403427e 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/css/component-usage.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/css/component-usage.css @@ -14,15 +14,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400"; + +html, html a { + -webkit-font-smoothing: antialiased; + text-shadow: 1px 1px 1px rgba(0,0,0,0.004); +} + body { + width: 62.5em; + margin: 0 auto; display: block; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 12px; + font-family: "Open Sans","DejaVu Sans",sans-serif; } .title { font-weight: bold; - color: #294c58; + color: #7a2518; font-size: 18px; } @@ -33,39 +42,86 @@ body { /* tables */ table { - border-collapse: collapse; + background-color: #fefefe; + border: 1px solid #ccc; + border-left: 6px solid #ccc; + color: #555; + display: block; + margin-bottom: 12px; + padding: 5px 8px; } -table th { - background-image: url(../images/bgTableHeader.png); - background-repeat: repeat-x; - border-bottom: 1px solid #365C6A; - border-right: 1px solid #172B31; - height: 26px; - padding: 0 2px; - color: #fff; +tr td { + font-size: 14px; + vertical-align:top; + text-align:left; + padding: 4px; + border-width: 0; +} + +tr th { + font-size: 16px; + vertical-align:top; + text-align:left; + padding: 4px; + border-width: 0; white-space: nowrap; } -table td { - padding: 2px; -} - /* links */ a, a:link, a:visited { cursor: pointer; - color: #1e373f; + color: #2156a5; text-decoration: none; border: none; } a:hover, a:active { - color: #264c58; - text-decoration: underline; + color: #2156a5; + text-decoration: none; border: none; } .clear { clear: both; +} + +/* p */ + +p { + font-family: 'Noto Serif', 'DejaVu Serif', serif; + font-size: 16px; +} + +p strong { + font-weight: bold; +} + +/* ul li */ + +ul li { + font-family: 'Noto Serif', 'DejaVu Serif', serif; + font-size: 16px; +} + +ul li strong { + font-weight: bold; +} + +h2 { + font-weight: normal; + color: #ba3925; +} + +/* pre */ + +pre { + font-size: 14px; + background-color: #fefefe; + border: 1px solid #ccc; + border-left: 6px solid #ccc; + color: #555; + margin-bottom: 10px; + padding: 5px 8px; } \ No newline at end of file diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/css/main.css b/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/css/main.css index b4daa6baf7..918eb7ad71 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/css/main.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/css/main.css @@ -19,7 +19,8 @@ padding: 0; } -body { +#documentation-body { + width: 100%; position: absolute; top: 0; right: 0; @@ -111,7 +112,7 @@ div.component-listing { left: 0; bottom: 40px; overflow: auto; - font-size: 12px; + font-size: 16px; padding: 4px; } @@ -124,22 +125,32 @@ div.component-listing div.header { color: #264c58; } -div.component-listing div.component-links { - margin-left: 10px; - color: #1e373f; -} - div.component-links ul { list-style: none; } li.component-item { padding: 2px; + padding-left: 4px; + border-left: 8px solid transparent; + font-family: "Open Sans","DejaVu Sans",sans-serif; + font-size: 15px; +} + +li.component-item a { + color: #1e373f; +} + +li.component-item:hover { + border-left: 8px solid #d1dee5; +} + +li.component-item:hover a { + color: #264c58; } li.component-item.selected { - background-color: #d1dee5; - text-decoration: underline; + border-left: 8px solid #7098ad; } div.component-links span.no-components { diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/js/application.js b/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/js/application.js index e9b0499e5b..6983f01ea0 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/js/application.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-docs/src/main/webapp/js/application.js @@ -95,12 +95,14 @@ $(document).ready(function () { }; var applyFilter = function () { + var matchingGeneral = applyComponentFilter($('#general-links')); var matchingProcessors = applyComponentFilter($('#processor-links')); var matchingControllerServices = applyComponentFilter($('#controller-service-links')); var matchingReportingTasks = applyComponentFilter($('#reporting-task-links')); + var matchingDeveloper = applyComponentFilter($('#developer-links')); // update the rule count - $('#displayed-components').text(matchingProcessors + matchingControllerServices + matchingReportingTasks); + $('#displayed-components').text(matchingGeneral + matchingProcessors + matchingControllerServices + matchingReportingTasks + matchingDeveloper); }; var selectComponent = function (componentName) { @@ -199,9 +201,9 @@ $(document).ready(function () { } }).blur(function () { if ($(this).val() === '') { - $(this).addClass('component-filter-list').val('Filter components'); + $(this).addClass('component-filter-list').val('Filter'); } - }).addClass('component-filter-list').val('Filter components'); + }).addClass('component-filter-list').val('Filter'); // get the component usage container to install the window listener var componentUsageContainer = $('#component-usage-container'); @@ -255,12 +257,12 @@ $(document).ready(function () { selectComponent(componentName); } }); + + // listen for on the rest api and user guide and developer guide and admin guide and overview + $('a.rest-api, a.user-guide, a.developer-guide, a.admin-guide, a.overview').on('click', function() { + selectComponent($(this).text()); + }); - // listen for on the rest api and user guide - $('a.rest-api a.user-guide').on('click', function() { - selectComponent($(this).text()); - }); - // get the initial selection var initialComponentLink = $('a.component-link:first'); var initialSelection = $('#initial-selection').text(); diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-error/src/main/webapp/index.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-error/src/main/webapp/index.jsp index f7dc687ddc..3a342fb093 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-error/src/main/webapp/index.jsp +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-error/src/main/webapp/index.jsp @@ -20,6 +20,7 @@ <% String contextPath = "/".equals(request.getContextPath()) ? "" : request.getContextPath(); %> + NiFi diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/pom.xml b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/pom.xml index c4471a12c8..69e306d5e7 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/pom.xml +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/pom.xml @@ -23,7 +23,7 @@ org.apache.nifi nifi-web war - NiFi Web UI + NiFi UI ${project.build.directory}/tmp canvas.properties diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/cluster.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/cluster.css index c3b547af5f..8bb50bf69c 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/cluster.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/cluster.css @@ -133,6 +133,10 @@ input.cluster-filter-list { overflow: hidden; } +span.sorted { + text-decoration: underline; +} + /* user details dialog */ #node-details-dialog { diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js index 530c8a2ac0..725a6516d1 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js @@ -1136,14 +1136,14 @@ nf.CanvasToolbox = (function () { }); } else { // add disabled icons - $('
').attr('title', nf.Common.config.type.processor).addClass('processor-icon-disable').addClass('toolbox-icon').appendTo(toolbox); - $('
').attr('title', nf.Common.config.type.inputPort).addClass('input-port-icon-disable').addClass('toolbox-icon').appendTo(toolbox); - $('
').attr('title', nf.Common.config.type.outputPort).addClass('output-port-icon-disable').addClass('toolbox-icon').appendTo(toolbox); - $('
').attr('title', nf.Common.config.type.processGroup).addClass('process-group-icon-disable').addClass('toolbox-icon').appendTo(toolbox); - $('
').attr('title', nf.Common.config.type.remoteProcessGroup).addClass('remote-process-group-icon-disable').addClass('toolbox-icon').appendTo(toolbox); - $('
').attr('title', nf.Common.config.type.funnel).addClass('funnel-icon-disable').addClass('toolbox-icon').appendTo(toolbox); - $('
').attr('title', nf.Common.config.type.template).addClass('template-icon-disable').addClass('toolbox-icon').appendTo(toolbox); - $('
').attr('title', nf.Common.config.type.label).addClass('label-icon-disable').addClass('toolbox-icon').appendTo(toolbox); + $('
').attr('title', config.type.processor).addClass('processor-icon-disable').addClass('toolbox-icon').appendTo(toolbox); + $('
').attr('title', config.type.inputPort).addClass('input-port-icon-disable').addClass('toolbox-icon').appendTo(toolbox); + $('
').attr('title', config.type.outputPort).addClass('output-port-icon-disable').addClass('toolbox-icon').appendTo(toolbox); + $('
').attr('title', config.type.processGroup).addClass('process-group-icon-disable').addClass('toolbox-icon').appendTo(toolbox); + $('
').attr('title', config.type.remoteProcessGroup).addClass('remote-process-group-icon-disable').addClass('toolbox-icon').appendTo(toolbox); + $('
').attr('title', config.type.funnel).addClass('funnel-icon-disable').addClass('toolbox-icon').appendTo(toolbox); + $('
').attr('title', config.type.template).addClass('template-icon-disable').addClass('toolbox-icon').appendTo(toolbox); + $('
').attr('title', config.type.label).addClass('label-icon-disable').addClass('toolbox-icon').appendTo(toolbox); } }, diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js index addd4be3f1..13b0e5f24c 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js @@ -30,6 +30,8 @@ nf.ClusterTable = (function () { } }; + var prevColumn, count; + /** * Sorts the specified data using the specified sort details. * @@ -44,9 +46,20 @@ nf.ClusterTable = (function () { var bDate = nf.Common.parseDateTime(b[sortDetails.columnId]); return aDate.getTime() - bDate.getTime(); } else if (sortDetails.columnId === 'queued') { - var aCount = nf.Common.parseCount(a[sortDetails.columnId]); - var bCount = nf.Common.parseCount(b[sortDetails.columnId]); - return aCount - bCount; + var aSplit = a[sortDetails.columnId].split(/ \/ /); + var bSplit = b[sortDetails.columnId].split(/ \/ /); + var mod = count %4; + if (mod < 2) { + $('#cluster-table span.queued-title').addClass('sorted'); + var aCount = nf.Common.parseCount(aSplit[0]); + var bCount = nf.Common.parseCount(bSplit[0]); + return aCount - bCount; + } else { + $('#cluster-table span.queued-size-title').addClass('sorted'); + var aSize = nf.Common.parseSize(aSplit[1]); + var bSize = nf.Common.parseSize(bSplit[1]); + return aSize - bSize; + } } else if (sortDetails.columnId === 'status') { var aString = nf.Common.isDefinedAndNotNull(a[sortDetails.columnId]) ? a[sortDetails.columnId] : ''; if (a.primary === true) { @@ -68,8 +81,22 @@ nf.ClusterTable = (function () { } }; + // remove previous sort indicators + $('#cluster-table span.queued-title').removeClass('sorted'); + $('#cluster-table span.queued-size-title').removeClass('sorted'); + + // update/reset the count as appropriate + if (prevColumn !== sortDetails.columnId) { + count = 0; + } else { + count++; + } + // perform the sort data.sort(comparer, sortDetails.sortAsc); + + // record the previous table and sorted column + prevColumn = sortDetails.columnId; }; /** @@ -291,7 +318,7 @@ nf.ClusterTable = (function () { {id: 'moreDetails', name: ' ', sortable: false, resizable: false, formatter: moreDetailsFormatter, width: 50, maxWidth: 50}, {id: 'node', field: 'node', name: 'Node Address', formatter: nodeFormatter, resizable: true, sortable: true}, {id: 'activeThreadCount', field: 'activeThreadCount', name: 'Active Thread Count', resizable: true, sortable: true}, - {id: 'queued', field: 'queued', name: 'Queued (count / size)', resizable: true, sortable: true}, + {id: 'queued', field: 'queued', name: 'Queue / Size', resizable: true, sortable: true}, {id: 'status', field: 'status', name: 'Status', formatter: statusFormatter, resizable: true, sortable: true}, {id: 'uptime', field: 'nodeStartTime', name: 'Uptime', formatter: valueFormatter, resizable: true, sortable: true}, {id: 'heartbeat', field: 'heartbeat', name: 'Last Heartbeat', formatter: valueFormatter, resizable: true, sortable: true} diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js index cdc3ea7cfa..6bf7e08e59 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js @@ -728,7 +728,7 @@ nf.Common = { */ parseSize: function (rawSize) { var tokens = rawSize.split(/ /); - var size = parseFloat(tokens[0]); + var size = parseFloat(tokens[0].replace(/,/g, '')); var units = tokens[1]; if (units === 'KB') { diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js index bcd0fced82..759bcda0d1 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js @@ -84,17 +84,18 @@ nf.ProvenanceTable = (function () { var downloadContent = function (direction) { var eventId = $('#provenance-event-id').text(); - // build the parameters - var parameters = {}; + // build the url + var url = config.urls.provenance + '/events/' + encodeURIComponent(eventId) + '/content/' + encodeURIComponent(direction); // conditionally include the cluster node id var clusterNodeId = $('#provenance-event-cluster-node-id').text(); if (!nf.Common.isBlank(clusterNodeId)) { - parameters['clusterNodeId'] = clusterNodeId; + window.open(url + '?' + $.param({ + 'clusterNodeId': clusterNodeId + })); + } else { + window.open(url); } - - // get the content - nf.Common.submit('GET', config.urls.provenance + '/events/' + encodeURIComponent(eventId) + '/content/' + encodeURIComponent(direction), parameters); }; /** @@ -191,6 +192,29 @@ nf.ProvenanceTable = (function () { } }); + // input download + $('#input-content-download').on('click', function () { + downloadContent('input'); + }); + + // output download + $('#output-content-download').on('click', function () { + downloadContent('output'); + }); + + // if a content viewer url is specified, use it + if (isContentViewConfigured()) { + // input view + $('#input-content-view').on('click', function () { + viewContent('input'); + }); + + // output view + $('#output-content-view').on('click', function () { + viewContent('output'); + }); + } + // handle the replay and downloading if (nf.Common.isDFM()) { // replay @@ -220,29 +244,6 @@ nf.ProvenanceTable = (function () { $('#event-details-dialog').modal('hide'); }); - // input download - $('#input-content-download').on('click', function () { - downloadContent('input'); - }); - - // output download - $('#output-content-download').on('click', function () { - downloadContent('output'); - }); - - // if a content viewer url is specified, use it - if (isContentViewConfigured()) { - // input view - $('#input-content-view').on('click', function () { - viewContent('input'); - }); - - // output view - $('#output-content-view').on('click', function () { - viewContent('output'); - }); - } - // show the replay panel $('#replay-details').show(); } @@ -1281,19 +1282,17 @@ nf.ProvenanceTable = (function () { $('#output-content-download').hide(); - if (nf.Common.isDFM()) { - if (event.inputContentAvailable === true) { - $('#input-content-download').show(); + if (event.inputContentAvailable === true) { + $('#input-content-download').show(); - if (isContentViewConfigured()) { - $('#input-content-view').show(); - } else { - $('#input-content-view').hide(); - } + if (isContentViewConfigured()) { + $('#input-content-view').show(); } else { - $('#input-content-download').hide(); $('#input-content-view').hide(); } + } else { + $('#input-content-download').hide(); + $('#input-content-view').hide(); } } else { $('#output-content-details').show(); @@ -1327,32 +1326,30 @@ nf.ProvenanceTable = (function () { outputContentSize.attr('title', nf.Common.formatInteger(event.outputContentClaimFileSizeBytes) + ' bytes'); } - if (nf.Common.isDFM()) { - if (event.inputContentAvailable === true) { - $('#input-content-download').show(); + if (event.inputContentAvailable === true) { + $('#input-content-download').show(); - if (isContentViewConfigured()) { - $('#input-content-view').show(); - } else { - $('#input-content-view').hide(); - } + if (isContentViewConfigured()) { + $('#input-content-view').show(); } else { - $('#input-content-download').hide(); $('#input-content-view').hide(); } + } else { + $('#input-content-download').hide(); + $('#input-content-view').hide(); + } - if (event.outputContentAvailable === true) { - $('#output-content-download').show(); + if (event.outputContentAvailable === true) { + $('#output-content-download').show(); - if (isContentViewConfigured()) { - $('#output-content-view').show(); - } else { - $('#output-content-view').hide(); - } + if (isContentViewConfigured()) { + $('#output-content-view').show(); } else { - $('#output-content-download').hide(); $('#output-content-view').hide(); } + } else { + $('#output-content-download').hide(); + $('#output-content-view').hide(); } } diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js index 7f486de761..175620746c 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js @@ -270,7 +270,7 @@ nf.TemplatesTable = (function () { if (nf.Common.isDefinedAndNotNull(grid)) { var data = grid.getData(); var item = data.getItem(row); - nf.Common.submit('GET', config.urls.templates + '/' + encodeURIComponent(item.id)); + window.open(config.urls.templates + '/' + encodeURIComponent(item.id)); } }, diff --git a/nar-bundles/framework-bundle/framework/web/web-security/src/main/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationService.java b/nar-bundles/framework-bundle/framework/web/web-security/src/main/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationService.java index 6417a05d11..dec7c4b7b7 100644 --- a/nar-bundles/framework-bundle/framework/web/web-security/src/main/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationService.java +++ b/nar-bundles/framework-bundle/framework/web/web-security/src/main/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationService.java @@ -51,10 +51,12 @@ public class NiFiAuthorizationService implements UserDetailsService { private NiFiProperties properties; /** - * Loads the user details for the specified dn. Method must be synchronized - * since multiple requests from the same user may be sent simultaneously. - * Since we don't want to run the account verification process multiple for - * the same user, we treat each request atomically. + * Loads the user details for the specified dn. + * + * Synchronizing because we want each request to be authorized atomically since + * each may contain any number of DNs. We wanted an access decision made + * for each individual request as a whole (without other request potentially + * impacting it). * * @param rawProxyChain * @return @@ -72,6 +74,8 @@ public class NiFiAuthorizationService implements UserDetailsService { throw new UntrustedProxyException("Malformed proxy chain."); } + NiFiUser proxy = null; + // process each part of the proxy chain for (final Iterator dnIter = dnList.iterator(); dnIter.hasNext();) { final String dn = dnIter.next(); @@ -88,6 +92,14 @@ public class NiFiAuthorizationService implements UserDetailsService { logger.warn(String.format("Proxy '%s' must have '%s' authority. Current authorities: %s", dn, Authority.ROLE_PROXY.toString(), StringUtils.join(user.getAuthorities(), ", "))); throw new UntrustedProxyException(String.format("Untrusted proxy '%s' must be authorized with '%s'.", dn, Authority.ROLE_PROXY.toString())); } + + // if we've already encountered a proxy, update the chain + if (proxy != null) { + user.setChain(proxy); + } + + // record this user as the proxy for the next user in the chain + proxy = user; } catch (UsernameNotFoundException unfe) { // if this proxy is a new user, conditionally create a new account automatically if (properties.getSupportNewAccountRequests()) { @@ -101,6 +113,12 @@ public class NiFiAuthorizationService implements UserDetailsService { throw new UsernameNotFoundException(String.format("An account request was generated for the proxy '%s'.", dn)); } catch (AdministrationException ae) { throw new AuthenticationServiceException(String.format("Unable to create an account request for '%s': %s", dn, ae.getMessage()), ae); + } catch (IllegalArgumentException iae) { + // check then modified... account didn't exist when getting the user details but did when + // attempting to auto create the user account request + final String message = String.format("Account request was already submitted for '%s'", dn); + logger.warn(message); + throw new AccountStatusException(message) {}; } } else { logger.warn(String.format("Untrusted proxy '%s' must be authorized with '%s' authority: %s", dn, Authority.ROLE_PROXY.toString(), unfe.getMessage())); @@ -112,6 +130,12 @@ public class NiFiAuthorizationService implements UserDetailsService { } } else { userDetails = getNiFiUserDetails(dn); + + // if we've already encountered a proxy, update the chain + if (proxy != null) { + final NiFiUser user = userDetails.getNiFiUser(); + user.setChain(proxy); + } } } @@ -131,8 +155,7 @@ public class NiFiAuthorizationService implements UserDetailsService { } catch (AdministrationException ase) { throw new AuthenticationServiceException(String.format("An error occurred while accessing the user credentials for '%s': %s", dn, ase.getMessage()), ase); } catch (AccountDisabledException | AccountPendingException e) { - throw new AccountStatusException(e.getMessage(), e) { - }; + throw new AccountStatusException(e.getMessage(), e) {}; } catch (AccountNotFoundException anfe) { throw new UsernameNotFoundException(anfe.getMessage()); } diff --git a/nar-bundles/framework-bundle/framework/web/web-security/src/test/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationServiceTest.java b/nar-bundles/framework-bundle/framework/web/web-security/src/test/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationServiceTest.java new file mode 100644 index 0000000000..057a854509 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/web/web-security/src/test/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationServiceTest.java @@ -0,0 +1,250 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.web.security.authorization; + +import org.apache.nifi.admin.service.AccountDisabledException; +import org.apache.nifi.admin.service.AccountNotFoundException; +import org.apache.nifi.admin.service.AccountPendingException; +import org.apache.nifi.admin.service.AdministrationException; +import org.apache.nifi.admin.service.UserService; +import org.apache.nifi.authorization.Authority; +import org.apache.nifi.user.NiFiUser; +import org.apache.nifi.util.NiFiProperties; +import org.apache.nifi.web.security.DnUtils; +import org.apache.nifi.web.security.UntrustedProxyException; +import org.apache.nifi.web.security.user.NiFiUserDetails; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; +import org.springframework.security.authentication.AccountStatusException; +import org.springframework.security.authentication.AuthenticationServiceException; +import org.springframework.security.core.userdetails.UsernameNotFoundException; + + +/** + * Test case for NiFiAuthorizationService. + */ +public class NiFiAuthorizationServiceTest { + + private static final String USER = "user"; + private static final String PROXY = "proxy"; + private static final String PROXY_PROXY = "proxy-proxy"; + private static final String USER_NOT_FOUND = "user-not-found"; + private static final String USER_DISABLED = "user-disabled"; + private static final String USER_PENDING = "user-pending"; + private static final String USER_ADMIN_EXCEPTION = "user-admin-exception"; + private static final String PROXY_NOT_FOUND = "proxy-not-found"; + + private NiFiAuthorizationService authorizationService; + private UserService userService; + + @Before + public void setup() throws Exception { + // mock the web security properties + final NiFiProperties properties = Mockito.mock(NiFiProperties.class); + Mockito.when(properties.getSupportNewAccountRequests()).thenReturn(Boolean.TRUE); + + userService = Mockito.mock(UserService.class); + Mockito.doReturn(null).when(userService).createPendingUserAccount(Mockito.anyString(), Mockito.anyString()); + Mockito.doAnswer(new Answer() { + @Override + public Object answer(InvocationOnMock invocation) throws Throwable { + Object[] args = invocation.getArguments(); + String dn = (String) args[0]; + + if (null != dn) { + switch (dn) { + case USER_NOT_FOUND: + case PROXY_NOT_FOUND: + throw new AccountNotFoundException(""); + case USER_DISABLED: + throw new AccountDisabledException(""); + case USER_PENDING: + throw new AccountPendingException(""); + case USER_ADMIN_EXCEPTION: + throw new AdministrationException(); + case USER: + final NiFiUser monitor = new NiFiUser(); + monitor.setDn(dn); + monitor.getAuthorities().add(Authority.ROLE_MONITOR); + return monitor; + case PROXY: + case PROXY_PROXY: + final NiFiUser proxy = new NiFiUser(); + proxy.setDn(dn); + proxy.getAuthorities().add(Authority.ROLE_PROXY); + return proxy; + } + } + + return null; + } + }).when(userService).checkAuthorization(Mockito.anyString()); + + // create the authorization service + authorizationService = new NiFiAuthorizationService(); + authorizationService.setProperties(properties); + authorizationService.setUserService(userService); + } + + /** + * Ensures the authorization service correctly handles users invalid dn chain. + * + * @throws Exception + */ + @Test(expected = UntrustedProxyException.class) + public void testInvalidDnChain() throws Exception { + authorizationService.loadUserByUsername(USER); + } + + /** + * Ensures the authorization service correctly handles account not found. + * + * @throws Exception + */ + @Test(expected = UsernameNotFoundException.class) + public void testAccountNotFound() throws Exception { + authorizationService.loadUserByUsername(DnUtils.formatProxyDn(USER_NOT_FOUND)); + } + + /** + * Ensures the authorization service correctly handles account disabled. + * + * @throws Exception + */ + @Test(expected = AccountStatusException.class) + public void testAccountDisabled() throws Exception { + authorizationService.loadUserByUsername(DnUtils.formatProxyDn(USER_DISABLED)); + } + + /** + * Ensures the authorization service correctly handles account pending. + * + * @throws Exception + */ + @Test(expected = AccountStatusException.class) + public void testAccountPending() throws Exception { + authorizationService.loadUserByUsername(DnUtils.formatProxyDn(USER_PENDING)); + } + + /** + * Ensures the authorization service correctly handles account administration exception. + * + * @throws Exception + */ + @Test(expected = AuthenticationServiceException.class) + public void testAccountAdminException() throws Exception { + authorizationService.loadUserByUsername(DnUtils.formatProxyDn(USER_ADMIN_EXCEPTION)); + } + + /** + * Tests the case when there is no proxy. + * + * @throws Exception + */ + @Test + public void testNoProxy() throws Exception { + final NiFiUserDetails details = (NiFiUserDetails) authorizationService.loadUserByUsername(DnUtils.formatProxyDn(USER)); + final NiFiUser user = details.getNiFiUser(); + + Assert.assertEquals(USER, user.getDn()); + Assert.assertNull(user.getChain()); + } + + /** + * Tests the case when the proxy does not have ROLE_PROXY. + * + * @throws Exception + */ + @Test(expected = UntrustedProxyException.class) + public void testInvalidProxy() throws Exception { + final String dnChain = DnUtils.formatProxyDn(USER) + DnUtils.formatProxyDn(USER); + authorizationService.loadUserByUsername(dnChain); + } + + /** + * Ensures the authorization service correctly handles proxy not found by attempting + * to create an account request for the proxy. + * + * @throws Exception + */ + @Test(expected = UsernameNotFoundException.class) + public void testProxyNotFound() throws Exception { + try { + final String dnChain = DnUtils.formatProxyDn(USER) + DnUtils.formatProxyDn(PROXY_NOT_FOUND); + authorizationService.loadUserByUsername(DnUtils.formatProxyDn(dnChain)); + } finally { + Mockito.verify(userService).createPendingUserAccount(Mockito.eq(PROXY_NOT_FOUND), Mockito.anyString()); + } + } + + /** + * Tests the case when there is a proxy. + * + * @throws Exception + */ + @Test + public void testProxy() throws Exception { + final String dnChain = DnUtils.formatProxyDn(USER) + DnUtils.formatProxyDn(PROXY); + final NiFiUserDetails details = (NiFiUserDetails) authorizationService.loadUserByUsername(dnChain); + final NiFiUser user = details.getNiFiUser(); + + // verify the user + Assert.assertEquals(USER, user.getDn()); + Assert.assertNotNull(user.getChain()); + + // get the proxy + final NiFiUser proxy = user.getChain(); + + // verify the proxy + Assert.assertEquals(PROXY, proxy.getDn()); + Assert.assertNull(proxy.getChain()); + } + + /** + * Tests the case when there is are multiple proxies. + * + * @throws Exception + */ + @Test + public void testProxyProxy() throws Exception { + final String dnChain = DnUtils.formatProxyDn(USER) + DnUtils.formatProxyDn(PROXY) + DnUtils.formatProxyDn(PROXY_PROXY); + final NiFiUserDetails details = (NiFiUserDetails) authorizationService.loadUserByUsername(dnChain); + final NiFiUser user = details.getNiFiUser(); + + // verify the user + Assert.assertEquals(USER, user.getDn()); + Assert.assertNotNull(user.getChain()); + + // get the proxy + NiFiUser proxy = user.getChain(); + + // verify the proxy + Assert.assertEquals(PROXY, proxy.getDn()); + Assert.assertNotNull(proxy.getChain()); + + // get the proxies proxy + proxy = proxy.getChain(); + + // verify the proxies proxy + Assert.assertEquals(PROXY_PROXY, proxy.getDn()); + Assert.assertNull(proxy.getChain()); + } +} diff --git a/nar-bundles/hadoop-bundle/hdfs-processors/pom.xml b/nar-bundles/hadoop-bundle/hdfs-processors/pom.xml index 9a4bf2b06e..0325535ad0 100644 --- a/nar-bundles/hadoop-bundle/hdfs-processors/pom.xml +++ b/nar-bundles/hadoop-bundle/hdfs-processors/pom.xml @@ -32,7 +32,7 @@ org.apache.nifi - nifi-core-flowfile-attributes + nifi-utils org.apache.nifi @@ -42,10 +42,6 @@ org.apache.nifi flowfile-packager - - org.apache.nifi - nifi-stream-utils - org.apache.hadoop hadoop-common diff --git a/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/FlowFileStreamUnpackerSequenceFileWriter.java b/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/FlowFileStreamUnpackerSequenceFileWriter.java index 28386d875e..d3fb97fab1 100644 --- a/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/FlowFileStreamUnpackerSequenceFileWriter.java +++ b/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/FlowFileStreamUnpackerSequenceFileWriter.java @@ -25,7 +25,7 @@ import java.util.Map; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedInputStream; import org.apache.nifi.processors.hadoop.util.InputStreamWritable; import org.apache.nifi.util.FlowFilePackagerV3; diff --git a/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/PutHDFS.java b/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/PutHDFS.java index be4ebacf54..5768da0d87 100644 --- a/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/PutHDFS.java +++ b/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/PutHDFS.java @@ -33,8 +33,8 @@ import org.apache.nifi.components.ValidationResult; import org.apache.nifi.components.Validator; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.processor.DataUnit; import org.apache.nifi.processor.ProcessContext; import org.apache.nifi.processor.ProcessSession; diff --git a/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/SequenceFileWriterImpl.java b/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/SequenceFileWriterImpl.java index 6eaad9f146..4bb9ca9054 100644 --- a/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/SequenceFileWriterImpl.java +++ b/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/SequenceFileWriterImpl.java @@ -23,7 +23,7 @@ import java.io.UnsupportedEncodingException; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedInputStream; import org.apache.nifi.processor.ProcessSession; import org.apache.nifi.processor.io.StreamCallback; import org.apache.nifi.processors.hadoop.util.ByteFilteringOutputStream; diff --git a/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/TarUnpackerSequenceFileWriter.java b/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/TarUnpackerSequenceFileWriter.java index 2131eb868c..82e1de2d73 100644 --- a/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/TarUnpackerSequenceFileWriter.java +++ b/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/TarUnpackerSequenceFileWriter.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.io.InputStream; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedInputStream; import org.apache.nifi.processors.hadoop.util.InputStreamWritable; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; diff --git a/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/ZipUnpackerSequenceFileWriter.java b/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/ZipUnpackerSequenceFileWriter.java index 476ceb3234..c986e9aed9 100644 --- a/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/ZipUnpackerSequenceFileWriter.java +++ b/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/ZipUnpackerSequenceFileWriter.java @@ -23,7 +23,7 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedInputStream; import org.apache.nifi.processors.hadoop.util.InputStreamWritable; import org.apache.hadoop.io.SequenceFile.Writer; diff --git a/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/util/OutputStreamWritable.java b/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/util/OutputStreamWritable.java index 9773eb7ba0..62fdc3512e 100644 --- a/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/util/OutputStreamWritable.java +++ b/nar-bundles/hadoop-bundle/hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/util/OutputStreamWritable.java @@ -21,8 +21,8 @@ import java.io.DataOutput; import java.io.IOException; import java.io.OutputStream; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.DataOutputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.DataOutputStream; import org.apache.hadoop.io.DataInputBuffer; import org.apache.hadoop.io.Writable; diff --git a/nar-bundles/monitor-threshold-bundle/processor/pom.xml b/nar-bundles/monitor-threshold-bundle/processor/pom.xml index ad3b014a0f..256f8787dc 100644 --- a/nar-bundles/monitor-threshold-bundle/processor/pom.xml +++ b/nar-bundles/monitor-threshold-bundle/processor/pom.xml @@ -32,14 +32,6 @@ org.apache.nifi nifi-utils - - org.apache.nifi - nifi-file-utils - - - org.apache.nifi - nifi-stream-utils - org.apache.nifi nifi-processor-utils diff --git a/nar-bundles/monitor-threshold-bundle/processor/src/main/java/org/apache/nifi/processors/monitor/MonitorThreshold.java b/nar-bundles/monitor-threshold-bundle/processor/src/main/java/org/apache/nifi/processors/monitor/MonitorThreshold.java index 7373380acb..ec071083a0 100644 --- a/nar-bundles/monitor-threshold-bundle/processor/src/main/java/org/apache/nifi/processors/monitor/MonitorThreshold.java +++ b/nar-bundles/monitor-threshold-bundle/processor/src/main/java/org/apache/nifi/processors/monitor/MonitorThreshold.java @@ -42,7 +42,7 @@ import java.util.regex.Pattern; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.components.ValidationContext; import org.apache.nifi.components.ValidationResult; -import org.apache.nifi.file.FileUtils; +import org.apache.nifi.util.file.FileUtils; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; diff --git a/nar-bundles/monitor-threshold-bundle/ui/pom.xml b/nar-bundles/monitor-threshold-bundle/ui/pom.xml index 645e4d63f5..af63349bf4 100644 --- a/nar-bundles/monitor-threshold-bundle/ui/pom.xml +++ b/nar-bundles/monitor-threshold-bundle/ui/pom.xml @@ -123,7 +123,7 @@ org.apache.nifi - nifi-file-utils + nifi-utils org.apache.nifi diff --git a/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/pom.xml b/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/pom.xml index 12e06e51fd..ad5cee39d9 100644 --- a/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/pom.xml +++ b/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/pom.xml @@ -35,10 +35,6 @@ org.apache.nifi data-provenance-utils - - org.apache.nifi - nifi-stream-utils - org.apache.nifi nifi-utils @@ -47,10 +43,6 @@ org.apache.nifi nifi-properties - - org.apache.nifi - nifi-core-flowfile-attributes - org.apache.lucene lucene-core diff --git a/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/StandardRecordReader.java b/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/StandardRecordReader.java index a7ae8502d2..5e4744bdbf 100644 --- a/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/StandardRecordReader.java +++ b/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/StandardRecordReader.java @@ -26,8 +26,8 @@ import java.util.Map; import java.util.Set; import java.util.UUID; -import org.apache.nifi.io.ByteCountingInputStream; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.ByteCountingInputStream; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.provenance.serialization.RecordReader; public class StandardRecordReader implements RecordReader { diff --git a/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/StandardRecordWriter.java b/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/StandardRecordWriter.java index a70af9be50..df93084669 100644 --- a/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/StandardRecordWriter.java +++ b/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/StandardRecordWriter.java @@ -25,9 +25,9 @@ import java.util.UUID; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.ByteCountingOutputStream; -import org.apache.nifi.io.DataOutputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.ByteCountingOutputStream; +import org.apache.nifi.stream.io.DataOutputStream; import org.apache.nifi.provenance.serialization.RecordWriter; public class StandardRecordWriter implements RecordWriter { diff --git a/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/rollover/CompressionAction.java b/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/rollover/CompressionAction.java index 0f5e9ce91c..d014618fdf 100644 --- a/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/rollover/CompressionAction.java +++ b/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/rollover/CompressionAction.java @@ -22,8 +22,8 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; -import org.apache.nifi.io.GZIPOutputStream; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.GZIPOutputStream; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.provenance.lucene.IndexingAction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/serialization/RecordReaders.java b/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/serialization/RecordReaders.java index 198e0187a5..f902b9275f 100644 --- a/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/serialization/RecordReaders.java +++ b/nar-bundles/persistent-provenance-repository-bundle/persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/serialization/RecordReaders.java @@ -26,7 +26,7 @@ import java.nio.file.Path; import java.util.Collection; import java.util.zip.GZIPInputStream; -import org.apache.nifi.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedInputStream; import org.apache.nifi.provenance.StandardRecordReader; import org.apache.nifi.provenance.lucene.LuceneUtil; diff --git a/nar-bundles/pom.xml b/nar-bundles/pom.xml index 01f7207bca..4985cdc16a 100644 --- a/nar-bundles/pom.xml +++ b/nar-bundles/pom.xml @@ -97,25 +97,25 @@ org.apache.nifi nifi-api - [0.0.1-SNAPSHOT,1.0.0-SNAPSHOT) + ${project.version} provided org.apache.nifi nifi-runtime - [0.0.1-SNAPSHOT,1.0.0-SNAPSHOT) + ${project.version} provided org.apache.nifi nifi-nar - [0.0.1-SNAPSHOT,1.0.0-SNAPSHOT) + ${project.version} provided org.apache.nifi nifi-properties - [0.0.1-SNAPSHOT,1.0.0-SNAPSHOT) + ${project.version} provided diff --git a/nar-bundles/standard-bundle/jms-processors/pom.xml b/nar-bundles/standard-bundle/jms-processors/pom.xml index 7dae21d15f..6e8e37938f 100644 --- a/nar-bundles/standard-bundle/jms-processors/pom.xml +++ b/nar-bundles/standard-bundle/jms-processors/pom.xml @@ -36,7 +36,7 @@ org.apache.nifi - nifi-stream-utils + nifi-utils javax.jms @@ -46,10 +46,6 @@ org.apache.activemq activemq-client - - org.hornetq - hornetq-jms-client - org.apache.nifi nifi-mock diff --git a/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/JmsConsumer.java b/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/JmsConsumer.java index 29e62c6b10..24756c497c 100644 --- a/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/JmsConsumer.java +++ b/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/JmsConsumer.java @@ -45,7 +45,7 @@ import javax.jms.MessageConsumer; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.BufferedOutputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/PutJMS.java b/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/PutJMS.java index 3aae5cdf49..062423897b 100644 --- a/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/PutJMS.java +++ b/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/PutJMS.java @@ -71,7 +71,7 @@ import javax.jms.StreamMessage; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.DataUnit; diff --git a/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/util/JmsFactory.java b/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/util/JmsFactory.java index 1f492e8e34..f425f3ab93 100644 --- a/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/util/JmsFactory.java +++ b/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/util/JmsFactory.java @@ -25,7 +25,6 @@ import static org.apache.nifi.processors.jms.util.JmsProperties.DESTINATION_TYPE import static org.apache.nifi.processors.jms.util.JmsProperties.DESTINATION_TYPE_QUEUE; import static org.apache.nifi.processors.jms.util.JmsProperties.DESTINATION_TYPE_TOPIC; import static org.apache.nifi.processors.jms.util.JmsProperties.DURABLE_SUBSCRIPTION; -import static org.apache.nifi.processors.jms.util.JmsProperties.HORNETQ_PROVIDER; import static org.apache.nifi.processors.jms.util.JmsProperties.JMS_PROVIDER; import static org.apache.nifi.processors.jms.util.JmsProperties.MESSAGE_SELECTOR; import static org.apache.nifi.processors.jms.util.JmsProperties.PASSWORD; @@ -35,8 +34,6 @@ import static org.apache.nifi.processors.jms.util.JmsProperties.USERNAME; import java.io.IOException; import java.io.ObjectOutputStream; -import java.net.URI; -import java.net.URISyntaxException; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; @@ -60,17 +57,12 @@ import javax.jms.StreamMessage; import javax.jms.TextMessage; import javax.jms.Topic; -import org.apache.nifi.io.ByteArrayOutputStream; +import org.apache.nifi.stream.io.ByteArrayOutputStream; import org.apache.nifi.processor.ProcessContext; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; -import org.hornetq.api.core.TransportConfiguration; -import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory; -import org.hornetq.jms.client.HornetQJMSConnectionFactory; -import org.hornetq.jms.client.HornetQQueue; -import org.hornetq.jms.client.HornetQTopic; public class JmsFactory { @@ -341,8 +333,6 @@ public class JmsFactory { public static Queue createQueue(final String jmsProvider, final String queueName) { switch (jmsProvider) { - case HORNETQ_PROVIDER: - return new HornetQQueue(queueName); case ACTIVEMQ_PROVIDER: default: return new ActiveMQQueue(queueName); @@ -352,8 +342,6 @@ public class JmsFactory { private static Topic createTopic(final ProcessContext context) { final String topicName = context.getProperty(DESTINATION_NAME).getValue(); switch (context.getProperty(JMS_PROVIDER).getValue()) { - case HORNETQ_PROVIDER: - return new HornetQTopic(topicName); case ACTIVEMQ_PROVIDER: default: return new ActiveMQTopic(topicName); @@ -374,22 +362,6 @@ public class JmsFactory { factory.setSendTimeout(timeoutMillis); return factory; } - case HORNETQ_PROVIDER: { - final Map params = new HashMap<>(); - - try { - final URI uriObject = new URI(url); - params.put("host", uriObject.getHost()); - params.put("port", uriObject.getPort()); - - final TransportConfiguration transportConfig = new TransportConfiguration(NettyConnectorFactory.class.getName(), params); - final HornetQJMSConnectionFactory factory = new HornetQJMSConnectionFactory(false, transportConfig); - factory.setCallTimeout(timeoutMillis); - return factory; - } catch (final URISyntaxException e) { - return null; // won't happen b/c we already validated the URL - } - } default: throw new IllegalArgumentException("Unknown JMS Provider: " + jmsProvider); } diff --git a/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/util/JmsProperties.java b/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/util/JmsProperties.java index 1a50c4ec08..ac199860fa 100644 --- a/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/util/JmsProperties.java +++ b/nar-bundles/standard-bundle/jms-processors/src/main/java/org/apache/nifi/processors/jms/util/JmsProperties.java @@ -23,7 +23,6 @@ import org.apache.nifi.processor.util.StandardValidators; public class JmsProperties { public static final String ACTIVEMQ_PROVIDER = "ActiveMQ"; - public static final String HORNETQ_PROVIDER = "HornetQ"; public static final String ACK_MODE_CLIENT = "Client Acknowledge"; public static final String ACK_MODE_AUTO = "Auto Acknowledge"; @@ -41,7 +40,7 @@ public class JmsProperties { .name("JMS Provider") .description("The Provider used for the JMS Server") .required(true) - .allowableValues(ACTIVEMQ_PROVIDER, HORNETQ_PROVIDER) + .allowableValues(ACTIVEMQ_PROVIDER) .defaultValue(ACTIVEMQ_PROVIDER) .build(); public static final PropertyDescriptor URL = new PropertyDescriptor.Builder() diff --git a/nar-bundles/standard-bundle/jms-processors/src/main/resources/docs/org.apache.nifi.processors.jms.GetJMSQueue/index.html b/nar-bundles/standard-bundle/jms-processors/src/main/resources/docs/org.apache.nifi.processors.jms.GetJMSQueue/index.html index 58b674d05b..bcbf0dd540 100644 --- a/nar-bundles/standard-bundle/jms-processors/src/main/resources/docs/org.apache.nifi.processors.jms.GetJMSQueue/index.html +++ b/nar-bundles/standard-bundle/jms-processors/src/main/resources/docs/org.apache.nifi.processors.jms.GetJMSQueue/index.html @@ -38,7 +38,6 @@
  • This property specifies the provider used for the JMS server. Available options include:
    • ActiveMQ
    • -
    • HornetQ
  • Default value: ActiveMQ
  • Supports expression language: false
  • diff --git a/nar-bundles/standard-bundle/jms-processors/src/main/resources/docs/org.apache.nifi.processors.jms.GetJMSTopic/index.html b/nar-bundles/standard-bundle/jms-processors/src/main/resources/docs/org.apache.nifi.processors.jms.GetJMSTopic/index.html index 876513d451..3496df8273 100644 --- a/nar-bundles/standard-bundle/jms-processors/src/main/resources/docs/org.apache.nifi.processors.jms.GetJMSTopic/index.html +++ b/nar-bundles/standard-bundle/jms-processors/src/main/resources/docs/org.apache.nifi.processors.jms.GetJMSTopic/index.html @@ -38,7 +38,6 @@
  • This property specifies the provider used for the JMS server. Available options include:
    • ActiveMQ
    • -
    • HornetQ
  • Supports expression language: false
  • diff --git a/nar-bundles/standard-bundle/jms-processors/src/main/resources/docs/org.apache.nifi.processors.jms.PutJMS/index.html b/nar-bundles/standard-bundle/jms-processors/src/main/resources/docs/org.apache.nifi.processors.jms.PutJMS/index.html index 52f2e1fd23..387d03c9b5 100644 --- a/nar-bundles/standard-bundle/jms-processors/src/main/resources/docs/org.apache.nifi.processors.jms.PutJMS/index.html +++ b/nar-bundles/standard-bundle/jms-processors/src/main/resources/docs/org.apache.nifi.processors.jms.PutJMS/index.html @@ -38,7 +38,6 @@
  • This property specifies the provider used for the JMS server. Available options include:
    • ActiveMQ
    • -
    • HornetQ
  • Default value: ActiveMQ
  • Supports expression language: false
  • diff --git a/nar-bundles/standard-bundle/standard-processors/pom.xml b/nar-bundles/standard-bundle/standard-processors/pom.xml index 6e08598aad..f4cd2a0046 100644 --- a/nar-bundles/standard-bundle/standard-processors/pom.xml +++ b/nar-bundles/standard-bundle/standard-processors/pom.xml @@ -37,11 +37,7 @@
    org.apache.nifi - nifi-stream-utils - - - org.apache.nifi - nifi-core-flowfile-attributes + nifi-utils org.apache.nifi @@ -51,14 +47,6 @@ org.apache.nifi flowfile-packager - - org.apache.nifi - naive-search-ring-buffer - - - org.apache.nifi - nifi-search-utils - org.apache.nifi distributed-cache-client-service-api diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/CompressContent.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/CompressContent.java index bc0d230bff..21dfe9364e 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/CompressContent.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/CompressContent.java @@ -35,9 +35,9 @@ import lzma.streams.LzmaOutputStream; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.GZIPOutputStream; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.GZIPOutputStream; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java index 861b51508c..eb079bba06 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java @@ -23,7 +23,7 @@ import org.apache.nifi.processor.ProcessSession; import org.apache.nifi.processor.Relationship; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.annotation.CapabilityDescription; import org.apache.nifi.processor.annotation.EventDriven; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateRegularExpression.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateRegularExpression.java index 704ec33f0e..7697d06657 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateRegularExpression.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateRegularExpression.java @@ -31,7 +31,7 @@ import java.util.regex.Pattern; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.DataUnit; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXPath.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXPath.java index 2f3f34bf11..a1fc86d000 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXPath.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXPath.java @@ -57,8 +57,8 @@ import org.apache.nifi.components.ValidationContext; import org.apache.nifi.components.ValidationResult; import org.apache.nifi.components.Validator; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXQuery.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXQuery.java index d3c13470cc..8b4ce09bc6 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXQuery.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXQuery.java @@ -54,8 +54,8 @@ import org.apache.nifi.components.ValidationContext; import org.apache.nifi.components.ValidationResult; import org.apache.nifi.components.Validator; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteStreamCommand.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteStreamCommand.java index f430199e6b..ab0b2aa262 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteStreamCommand.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteStreamCommand.java @@ -37,9 +37,9 @@ import org.apache.nifi.components.ValidationResult; import org.apache.nifi.components.Validator; import org.apache.nifi.expression.AttributeExpression.ResultType; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/HashContent.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/HashContent.java index d6e454e040..bb715891f2 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/HashContent.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/HashContent.java @@ -30,8 +30,8 @@ import java.util.Set; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.NullOutputStream; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.NullOutputStream; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java index 23786ab510..5e7ce56e03 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java @@ -33,8 +33,8 @@ import javax.ws.rs.Path; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.LeakyBucketStreamThrottler; -import org.apache.nifi.io.StreamThrottler; +import org.apache.nifi.stream.io.LeakyBucketStreamThrottler; +import org.apache.nifi.stream.io.StreamThrottler; import org.apache.nifi.processor.AbstractSessionFactoryProcessor; import org.apache.nifi.processor.DataUnit; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java index 9a932f0954..b6979c6591 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java @@ -46,10 +46,10 @@ import org.apache.nifi.components.ValidationContext; import org.apache.nifi.components.ValidationResult; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.NonCloseableOutputStream; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.NonCloseableOutputStream; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractSessionFactoryProcessor; import org.apache.nifi.processor.DataUnit; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ModifyBytes.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ModifyBytes.java index 473e3bb35f..a8b190d1ef 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ModifyBytes.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ModifyBytes.java @@ -27,7 +27,7 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.DataUnit; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java index 9e87c6862d..14f8a28cf8 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java @@ -47,12 +47,12 @@ import org.apache.nifi.components.ValidationContext; import org.apache.nifi.components.ValidationResult; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.GZIPOutputStream; -import org.apache.nifi.io.LeakyBucketStreamThrottler; -import org.apache.nifi.io.StreamThrottler; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.GZIPOutputStream; +import org.apache.nifi.stream.io.LeakyBucketStreamThrottler; +import org.apache.nifi.stream.io.StreamThrottler; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.DataUnit; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFileTransfer.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFileTransfer.java index 9b99df2fc7..31e5105e9d 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFileTransfer.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFileTransfer.java @@ -18,7 +18,7 @@ package org.apache.nifi.processors.standard; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedInputStream; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceText.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceText.java index e5e46fdd29..ae5350b50b 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceText.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceText.java @@ -28,7 +28,7 @@ import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.components.Validator; import org.apache.nifi.expression.AttributeValueDecorator; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.annotation.CapabilityDescription; import org.apache.nifi.processor.annotation.EventDriven; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceTextWithMapping.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceTextWithMapping.java index 0cce0f2b2b..c99935bc1b 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceTextWithMapping.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceTextWithMapping.java @@ -44,7 +44,7 @@ import org.apache.nifi.components.ValidationContext; import org.apache.nifi.components.ValidationResult; import org.apache.nifi.expression.AttributeValueDecorator; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.DataUnit; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteOnContent.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteOnContent.java index 7446a0d09e..cb3cff28e7 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteOnContent.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteOnContent.java @@ -32,7 +32,7 @@ import java.util.regex.Pattern; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.expression.AttributeValueDecorator; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.DataUnit; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java index 90f3ea1ccb..df13c667f7 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java @@ -34,8 +34,8 @@ import java.util.regex.Pattern; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.LastModifiedMonitor; -import org.apache.nifi.io.SynchronousFileWatcher; +import org.apache.nifi.util.file.monitor.LastModifiedMonitor; +import org.apache.nifi.util.file.monitor.SynchronousFileWatcher; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanContent.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanContent.java index bdf8fa974c..9f534695f7 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanContent.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanContent.java @@ -36,9 +36,9 @@ import java.util.concurrent.locks.ReentrantLock; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.LastModifiedMonitor; -import org.apache.nifi.io.SynchronousFileWatcher; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.util.file.monitor.LastModifiedMonitor; +import org.apache.nifi.util.file.monitor.SynchronousFileWatcher; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitContent.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitContent.java index fd8be1707e..7e67c01f41 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitContent.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitContent.java @@ -34,7 +34,7 @@ import org.apache.nifi.components.ValidationResult; import org.apache.nifi.components.Validator; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedInputStream; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitText.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitText.java index 6866c35fc9..8520a55c7c 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitText.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitText.java @@ -19,10 +19,10 @@ package org.apache.nifi.processors.standard; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.ByteArrayOutputStream; -import org.apache.nifi.io.ByteCountingInputStream; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.ByteArrayOutputStream; +import org.apache.nifi.stream.io.ByteCountingInputStream; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java index 5f0993f458..1919dbe4b3 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java @@ -31,7 +31,7 @@ import javax.xml.parsers.SAXParserFactory; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedInputStream; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/TransformXml.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/TransformXml.java index 777479e78d..738591814c 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/TransformXml.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/TransformXml.java @@ -39,7 +39,7 @@ import org.apache.nifi.components.ValidationResult; import org.apache.nifi.components.Validator; import org.apache.nifi.expression.AttributeExpression; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedInputStream; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java index f976bdbe1e..dc6daea3b0 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java @@ -33,9 +33,9 @@ import java.util.UUID; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.StreamUtils; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.StreamUtils; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/servlets/ListenHTTPServlet.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/servlets/ListenHTTPServlet.java index d78c139c57..fb52b80734 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/servlets/ListenHTTPServlet.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/servlets/ListenHTTPServlet.java @@ -44,8 +44,8 @@ import javax.ws.rs.core.MediaType; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.BufferedOutputStream; -import org.apache.nifi.io.StreamThrottler; +import org.apache.nifi.stream.io.BufferedOutputStream; +import org.apache.nifi.stream.io.StreamThrottler; import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.ProcessSession; import org.apache.nifi.processor.ProcessSessionFactory; diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/util/UDPStreamConsumer.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/util/UDPStreamConsumer.java index f0802a8fc7..ad2cca515c 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/util/UDPStreamConsumer.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/util/UDPStreamConsumer.java @@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.nifi.flowfile.FlowFile; -import org.apache.nifi.io.BufferedOutputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; import org.apache.nifi.io.nio.BufferPool; import org.apache.nifi.io.nio.consumer.StreamConsumer; import org.apache.nifi.logging.ProcessorLog; diff --git a/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestMergeContent.java b/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestMergeContent.java index 676b5865e0..d3ad30eccd 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestMergeContent.java +++ b/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestMergeContent.java @@ -16,7 +16,6 @@ */ package org.apache.nifi.processors.standard; -import org.apache.nifi.processors.standard.MergeContent; import static org.junit.Assert.assertEquals; import java.io.IOException; @@ -32,7 +31,7 @@ import java.util.Set; import java.util.zip.ZipInputStream; import org.apache.nifi.flowfile.attributes.CoreAttributes; -import org.apache.nifi.io.ByteArrayInputStream; +import org.apache.nifi.stream.io.ByteArrayInputStream; import org.apache.nifi.util.MockFlowFile; import org.apache.nifi.util.TestRunner; import org.apache.nifi.util.TestRunners; diff --git a/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java b/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java index 9079f82101..8c368457f4 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java +++ b/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java @@ -23,10 +23,8 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.apache.nifi.io.ByteArrayOutputStream; +import org.apache.nifi.stream.io.ByteArrayOutputStream; import org.apache.nifi.util.MockFlowFile; import org.apache.nifi.util.TestRunner; import org.apache.nifi.util.TestRunners; diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/pom.xml b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/pom.xml index a251393f86..22d7c5bd9c 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/pom.xml +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/pom.xml @@ -40,17 +40,13 @@ org.apache.nifi distributed-cache-protocol - - org.apache.nifi - remote-communications-utils - org.apache.nifi nifi-processor-utils org.apache.nifi - nifi-stream-utils + nifi-utils org.apache.nifi diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java index 4a67864319..a0998f63b7 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java @@ -30,8 +30,8 @@ import org.apache.nifi.controller.ConfigurationContext; import org.apache.nifi.controller.annotation.OnConfigured; import org.apache.nifi.distributed.cache.protocol.ProtocolHandshake; import org.apache.nifi.distributed.cache.protocol.exception.HandshakeException; -import org.apache.nifi.io.ByteArrayOutputStream; -import org.apache.nifi.io.DataOutputStream; +import org.apache.nifi.stream.io.ByteArrayOutputStream; +import org.apache.nifi.stream.io.DataOutputStream; import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.remote.StandardVersionNegotiator; import org.apache.nifi.remote.VersionNegotiator; diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java index c5882494e7..e58e972a66 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java @@ -30,8 +30,8 @@ import org.apache.nifi.controller.ConfigurationContext; import org.apache.nifi.controller.annotation.OnConfigured; import org.apache.nifi.distributed.cache.protocol.ProtocolHandshake; import org.apache.nifi.distributed.cache.protocol.exception.HandshakeException; -import org.apache.nifi.io.ByteArrayOutputStream; -import org.apache.nifi.io.DataOutputStream; +import org.apache.nifi.stream.io.ByteArrayOutputStream; +import org.apache.nifi.stream.io.DataOutputStream; import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.remote.StandardVersionNegotiator; import org.apache.nifi.remote.VersionNegotiator; diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/SSLCommsSession.java b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/SSLCommsSession.java index c8be082fac..9b4b656063 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/SSLCommsSession.java +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/SSLCommsSession.java @@ -23,8 +23,8 @@ import java.util.concurrent.TimeUnit; import javax.net.ssl.SSLContext; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; import org.apache.nifi.remote.io.socket.ssl.SSLSocketChannel; import org.apache.nifi.remote.io.socket.ssl.SSLSocketChannelInputStream; import org.apache.nifi.remote.io.socket.ssl.SSLSocketChannelOutputStream; diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/StandardCommsSession.java b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/StandardCommsSession.java index bbe2917e9f..1f1ff7e48a 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/StandardCommsSession.java +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/StandardCommsSession.java @@ -25,8 +25,8 @@ import java.util.concurrent.TimeUnit; import javax.net.ssl.SSLContext; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; import org.apache.nifi.remote.io.InterruptableInputStream; import org.apache.nifi.remote.io.InterruptableOutputStream; import org.apache.nifi.remote.io.socket.SocketChannelInputStream; diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-protocol/pom.xml b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-protocol/pom.xml index f6362616b7..99ba060d09 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-protocol/pom.xml +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-protocol/pom.xml @@ -32,7 +32,7 @@ org.apache.nifi - remote-communications-utils + nifi-utils diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/pom.xml b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/pom.xml index ca96d82281..0e14a57f3d 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/pom.xml +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/pom.xml @@ -37,16 +37,12 @@ org.apache.nifi - remote-communications-utils + nifi-utils org.apache.nifi nifi-processor-utils - - org.apache.nifi - nifi-stream-utils - org.apache.nifi ssl-context-service-api diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/AbstractCacheServer.java b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/AbstractCacheServer.java index 9b4e70ef3b..a9643abd9b 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/AbstractCacheServer.java +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/AbstractCacheServer.java @@ -30,8 +30,8 @@ import javax.net.ssl.SSLContext; import org.apache.nifi.distributed.cache.protocol.ProtocolHandshake; import org.apache.nifi.distributed.cache.protocol.exception.HandshakeException; -import org.apache.nifi.io.BufferedInputStream; -import org.apache.nifi.io.BufferedOutputStream; +import org.apache.nifi.stream.io.BufferedInputStream; +import org.apache.nifi.stream.io.BufferedOutputStream; import org.apache.nifi.remote.StandardVersionNegotiator; import org.apache.nifi.remote.VersionNegotiator; import org.apache.nifi.remote.io.socket.SocketChannelInputStream; diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/SetCacheServer.java b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/SetCacheServer.java index 5d2c0f6248..d0abe5cdcc 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/SetCacheServer.java +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/SetCacheServer.java @@ -29,7 +29,7 @@ import org.apache.nifi.distributed.cache.server.set.PersistentSetCache; import org.apache.nifi.distributed.cache.server.set.SetCache; import org.apache.nifi.distributed.cache.server.set.SetCacheResult; import org.apache.nifi.distributed.cache.server.set.SimpleSetCache; -import org.apache.nifi.io.DataOutputStream; +import org.apache.nifi.stream.io.DataOutputStream; public class SetCacheServer extends AbstractCacheServer { diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/map/MapCacheServer.java b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/map/MapCacheServer.java index 3e8dd0e248..e4a600e3fe 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/map/MapCacheServer.java +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/map/MapCacheServer.java @@ -27,7 +27,7 @@ import javax.net.ssl.SSLContext; import org.apache.nifi.distributed.cache.server.AbstractCacheServer; import org.apache.nifi.distributed.cache.server.EvictionPolicy; -import org.apache.nifi.io.DataOutputStream; +import org.apache.nifi.stream.io.DataOutputStream; public class MapCacheServer extends AbstractCacheServer { diff --git a/nar-bundles/update-attribute-bundle/processor/pom.xml b/nar-bundles/update-attribute-bundle/processor/pom.xml index 5167de6ed5..edef6692e1 100644 --- a/nar-bundles/update-attribute-bundle/processor/pom.xml +++ b/nar-bundles/update-attribute-bundle/processor/pom.xml @@ -43,7 +43,7 @@ org.apache.nifi - nifi-core-flowfile-attributes + nifi-utils org.apache.nifi diff --git a/nar-maven-plugin/pom.xml b/nar-maven-plugin/pom.xml index 26b6a1144f..c63f272ac8 100644 --- a/nar-maven-plugin/pom.xml +++ b/nar-maven-plugin/pom.xml @@ -20,6 +20,7 @@ org.apache apache 16 + org.apache.nifi nar-maven-plugin @@ -67,6 +68,9 @@ https://issues.apache.org/jira/browse/NIFI + 1.7 + 1.7 + 3.0.5 UTF-8 UTF-8 @@ -78,11 +82,8 @@ maven-compiler-plugin 3.2 - 1.7 - 1.7 true true - UTF-8 true true @@ -185,6 +186,32 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-maven + + enforce + + + + + + org.apache.maven.plugins:maven-surefire-plugin + org.apache.maven.plugins:maven-failsafe-plugin + org.apache.maven.plugins:maven-surefire-report-plugin + + + + ${maven.version} + + + + + + diff --git a/nifi-api/src/main/java/org/apache/nifi/authorization/AuthorityProvider.java b/nifi-api/src/main/java/org/apache/nifi/authorization/AuthorityProvider.java index cd96a993de..7754c3502a 100644 --- a/nifi-api/src/main/java/org/apache/nifi/authorization/AuthorityProvider.java +++ b/nifi-api/src/main/java/org/apache/nifi/authorization/AuthorityProvider.java @@ -16,6 +16,8 @@ */ package org.apache.nifi.authorization; +import java.util.List; +import java.util.Map; import java.util.Set; import org.apache.nifi.authorization.exception.AuthorityAccessException; import org.apache.nifi.authorization.exception.IdentityAlreadyExistsException; @@ -136,6 +138,23 @@ public interface AuthorityProvider { */ void ungroup(String group) throws AuthorityAccessException; + /** + * Determines whether the user in the specified dnChain should be able to + * 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 + * 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 + * request. + * + * @param dnChain + * @param attributes + * @return + * @throws UnknownIdentityException + * @throws AuthorityAccessException + */ + DownloadAuthorization authorizeDownload(List dnChain, Map attributes) throws UnknownIdentityException, AuthorityAccessException; + /** * Called immediately after instance creation for implementers to perform * additional setup diff --git a/nifi-api/src/main/java/org/apache/nifi/authorization/DownloadAuthorization.java b/nifi-api/src/main/java/org/apache/nifi/authorization/DownloadAuthorization.java new file mode 100644 index 0000000000..08695fa91e --- /dev/null +++ b/nifi-api/src/main/java/org/apache/nifi/authorization/DownloadAuthorization.java @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.authorization; + +/** + * Represents a decision whether authorization is granted to download content. + */ +public class DownloadAuthorization { + + private static enum Result { + Approved, + Denied; + }; + + private static final DownloadAuthorization APPROVED = new DownloadAuthorization(Result.Approved, null); + + private final Result result; + private final String explanation; + + /** + * Creates a new DownloadAuthorization with the specified result and explanation. + * + * @param result + * @param explanation + */ + private DownloadAuthorization(Result result, String explanation) { + if (Result.Denied.equals(result) && explanation == null) { + throw new IllegalArgumentException("An explanation is required when the download request is denied."); + } + + this.result = result; + this.explanation = explanation; + } + + /** + * Whether or not the download request is approved. + * + * @return + */ + public boolean isApproved() { + return Result.Approved.equals(result); + } + + /** + * If the download request is denied, the reason why. Null otherwise. + * + * @return + */ + public String getExplanation() { + return explanation; + } + + /** + * Creates a new approved DownloadAuthorization. + * + * @return + */ + public static DownloadAuthorization approved() { + return APPROVED; + } + + /** + * Creates a new denied DownloadAuthorization with the specified explanation. + * + * @param explanation + * @return + * @throws IllegalArgumentException if explanation is null + */ + public static DownloadAuthorization denied(String explanation) { + return new DownloadAuthorization(Result.Denied, explanation); + } +} diff --git a/nifi-docs/pom.xml b/nifi-docs/pom.xml index 979f1f8901..8785ea1051 100644 --- a/nifi-docs/pom.xml +++ b/nifi-docs/pom.xml @@ -13,31 +13,31 @@ - - org.apache.maven.plugins - maven-resources-plugin - - - copy-asciidoc - generate-resources - - copy-resources - - - - - src/main/asciidoc - - - ${project.build.directory}/asciidoc - - - - + + org.apache.maven.plugins + maven-resources-plugin + + + copy-asciidoc + generate-resources + + copy-resources + + + + + src/main/asciidoc + + + ${project.build.directory}/asciidoc + + + + org.asciidoctor asciidoctor-maven-plugin - 1.5.0 + 1.5.2 output-html @@ -49,13 +49,19 @@ ${project.build.directory}/asciidoc - html + html5 - true + ./images + font + true + ${project.version} + true + + - + true - @@ -71,7 +77,7 @@ - ${project.build.directory}/generated-docs/nifi-user-guide.html + ${project.build.directory}/generated-docs/**.html true DOTALL @@ -99,9 +105,27 @@ $1 + + + maven-assembly-plugin + + true + + + + make shared resource + + single + + package + + + src/main/assembly/dependencies.xml + + + + + - - - diff --git a/nifi-docs/src/main/asciidoc/administration-guide.adoc b/nifi-docs/src/main/asciidoc/administration-guide.adoc new file mode 100644 index 0000000000..d3e1def6fd --- /dev/null +++ b/nifi-docs/src/main/asciidoc/administration-guide.adoc @@ -0,0 +1,34 @@ +// +// 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. +// +NiFi System Administrator's Guide +================================= + +How to install +-------------- +Installation instructions... + +Best Practice Configuration +--------------------------- +The following are things which are good to check... + +Security Configuration +---------------------- +Two-way SSL... + +Controlling Levels of Access +---------------------------- +Within the web-ui .... diff --git a/nifi-docs/src/main/asciidoc/developer-guide.adoc b/nifi-docs/src/main/asciidoc/developer-guide.adoc new file mode 100644 index 0000000000..90e24659fd --- /dev/null +++ b/nifi-docs/src/main/asciidoc/developer-guide.adoc @@ -0,0 +1,43 @@ +// +// 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. +// +NiFi Developer's Guide +====================== + +The designed points of extension +-------------------------------- +Processor, Prioritizer, ... + +The NiFi Archive (NAR) and NiFi Classloading +-------------------------------------------- +A NAR is ... + +How to build extensions +----------------------- +Understanding Nars the first step is... + +Design considerations +--------------------- +The right abstraction ... + +Consider the User Experience +---------------------------- +The user... + +How to contribute to Apache NiFi +-------------------------------- +Git, Maven, ASF processes, NiFi processes, ... + diff --git a/nifi-docs/src/main/asciidoc/overview.adoc b/nifi-docs/src/main/asciidoc/overview.adoc new file mode 100644 index 0000000000..4fbc99bdf0 --- /dev/null +++ b/nifi-docs/src/main/asciidoc/overview.adoc @@ -0,0 +1,31 @@ +// +// 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. +// +NiFi Overview +============= + +The problem NiFi solves +----------------------- +Dataflow at scale... + +The design philosophy of NiFi +----------------------------- +FBP, ... + +Key Features +------------ +UI, compponent-based, high performance, provenance + diff --git a/nifi-docs/src/main/asciidoc/nifi-user-guide.adoc b/nifi-docs/src/main/asciidoc/user-guide.adoc similarity index 99% rename from nifi-docs/src/main/asciidoc/nifi-user-guide.adoc rename to nifi-docs/src/main/asciidoc/user-guide.adoc index 65878df5c6..8d145c240f 100644 --- a/nifi-docs/src/main/asciidoc/nifi-user-guide.adoc +++ b/nifi-docs/src/main/asciidoc/user-guide.adoc @@ -14,12 +14,8 @@ // See the License for the specific language governing permissions and // limitations under the License. // -NiFi User Guide (Draft - Preview Version) -========================================= -Apache_NiFi_Team -:toc: -:icons: - +NiFi User Guide +=============== [template="glossary", id="terminology"] Terminology diff --git a/commons/nifi-stream-utils/pom.xml b/nifi-docs/src/main/assembly/dependencies.xml similarity index 58% rename from commons/nifi-stream-utils/pom.xml rename to nifi-docs/src/main/assembly/dependencies.xml index ae0643621e..94778aa58a 100644 --- a/commons/nifi-stream-utils/pom.xml +++ b/nifi-docs/src/main/assembly/dependencies.xml @@ -13,18 +13,16 @@ See the License for the specific language governing permissions and limitations under the License. --> - - 4.0.0 - - - org.apache.nifi - nifi-commons-parent - 0.0.1-SNAPSHOT - - - nifi-stream-utils - 0.0.1-SNAPSHOT - jar - NiFi Stream Utils - - + + resources + + zip + + false + + + ${project.build.directory}/generated-docs/ + /html/ + + + diff --git a/nifi-mock/pom.xml b/nifi-mock/pom.xml index 2bd53c77fb..c79e6dae2c 100644 --- a/nifi-mock/pom.xml +++ b/nifi-mock/pom.xml @@ -39,10 +39,6 @@ org.apache.nifi nifi-expression-language - - org.apache.nifi - nifi-core-flowfile-attributes - org.apache.nifi data-provenance-utils diff --git a/pom.xml b/pom.xml index 9cccbf4b1a..58831a97ff 100644 --- a/pom.xml +++ b/pom.xml @@ -52,24 +52,29 @@ http://mail-archives.apache.org/mod_mbox/incubator-nifi-commits + - ${maven.min-version} + ${maven.version} - commons + commons nifi-api nifi-bootstrap nifi-mock nar-bundles assembly - nifi-docs - + nifi-docs + scm:git:git://git.apache.org/incubator-nifi.git scm:git:https://git-wip-us.apache.org/repos/asf/incubator-nifi.git @@ -80,6 +85,9 @@ https://issues.apache.org/jira/browse/NIFI + 1.7 + 1.7 + 3.0.5 UTF-8 UTF-8 1.7.8 @@ -132,27 +140,6 @@ ${org.slf4j.version} provided - - org.apache.maven - maven-plugin-api - 2.0.11 - - - org.apache.maven.plugins - maven-dependency-plugin - 2.9 - maven-plugin - - - org.apache.maven.plugins - maven-jar-plugin - 2.5 - - - org.apache.maven.plugin-tools - maven-plugin-annotations - 3.3 - junit junit @@ -248,6 +235,16 @@ org.quartz-scheduler quartz 2.2.1 + + + + c3p0 + c3p0 + + com.sun.jersey.contribs @@ -645,11 +642,6 @@ nifi-web-utils ${project.version} - - org.apache.nifi - nifi-file-utils - ${project.version} - org.apache.nifi nifi-expression-language @@ -660,26 +652,11 @@ custom-ui-utilities ${project.version} - - org.apache.nifi - nifi-core-flowfile-attributes - ${project.version} - org.apache.nifi flowfile-packager ${project.version} - - org.apache.nifi - naive-search-ring-buffer - ${project.version} - - - org.apache.nifi - nifi-search-utils - ${project.version} - org.apache.nifi nifi-socket-utils @@ -708,6 +685,14 @@ provided zip + + org.apache.nifi + nifi-docs + ${project.version} + resources + provided + zip + org.apache.nifi nifi-framework-nar @@ -780,11 +765,6 @@ ${project.version} nar - - org.apache.nifi - nifi-stream-utils - ${project.version} - org.apache.nifi nifi-properties @@ -810,11 +790,6 @@ nifi-processor-utils ${project.version} - - org.apache.nifi - remote-communications-utils - ${project.version} - org.apache.nifi nifi-mock @@ -853,28 +828,17 @@ maven-compiler-plugin 3.2 - 1.7 - 1.7 true true - UTF-8 true true - maven-jar-plugin - 2.5 - - + org.apache.maven.plugins maven-war-plugin 2.5 - - org.apache.maven.plugins - maven-plugin-plugin - 3.3 - org.apache.maven.plugins maven-dependency-plugin @@ -902,11 +866,6 @@ gnu - - org.apache.maven.plugins - maven-release-plugin - 2.5.1 - org.codehaus.mojo jaxb2-maven-plugin @@ -950,6 +909,32 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-maven + + enforce + + + + + + org.apache.maven.plugins:maven-surefire-plugin + org.apache.maven.plugins:maven-failsafe-plugin + org.apache.maven.plugins:maven-surefire-report-plugin + + + + ${maven.version} + + + + + + org.apache.nifi nar-maven-plugin @@ -958,4 +943,4 @@ - \ No newline at end of file +