incubator-nifi git commit: NIFI-768 staging changes needed for website in prep for move to TLP site. Still need to update some links once git and svn move.
Repository: incubator-nifi Updated Branches: refs/heads/develop ec6be9eaa - 003446248 NIFI-768 staging changes needed for website in prep for move to TLP site. Still need to update some links once git and svn move. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/00344624 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/00344624 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/00344624 Branch: refs/heads/develop Commit: 00344624855f0ed215857a01593c397dd39d99ec Parents: ec6be9e Author: joewitt joew...@apache.org Authored: Thu Jul 16 08:04:58 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jul 16 08:04:58 2015 -0400 -- nifi-site/src/images/egg-logo.png | Bin 8626 - 0 bytes nifi-site/src/includes/disclaimer.hbs | 20 +-- nifi-site/src/includes/topbar.hbs | 2 +- nifi-site/src/pages/html/download.hbs | 2 +- nifi-site/src/pages/html/mailing_lists.hbs | 26 ++-- nifi-site/src/pages/markdown/licensing-guide.md | 5 +- nifi-site/src/pages/markdown/quickstart.md | 10 +- nifi-site/src/pages/markdown/release-guide.md | 145 +-- 8 files changed, 64 insertions(+), 146 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/00344624/nifi-site/src/images/egg-logo.png -- diff --git a/nifi-site/src/images/egg-logo.png b/nifi-site/src/images/egg-logo.png deleted file mode 100644 index c04e70d..000 Binary files a/nifi-site/src/images/egg-logo.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/00344624/nifi-site/src/includes/disclaimer.hbs -- diff --git a/nifi-site/src/includes/disclaimer.hbs b/nifi-site/src/includes/disclaimer.hbs index ce21060..788b211 100644 --- a/nifi-site/src/includes/disclaimer.hbs +++ b/nifi-site/src/includes/disclaimer.hbs @@ -1,27 +1,13 @@ div class=row div class=large-12 columns footer -div class=disclaimer -p -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. -/p -/div a href=http://www.apache.org; img id=asf-logo alt=Apache Software Foundation src=images/feather-small.gif /a -a href=http://incubator.apache.org/; -img id=incubator-logo alt=Apache Incubator src=images/egg-logo.png -/a - div id=copyright -pCopyright #169; 2014 The Apache Software Foundation, Licensed under the a +pCopyright #169; 2015 The Apache Software Foundation, Licensed under the a href=http://www.apache.org/licenses/LICENSE-2.0;Apache License, Version 2.0/a.br/Apache, the -Apache feather logo, and the Apache Incubator project logo are trademarks of The Apache Software +Apache feather logo, NiFi, Apache NiFi and the project logo are trademarks of The Apache Software Foundation./p /div /div -/div \ No newline at end of file +/div http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/00344624/nifi-site/src/includes/topbar.hbs -- diff --git a/nifi-site/src/includes/topbar.hbs b/nifi-site/src/includes/topbar.hbs index 7010ac0..f1125fb 100644 --- a/nifi-site/src/includes/topbar.hbs +++ b/nifi-site/src/includes/topbar.hbs @@ -53,7 +53,7 @@ lia href=release-guide.htmlRelease Guide/a/li lia href=licensing-guide.htmlLicensing Guide/a/li lia href=developer-guide.htmlDeveloper Guide/a/li -lia href=https://git-wip-us.apache.org/repos/asf/incubator-nifi.git;i class=fa fa-external-link external-link/iSource/a/li +lia href=https://git-wip-us.apache.org/repos/asf/nifi.git;i class=fa fa-external-link external-link/iSource/a/li lia href=https://issues.apache.org/jira/browse/NIFI;i class=fa fa-external-link external-link/iIssues/a/li
[1/2] incubator-nifi git commit: NIFI-751 Add Processor To Convert Avro Formats
Repository: incubator-nifi Updated Branches: refs/heads/develop 8bd20510e - 8ff69ca2d NIFI-751 Add Processor To Convert Avro Formats Implemented a new NiFi processor that allows avro records to be converted from one Avro schema to another. This supports.. * Flattening records using . notation like parent.id * Simple type conversions to String or base primitive types. * Specifying field renames using dynamic properties. Signed-off-by: joewitt joew...@apache.org Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/bb64e70e Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/bb64e70e Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/bb64e70e Branch: refs/heads/develop Commit: bb64e70e6fbda12a9e0388b5c2240d96d34ac6bf Parents: 8bd2051 Author: Alan Jackoway al...@cloudera.com Authored: Tue Jul 7 17:28:26 2015 -0400 Committer: joewitt joew...@apache.org Committed: Tue Jul 14 07:22:34 2015 -0400 -- .../processors/kite/AvroRecordConverter.java| 320 + .../nifi/processors/kite/ConvertAvroSchema.java | 339 +++ .../org.apache.nifi.processor.Processor | 1 + .../additionalDetails.html | 142 .../kite/TestAvroRecordConverter.java | 201 +++ .../processors/kite/TestConvertAvroSchema.java | 216 6 files changed, 1219 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bb64e70e/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AvroRecordConverter.java -- diff --git a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AvroRecordConverter.java b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AvroRecordConverter.java new file mode 100644 index 000..68e6c98 --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AvroRecordConverter.java @@ -0,0 +1,320 @@ +/* + * 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.processors.kite; + +import java.io.IOException; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Scanner; + +import org.apache.avro.Schema; +import org.apache.avro.Schema.Field; +import org.apache.avro.generic.GenericData.Record; +import org.apache.avro.generic.IndexedRecord; + +import com.google.common.base.Preconditions; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; + +/** + * Responsible for converting records of one Avro type to another. Supports + * syntax like record.field to unpack fields and will try to do simple type + * conversion. + */ +public class AvroRecordConverter { +private final Schema inputSchema; +private final Schema outputSchema; +// Store this from output field to input field so we can look up by output. +private final MapString, String fieldMapping; + +/** + * @param inputSchema + *Schema of input record objects + * @param outputSchema + *Schema of output record objects + * @param fieldMapping + *Map from field name in input record to field name in output + *record. + */ +public AvroRecordConverter(Schema inputSchema, Schema outputSchema, +MapString, String fieldMapping) { +this.inputSchema = inputSchema; +this.outputSchema = outputSchema; +// Need to reverse this map. +this.fieldMapping = Maps +.newHashMapWithExpectedSize(fieldMapping.size()); +for (Map.EntryString, String entry : fieldMapping.entrySet()) { +this.fieldMapping.put(entry.getValue(), entry.getKey()); +} +} + +/** + * @return Any fields in the output schema that are not mapped
[2/2] incubator-nifi git commit: NIFI-751 PR #70 removed extraneous reference to abstract properties pulling in hadoop conf
NIFI-751 PR #70 removed extraneous reference to abstract properties pulling in hadoop conf Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8ff69ca2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8ff69ca2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8ff69ca2 Branch: refs/heads/develop Commit: 8ff69ca2d1bc5b7d651b7495f2ce45def12bebc2 Parents: bb64e70 Author: joewitt joew...@apache.org Authored: Tue Jul 14 07:41:07 2015 -0400 Committer: joewitt joew...@apache.org Committed: Tue Jul 14 07:41:07 2015 -0400 -- .../java/org/apache/nifi/processors/kite/ConvertAvroSchema.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8ff69ca2/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertAvroSchema.java -- diff --git a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertAvroSchema.java b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertAvroSchema.java index 0d9f658..daeb548 100644 --- a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertAvroSchema.java +++ b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertAvroSchema.java @@ -140,7 +140,7 @@ public class ConvertAvroSchema extends AbstractKiteProcessor { private static final ListPropertyDescriptor PROPERTIES = ImmutableList .PropertyDescriptor builder() -.addAll(AbstractKiteProcessor.getProperties()).add(INPUT_SCHEMA) +.add(INPUT_SCHEMA) .add(OUTPUT_SCHEMA).build(); private static final SetRelationship RELATIONSHIPS = ImmutableSet
incubator-nifi git commit: This closes #69 NIFI-738
Repository: incubator-nifi Updated Branches: refs/heads/develop 2e32e0e2b - 50215707f This closes #69 NIFI-738 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/50215707 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/50215707 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/50215707 Branch: refs/heads/develop Commit: 50215707f7e4ab2207041ed1e31e7ba2d88de7b4 Parents: 2e32e0e Author: joewitt joew...@apache.org Authored: Mon Jun 29 22:16:44 2015 -0400 Committer: joewitt joew...@apache.org Committed: Mon Jun 29 22:16:44 2015 -0400 -- --
incubator-nifi git commit: NIFI-738: Improve error handling for CSV and JSON conversion.
Repository: incubator-nifi Updated Branches: refs/heads/develop 4dc2ea6d4 - 2e32e0e2b NIFI-738: Improve error handling for CSV and JSON conversion. Changes: * Send bad record information on the incompatible relationship * Use an attribute, errors for summarized error messages * Send no error content for now, original content can't be accessed * Summarize similar error messages with N similar failures * Add similar error handling to CSV conversion Signed-off-by: joewitt joew...@apache.org Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/2e32e0e2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/2e32e0e2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/2e32e0e2 Branch: refs/heads/develop Commit: 2e32e0e2b82e071734919589ed680513edfd39ed Parents: 4dc2ea6 Author: Ryan Blue b...@apache.org Authored: Sat Jun 27 17:36:42 2015 -0700 Committer: joewitt joew...@apache.org Committed: Mon Jun 29 22:00:22 2015 -0400 -- .../nifi/processors/kite/ConvertCSVToAvro.java | 76 ++ .../nifi/processors/kite/ConvertJSONToAvro.java | 95 ++--- .../nifi/processors/kite/FailureTracker.java| 83 +++ .../processors/kite/TestCSVToAvroProcessor.java | 96 +- .../kite/TestJSONToAvroProcessor.java | 101 +-- 5 files changed, 384 insertions(+), 67 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2e32e0e2/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertCSVToAvro.java -- diff --git a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertCSVToAvro.java b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertCSVToAvro.java index 564a203..6c20a8f 100644 --- a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertCSVToAvro.java +++ b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertCSVToAvro.java @@ -44,6 +44,7 @@ import org.apache.nifi.processor.Relationship; import org.apache.nifi.processor.exception.ProcessException; import org.apache.nifi.processor.io.StreamCallback; import org.apache.nifi.processor.util.StandardValidators; +import org.apache.nifi.util.LongHolder; import org.kitesdk.data.DatasetException; import org.kitesdk.data.DatasetIOException; import org.kitesdk.data.DatasetRecordException; @@ -76,12 +77,17 @@ public class ConvertCSVToAvro extends AbstractKiteProcessor { private static final Relationship SUCCESS = new Relationship.Builder() .name(success) -.description(FlowFile content has been successfully saved) +.description(Avro content that was converted successfully from CSV) .build(); private static final Relationship FAILURE = new Relationship.Builder() .name(failure) -.description(FlowFile content could not be processed) +.description(CSV content that could not be processed) +.build(); + +private static final Relationship INCOMPATIBLE = new Relationship.Builder() +.name(incompatible) +.description(CSV content that could not be converted) .build(); @VisibleForTesting @@ -164,6 +170,7 @@ public class ConvertCSVToAvro extends AbstractKiteProcessor { = ImmutableSet.Relationshipbuilder() .add(SUCCESS) .add(FAILURE) +.add(INCOMPATIBLE) .build(); // Immutable configuration @@ -197,20 +204,20 @@ public class ConvertCSVToAvro extends AbstractKiteProcessor { @Override public void onTrigger(ProcessContext context, final ProcessSession session) throws ProcessException { -FlowFile flowFile = session.get(); -if (flowFile == null) { +FlowFile incomingCSV = session.get(); +if (incomingCSV == null) { return; } String schemaProperty = context.getProperty(SCHEMA) -.evaluateAttributeExpressions(flowFile) +.evaluateAttributeExpressions(incomingCSV) .getValue(); final Schema schema; try { schema = getSchema(schemaProperty, DefaultConfiguration.get()); } catch (SchemaNotFoundException e) { getLogger().error(Cannot find schema: + schemaProperty); -session.transfer(flowFile, FAILURE); +session.transfer(incomingCSV, FAILURE); return
incubator-nifi git commit: NIFI-632 fixed versioning issue
Repository: incubator-nifi Updated Branches: refs/heads/develop cc3be416b - 8f36ba1ab NIFI-632 fixed versioning issue Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8f36ba1a Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8f36ba1a Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8f36ba1a Branch: refs/heads/develop Commit: 8f36ba1ab417bdd6f6d3c3884e4abf750c5ea226 Parents: cc3be41 Author: joewitt joew...@apache.org Authored: Sat Jun 27 13:45:00 2015 -0400 Committer: joewitt joew...@apache.org Committed: Sat Jun 27 13:45:00 2015 -0400 -- nifi/logs/nifi-app.log | 0 nifi/logs/nifi-bootstrap.log | 6 ++ nifi/logs/nifi-user.log | 0 .../nifi-example-bundle/nifi-nifi-example-nar/pom.xml| 5 ++--- .../nifi-nifi-example-processors/pom.xml | 2 +- nifi/nifi-external/nifi-example-bundle/pom.xml | 11 ++- 6 files changed, 19 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8f36ba1a/nifi/logs/nifi-app.log -- diff --git a/nifi/logs/nifi-app.log b/nifi/logs/nifi-app.log new file mode 100644 index 000..e69de29 http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8f36ba1a/nifi/logs/nifi-bootstrap.log -- diff --git a/nifi/logs/nifi-bootstrap.log b/nifi/logs/nifi-bootstrap.log new file mode 100644 index 000..3d2aba2 --- /dev/null +++ b/nifi/logs/nifi-bootstrap.log @@ -0,0 +1,6 @@ +2015-06-27 13:43:15,941 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi... +2015-06-27 13:43:15,944 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: /development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT +2015-06-27 13:43:15,945 INFO [main] org.apache.nifi.bootstrap.Command Command: /usr/java/latest/bin/java -classpath /development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./conf:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/nifi-runtime-0.2.0-incubating-SNAPSHOT.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/logback-core-1.1.3.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/slf4j-api-1.7.12.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/nifi-api-0.2.0-incubating-SNAPSHOT.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/nifi-properties-0.2.0-incubating-S NAPSHOT.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/log4j-over-slf4j-1.7.12.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/jul-to-slf4j-1.7.12.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/nifi-documentation-0.2.0-incubating-SNAPSHOT.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/jcl-over-slf4j-1.7.12.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/logback-classic-1.1.3.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/nifi-nar-utils-0.2.0-incubating-SNAPSHOT.jar -Djava.net.preferIPv4Stack=true -Dsun.net.http.allowRestrictedHeade rs=true -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m -Dnifi.properties.file.path=/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./conf/nifi.properties -Dnifi.bootstrap.listen.port=59379 -Dapp=NiFi org.apache.nifi.NiFi +2015-06-27 13:43:16,332 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 38812 +2015-06-27 13:44:24,728 INFO [main] org.apache.nifi.bootstrap.Command Apache NiFi has accepted the Shutdown Command and is shutting down now +2015-06-27 13:44:24,758 INFO [main] org.apache.nifi.bootstrap.Command NiFi has finished shutting down. http://git-wip
incubator-nifi git commit: NIFI-632 removed logs dir that showed up - root issue still unknown
Repository: incubator-nifi Updated Branches: refs/heads/develop 8f36ba1ab - e35f348b8 NIFI-632 removed logs dir that showed up - root issue still unknown Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e35f348b Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e35f348b Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e35f348b Branch: refs/heads/develop Commit: e35f348b831f5a27960d0d2dec4787860941fe29 Parents: 8f36ba1 Author: joewitt joew...@apache.org Authored: Sat Jun 27 13:55:33 2015 -0400 Committer: joewitt joew...@apache.org Committed: Sat Jun 27 13:55:33 2015 -0400 -- nifi/logs/nifi-app.log | 0 nifi/logs/nifi-bootstrap.log | 6 -- nifi/logs/nifi-user.log | 0 3 files changed, 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e35f348b/nifi/logs/nifi-app.log -- diff --git a/nifi/logs/nifi-app.log b/nifi/logs/nifi-app.log deleted file mode 100644 index e69de29..000 http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e35f348b/nifi/logs/nifi-bootstrap.log -- diff --git a/nifi/logs/nifi-bootstrap.log b/nifi/logs/nifi-bootstrap.log deleted file mode 100644 index 3d2aba2..000 --- a/nifi/logs/nifi-bootstrap.log +++ /dev/null @@ -1,6 +0,0 @@ -2015-06-27 13:43:15,941 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi... -2015-06-27 13:43:15,944 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: /development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT -2015-06-27 13:43:15,945 INFO [main] org.apache.nifi.bootstrap.Command Command: /usr/java/latest/bin/java -classpath /development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./conf:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/nifi-runtime-0.2.0-incubating-SNAPSHOT.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/logback-core-1.1.3.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/slf4j-api-1.7.12.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/nifi-api-0.2.0-incubating-SNAPSHOT.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/nifi-properties-0.2.0-incubating-S NAPSHOT.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/log4j-over-slf4j-1.7.12.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/jul-to-slf4j-1.7.12.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/nifi-documentation-0.2.0-incubating-SNAPSHOT.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/jcl-over-slf4j-1.7.12.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/logback-classic-1.1.3.jar:/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./lib/nifi-nar-utils-0.2.0-incubating-SNAPSHOT.jar -Djava.net.preferIPv4Stack=true -Dsun.net.http.allowRestrictedHeade rs=true -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m -Dnifi.properties.file.path=/development/git-repo/nifi/nifi-assembly/target/nifi-0.2.0-incubating-SNAPSHOT-bin/nifi-0.2.0-incubating-SNAPSHOT/./conf/nifi.properties -Dnifi.bootstrap.listen.port=59379 -Dapp=NiFi org.apache.nifi.NiFi -2015-06-27 13:43:16,332 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 38812 -2015-06-27 13:44:24,728 INFO [main] org.apache.nifi.bootstrap.Command Apache NiFi has accepted the Shutdown Command and is shutting down now -2015-06-27 13:44:24,758 INFO [main] org.apache.nifi.bootstrap.Command NiFi has finished shutting down. http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e35f348b/nifi/logs/nifi-user.log -- diff --git a/nifi/logs/nifi-user.log b/nifi/logs/nifi-user.log deleted file mode 100644 index e69de29..000
[1/2] incubator-nifi git commit: NIFI-656 performed licensing maintenance and rolled back to hadoop 2.6.0 as 2.7.0 is considered not ready for production
Repository: incubator-nifi Updated Branches: refs/heads/develop 56c173fbd - b9b628dec http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b9b628de/nifi/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service-nar/src/main/resources/META-INF/LICENSE -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service-nar/src/main/resources/META-INF/LICENSE b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service-nar/src/main/resources/META-INF/LICENSE new file mode 100644 index 000..71f8f18 --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service-nar/src/main/resources/META-INF/LICENSE @@ -0,0 +1,239 @@ + + 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,
[2/2] incubator-nifi git commit: NIFI-656 performed licensing maintenance and rolled back to hadoop 2.6.0 as 2.7.0 is considered not ready for production
NIFI-656 performed licensing maintenance and rolled back to hadoop 2.6.0 as 2.7.0 is considered not ready for production Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/b9b628de Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/b9b628de Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/b9b628de Branch: refs/heads/develop Commit: b9b628dece37f76d95278e4481ea6c81fb07cbf1 Parents: 56c173f Author: joewitt joew...@apache.org Authored: Sun Jun 7 03:13:42 2015 -0400 Committer: joewitt joew...@apache.org Committed: Sun Jun 7 03:13:42 2015 -0400 -- nifi/nifi-assembly/LICENSE | 37 ++- nifi/nifi-assembly/NOTICE | 120 -- .../src/main/resources/META-INF/NOTICE | 27 ++- .../src/main/resources/META-INF/NOTICE | 2 +- .../src/main/resources/META-INF/NOTICE | 2 +- .../nifi-hadoop-libraries-nar/pom.xml | 96 .../src/main/resources/META-INF/LICENSE | 28 +++ .../src/main/resources/META-INF/NOTICE | 81 ++- .../src/main/resources/META-INF/LICENSE | 238 ++ .../src/main/resources/META-INF/NOTICE | 2 +- .../src/main/resources/META-INF/LICENSE | 202 .../src/main/resources/META-INF/NOTICE | 2 +- .../src/main/resources/META-INF/NOTICE | 42 .../src/main/resources/META-INF/NOTICE | 24 ++ .../nifi-mongodb-processors/pom.xml | 1 - .../src/main/resources/META-INF/LICENSE | 113 + .../src/main/resources/META-INF/NOTICE | 13 +- .../src/main/resources/META-INF/LICENSE | 2 +- .../src/main/resources/META-INF/NOTICE | 50 +++- .../src/main/resources/META-INF/LICENSE | 239 +++ .../src/main/resources/META-INF/NOTICE | 13 + .../src/main/resources/META-INF/NOTICE | 2 +- .../src/main/resources/META-INF/NOTICE | 2 +- .../src/main/resources/META-INF/NOTICE | 2 +- .../src/main/resources/META-INF/NOTICE | 2 +- nifi/pom.xml| 9 +- 26 files changed, 907 insertions(+), 444 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b9b628de/nifi/nifi-assembly/LICENSE -- diff --git a/nifi/nifi-assembly/LICENSE b/nifi/nifi-assembly/LICENSE index 984bcea..a3a5fdb 100644 --- a/nifi/nifi-assembly/LICENSE +++ b/nifi/nifi-assembly/LICENSE @@ -675,7 +675,7 @@ This product bundles HexViewJS available under an MIT License The binary distribution of this product bundles 'JCraft Jsch' which is available under a BSD style license. -Copyright (c) 2002-2014 Atsuhiko Yamanaka, JCraft,Inc. +Copyright (c) 2002-2015 Atsuhiko Yamanaka, JCraft,Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -879,4 +879,37 @@ under a BSD license. More details found here: http://hamcrest.org. 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. - \ No newline at end of file + +The binary distribution of this product bundles 'leveldbjni-all-1.8.jar' which is available + under a BSD style license + +Copyright (c) 2011 FuseSource Corp. 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 FuseSource Corp. 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
incubator-nifi git commit: NIFI-546 clarified javadoc and added null check
Repository: incubator-nifi Updated Branches: refs/heads/develop a49a03da4 - 8d745c2b7 NIFI-546 clarified javadoc and added null check Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8d745c2b Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8d745c2b Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8d745c2b Branch: refs/heads/develop Commit: 8d745c2b7699ab9fc66b8d816a6b9be5caf2efa1 Parents: a49a03d Author: joewitt joew...@apache.org Authored: Fri Jun 5 10:36:51 2015 -0400 Committer: joewitt joew...@apache.org Committed: Fri Jun 5 10:36:51 2015 -0400 -- .../nifi/cluster/protocol/StandardDataFlow.java | 27 1 file changed, 10 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8d745c2b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java index 0f0ed69..3b6d110 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java @@ -16,7 +16,6 @@ */ package org.apache.nifi.cluster.protocol; -import org.apache.nifi.cluster.protocol.DataFlow; import java.io.Serializable; import java.util.Arrays; @@ -41,12 +40,15 @@ public class StandardDataFlow implements Serializable, DataFlow { * Constructs an instance. * * @param flow a valid flow as bytes, which cannot be null - * @param templateBytes an XML representation of templates - * @param snippetBytes an XML representation of snippets + * @param templateBytes an XML representation of templates. May be null. + * @param snippetBytes an XML representation of snippets. May be null. * - * @throws NullPointerException if any argument is null + * @throws NullPointerException if flow is null */ public StandardDataFlow(final byte[] flow, final byte[] templateBytes, final byte[] snippetBytes) { +if(flow == null){ +throw new NullPointerException(Flow cannot be null); +} this.flow = flow; this.templateBytes = templateBytes; this.snippetBytes = snippetBytes; @@ -63,31 +65,22 @@ public class StandardDataFlow implements Serializable, DataFlow { return bytes == null ? null : Arrays.copyOf(bytes, bytes.length); } -/** - * @return the raw byte array of the flow - */ +@Override public byte[] getFlow() { return flow; } -/** - * @return the raw byte array of the templates - */ +@Override public byte[] getTemplates() { return templateBytes; } -/** - * @return the raw byte array of the snippets - */ +@Override public byte[] getSnippets() { return snippetBytes; } -/** - * @return true if processors should be automatically started at application - * startup; false otherwise - */ +@Override public boolean isAutoStartProcessors() { return autoStartProcessors; }
[1/3] incubator-nifi git commit: NIFI-379 fixed what appears to be a faulty edge condition handling
Repository: incubator-nifi Updated Branches: refs/heads/develop b53948a6b - a49a03da4 NIFI-379 fixed what appears to be a faulty edge condition handling Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/819b65f7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/819b65f7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/819b65f7 Branch: refs/heads/develop Commit: 819b65f7e08ff5a836bd7c9fd29826539344abe9 Parents: b53948a Author: joewitt joew...@apache.org Authored: Thu Jun 4 22:48:17 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jun 4 22:48:38 2015 -0400 -- .../nifi/processors/standard/BinFiles.java | 23 ++-- .../processors/standard/TestMergeContent.java | 20 + 2 files changed, 31 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/819b65f7/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/BinFiles.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/BinFiles.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/BinFiles.java index 399a12b..a7b4b28 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/BinFiles.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/BinFiles.java @@ -171,17 +171,17 @@ public abstract class BinFiles extends AbstractSessionFactoryProcessor { @Override public final void onTrigger(final ProcessContext context, final ProcessSessionFactory sessionFactory) throws ProcessException { -int binsAdded = binFlowFiles(context, sessionFactory); -getLogger().debug(Binned {} FlowFiles, new Object[]{binsAdded}); +final int flowFilesBinned = binFlowFiles(context, sessionFactory); +getLogger().debug(Binned {} FlowFiles, new Object[]{flowFilesBinned}); if (!isScheduled()) { return; } -binsAdded += migrateBins(context); - +final int binsMigrated = migrateBins(context); final int binsProcessed = processBins(context, sessionFactory); -if (binsProcessed == 0 binsAdded == 0) { +//If we accomplished nothing then let's yield +if (flowFilesBinned == 0 binsMigrated == 0 binsProcessed == 0) { context.yield(); } } @@ -203,7 +203,6 @@ public abstract class BinFiles extends AbstractSessionFactoryProcessor { this.readyBins.add(bin); } } - return added; } @@ -251,16 +250,16 @@ public abstract class BinFiles extends AbstractSessionFactoryProcessor { } private int binFlowFiles(final ProcessContext context, final ProcessSessionFactory sessionFactory) { -int binsAdded = 0; -while (binManager.getBinCount() context.getProperty(MAX_BIN_COUNT).asInteger().intValue()) { +int flowFilesBinned = 0; +while (binManager.getBinCount() = context.getProperty(MAX_BIN_COUNT).asInteger().intValue()) { if (!isScheduled()) { -return binsAdded; +break; } final ProcessSession session = sessionFactory.createSession(); FlowFile flowFile = session.get(); if (flowFile == null) { -return binsAdded; +break; } flowFile = this.preprocessFlowFile(context, session, flowFile); @@ -276,10 +275,10 @@ public abstract class BinFiles extends AbstractSessionFactoryProcessor { this.readyBins.add(bin); } -binsAdded++; +flowFilesBinned++; } -return binsAdded; +return flowFilesBinned; } @OnScheduled http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/819b65f7/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestMergeContent.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestMergeContent.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestMergeContent.java index aad2593..65925f7 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle
[3/3] incubator-nifi git commit: NIFI-613 and NIFI-379 checkstyle fix
NIFI-613 and NIFI-379 checkstyle fix Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/a49a03da Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/a49a03da Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/a49a03da Branch: refs/heads/develop Commit: a49a03da43c52cd84a154f53aaa0ddbd366e6c1b Parents: 1fb6aa4 Author: joewitt joew...@apache.org Authored: Thu Jun 4 23:29:32 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jun 4 23:29:32 2015 -0400 -- .../org/apache/nifi/processors/standard/TestMergeContent.java| 4 ++-- .../org/apache/nifi/processors/standard/TestScanContent.java | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a49a03da/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestMergeContent.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestMergeContent.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestMergeContent.java index 65925f7..daad455 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestMergeContent.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestMergeContent.java @@ -73,7 +73,7 @@ public class TestMergeContent { bundle.assertContentEquals(Hello, World!.getBytes(UTF-8)); bundle.assertAttributeEquals(CoreAttributes.MIME_TYPE.key(), application/plain-text); } - + @Test public void testSimpleBinaryConcatSingleBin() throws IOException, InterruptedException { final TestRunner runner = TestRunners.newTestRunner(new MergeContent()); @@ -92,7 +92,7 @@ public class TestMergeContent { final MockFlowFile bundle = runner.getFlowFilesForRelationship(MergeContent.REL_MERGED).get(0); bundle.assertContentEquals(Hello, World!.getBytes(UTF-8)); bundle.assertAttributeEquals(CoreAttributes.MIME_TYPE.key(), application/plain-text); -} +} @Test public void testSimpleBinaryConcatWithTextDelimiters() throws IOException, InterruptedException { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a49a03da/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java index c221965..4b87387 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java @@ -18,7 +18,6 @@ package org.apache.nifi.processors.standard; import java.io.DataOutputStream; import java.io.IOException; -import java.io.StringWriter; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths;
[2/3] incubator-nifi git commit: NIFI-613 just needed to check for line of length 0. Added unit test to prove fail and fix
NIFI-613 just needed to check for line of length 0. Added unit test to prove fail and fix Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/1fb6aa49 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/1fb6aa49 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/1fb6aa49 Branch: refs/heads/develop Commit: 1fb6aa49ba6a5e2fd45e8482deaf35401bcaace2 Parents: 819b65f Author: joewitt joew...@apache.org Authored: Thu Jun 4 23:22:23 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jun 4 23:22:23 2015 -0400 -- .../nifi/processors/standard/ScanContent.java| 2 +- .../processors/standard/TestScanContent.java | 19 +++ 2 files changed, 20 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1fb6aa49/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanContent.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanContent.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanContent.java index ab5e8b5..445249b 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanContent.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanContent.java @@ -261,7 +261,7 @@ public class ScanContent extends AbstractProcessor { @Override public SearchTermbyte[] nextTerm() throws IOException { final String nextLine = reader.readLine(); -if (nextLine == null) { +if (nextLine == null || nextLine.isEmpty()) { return null; } return new SearchTerm(nextLine.getBytes(UTF-8)); http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1fb6aa49/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java index 8c36845..c221965 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java @@ -18,6 +18,7 @@ package org.apache.nifi.processors.standard; import java.io.DataOutputStream; import java.io.IOException; +import java.io.StringWriter; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -34,6 +35,24 @@ import org.junit.Test; public class TestScanContent { +@Test +public void testBlankLineInDictionaryTextEncoding() throws IOException { +final String dictionaryWithBlankLine = Line1\n\nLine3; +final byte[] dictionaryBytes = dictionaryWithBlankLine.getBytes(ScanContent.UTF8); +final Path dictionaryPath = Paths.get(target/dictionary); +Files.write(dictionaryPath, dictionaryBytes, StandardOpenOption.CREATE, StandardOpenOption.WRITE); + +final TestRunner runner = TestRunners.newTestRunner(new ScanContent()); +runner.setThreadCount(1); +runner.setProperty(ScanContent.DICTIONARY, dictionaryPath.toString()); +runner.setProperty(ScanContent.DICTIONARY_ENCODING, ScanContent.TEXT_ENCODING); + +runner.enqueue(new byte[0]); +runner.run(); +runner.assertTransferCount(ScanContent.REL_NO_MATCH, 1); + +} + @Ignore(This test has a race condition/ordering problem) @Test public void testBinaryScan() throws IOException {
[1/2] incubator-nifi git commit: NIFI-645 adjusted to more reasonable defaults
Repository: incubator-nifi Updated Branches: refs/heads/develop 8f55e35a0 - 8201381c9 NIFI-645 adjusted to more reasonable defaults Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/0aa904c8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/0aa904c8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/0aa904c8 Branch: refs/heads/develop Commit: 0aa904c82a467fa25623d6439579533f6206aa99 Parents: e2227cd Author: joewitt joew...@apache.org Authored: Thu Jun 4 13:21:57 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jun 4 13:21:57 2015 -0400 -- nifi/nifi-assembly/pom.xml | 16 1 file changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0aa904c8/nifi/nifi-assembly/pom.xml -- diff --git a/nifi/nifi-assembly/pom.xml b/nifi/nifi-assembly/pom.xml index 7d3a32b..02a16f9 100644 --- a/nifi/nifi-assembly/pom.xml +++ b/nifi/nifi-assembly/pom.xml @@ -243,11 +243,11 @@ language governing permissions and limitations under the License. -- nifi.content.claim.max.appendable.size10 MB/nifi.content.claim.max.appendable.size nifi.content.claim.max.flow.files100/nifi.content.claim.max.flow.files nifi.content.repository.directory.default./content_repository/nifi.content.repository.directory.default -nifi.content.repository.archive.max.retention.period / -nifi.content.repository.archive.max.usage.percentage / - nifi.content.repository.archive.enabledfalse/nifi.content.repository.archive.enabled +nifi.content.repository.archive.max.retention.period12 hours/nifi.content.repository.archive.max.retention.period + nifi.content.repository.archive.max.usage.percentage50%/nifi.content.repository.archive.max.usage.percentage + nifi.content.repository.archive.enabledtrue/nifi.content.repository.archive.enabled nifi.content.repository.always.syncfalse/nifi.content.repository.always.sync -nifi.content.viewer.url / + nifi.content.viewer.url/nifi-content-viewer//nifi.content.viewer.url nifi.restore.directory / nifi.ui.banner.text / @@ -267,11 +267,11 @@ language governing permissions and limitations under the License. -- nifi.provenance.repository.directory.default./provenance_repository/nifi.provenance.repository.directory.default nifi.provenance.repository.max.storage.time24 hours/nifi.provenance.repository.max.storage.time nifi.provenance.repository.max.storage.size1 GB/nifi.provenance.repository.max.storage.size -nifi.provenance.repository.rollover.time5 mins/nifi.provenance.repository.rollover.time +nifi.provenance.repository.rollover.time30 secs/nifi.provenance.repository.rollover.time nifi.provenance.repository.rollover.size100 MB/nifi.provenance.repository.rollover.size nifi.provenance.repository.query.threads2/nifi.provenance.repository.query.threads nifi.provenance.repository.compress.on.rollovertrue/nifi.provenance.repository.compress.on.rollover -nifi.provenance.repository.indexed.fieldsEventType, FlowFileUUID, Filename, ProcessorID/nifi.provenance.repository.indexed.fields +nifi.provenance.repository.indexed.fieldsEventType, FlowFileUUID, Filename, ProcessorID, Relationship/nifi.provenance.repository.indexed.fields nifi.provenance.repository.indexed.attributes / nifi.provenance.repository.index.shard.size500 MB/nifi.provenance.repository.index.shard.size nifi.provenance.repository.always.syncfalse/nifi.provenance.repository.always.sync @@ -282,8 +282,8 @@ language governing permissions and limitations under the License. -- !-- Component status repository properties -- nifi.components.status.repository.implementationorg.apache.nifi.controller.status.history.VolatileComponentStatusRepository/nifi.components.status.repository.implementation - nifi.components.status.repository.buffer.size288/nifi.components.status.repository.buffer.size -nifi.components.status.snapshot.frequency5 mins/nifi.components.status.snapshot.frequency + nifi.components.status.repository.buffer.size1440/nifi.components.status.repository.buffer.size +nifi.components.status.snapshot.frequency1 min/nifi.components.status.snapshot.frequency !-- nifi.properties: web properties -- nifi.web.war.directory./lib/nifi.web.war.directory
[2/2] incubator-nifi git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8201381c Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8201381c Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8201381c Branch: refs/heads/develop Commit: 8201381c9b89addf63c50c2e098cd97b51071c08 Parents: 0aa904c 8f55e35 Author: joewitt joew...@apache.org Authored: Thu Jun 4 13:49:38 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jun 4 13:49:38 2015 -0400 -- .../main/java/org/apache/nifi/processors/standard/SplitJson.java | 2 -- 1 file changed, 2 deletions(-) --
incubator-nifi git commit: NIFI-659 updated all instances of child overrides to combine their excludes and parents
Repository: incubator-nifi Updated Branches: refs/heads/develop 07628f76f - fb75a4ba6 NIFI-659 updated all instances of child overrides to combine their excludes and parents Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/fb75a4ba Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/fb75a4ba Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/fb75a4ba Branch: refs/heads/develop Commit: fb75a4ba692ec834e470fc89de24bdd483439796 Parents: 07628f7 Author: joewitt joew...@apache.org Authored: Thu Jun 4 12:11:35 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jun 4 12:11:35 2015 -0400 -- nifi/nifi-commons/nifi-hl7-query-language/pom.xml | 2 +- nifi/nifi-docs/pom.xml | 2 +- nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/pom.xml | 2 +- .../nifi-framework/nifi-framework-cluster/pom.xml | 2 +- .../nifi-framework/nifi-framework-core/pom.xml | 2 +- .../nifi-framework/nifi-web/nifi-web-content-viewer/pom.xml| 2 +- .../nifi-framework/nifi-web/nifi-web-ui/pom.xml| 2 +- nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/pom.xml | 2 +- .../nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/pom.xml | 2 +- .../nifi-standard-bundle/nifi-standard-processors/pom.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fb75a4ba/nifi/nifi-commons/nifi-hl7-query-language/pom.xml -- diff --git a/nifi/nifi-commons/nifi-hl7-query-language/pom.xml b/nifi/nifi-commons/nifi-hl7-query-language/pom.xml index eb46841..b6ead09 100644 --- a/nifi/nifi-commons/nifi-hl7-query-language/pom.xml +++ b/nifi/nifi-commons/nifi-hl7-query-language/pom.xml @@ -48,7 +48,7 @@ groupIdorg.apache.rat/groupId artifactIdapache-rat-plugin/artifactId configuration -excludes +excludes combine.children=append excludesrc/test/resources/hypoglycemia/exclude excludesrc/test/resources/hyperglycemia/exclude /excludes http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fb75a4ba/nifi/nifi-docs/pom.xml -- diff --git a/nifi/nifi-docs/pom.xml b/nifi/nifi-docs/pom.xml index 1494745..c3d6735 100644 --- a/nifi/nifi-docs/pom.xml +++ b/nifi/nifi-docs/pom.xml @@ -107,7 +107,7 @@ groupIdorg.apache.rat/groupId artifactIdapache-rat-plugin/artifactId configuration -excludes +excludes combine.children=append excludesrc/main/asciidoc/asciidoc-mod.css/exclude !-- MIT license confirmed. Excluding due to parse error-- /excludes /configuration http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fb75a4ba/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/pom.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/pom.xml b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/pom.xml index cada04e..c69c3c8 100644 --- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/pom.xml @@ -61,7 +61,7 @@ groupIdorg.apache.rat/groupId artifactIdapache-rat-plugin/artifactId configuration -excludes +excludes combine.children=append excludesrc/test/resources/hello.txt/exclude /excludes /configuration http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fb75a4ba/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/pom.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/pom.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/pom.xml index 4cb2196..82712e2 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/pom.xml @@ -137,7 +137,7 @@ groupIdorg.apache.rat/groupId artifactIdapache-rat-plugin/artifactId configuration
incubator-nifi git commit: NIFI-654 updated all non controversial deps. Tested locally and on a remote system with full 2-way SSL
Repository: incubator-nifi Updated Branches: refs/heads/develop 310ae3ebc - 07628f76f NIFI-654 updated all non controversial deps. Tested locally and on a remote system with full 2-way SSL Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/07628f76 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/07628f76 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/07628f76 Branch: refs/heads/develop Commit: 07628f76fedfe8596c62fbfb2edd159ddf051665 Parents: 310ae3e Author: joewitt joew...@apache.org Authored: Thu Jun 4 11:01:39 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jun 4 11:01:39 2015 -0400 -- nifi/nifi-external/nifi-spark-receiver/pom.xml | 1 - nifi/pom.xml | 45 - 2 files changed, 25 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/07628f76/nifi/nifi-external/nifi-spark-receiver/pom.xml -- diff --git a/nifi/nifi-external/nifi-spark-receiver/pom.xml b/nifi/nifi-external/nifi-spark-receiver/pom.xml index cd03dd4..af436c7 100644 --- a/nifi/nifi-external/nifi-spark-receiver/pom.xml +++ b/nifi/nifi-external/nifi-spark-receiver/pom.xml @@ -27,7 +27,6 @@ dependency groupIdorg.apache.spark/groupId artifactIdspark-streaming_2.10/artifactId -version1.2.0/version /dependency dependency groupIdorg.apache.nifi/groupId http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/07628f76/nifi/pom.xml -- diff --git a/nifi/pom.xml b/nifi/pom.xml index 58b4e88..7ff110b 100644 --- a/nifi/pom.xml +++ b/nifi/pom.xml @@ -37,13 +37,13 @@ modulenifi-external/module /modules properties -org.slf4j.version1.7.10/org.slf4j.version -jetty.version9.2.10.v20150310/jetty.version -lucene.version4.10.3/lucene.version -spring.version4.1.4.RELEASE/spring.version -spring.security.version3.2.5.RELEASE/spring.security.version +org.slf4j.version1.7.12/org.slf4j.version +jetty.version9.2.11.v20150529/jetty.version +lucene.version4.10.4/lucene.version +spring.version4.1.6.RELEASE/spring.version +spring.security.version3.2.7.RELEASE/spring.security.version jersey.version1.19/jersey.version -hadoop.version2.6.0/hadoop.version +hadoop.version2.7.0/hadoop.version inceptionYear2014/inceptionYear /properties dependencyManagement @@ -51,12 +51,12 @@ dependency groupIdch.qos.logback/groupId artifactIdlogback-classic/artifactId -version1.1.2/version +version1.1.3/version /dependency dependency groupIdch.qos.logback/groupId artifactIdjcl-over-slf4j/artifactId -version1.1.2/version +version1.1.3/version scopeprovided/scope exclusions exclusion @@ -97,12 +97,12 @@ dependency groupIdorg.mockito/groupId artifactIdmockito-core/artifactId -version1.10.16/version +version1.10.19/version /dependency dependency groupIdorg.mockito/groupId artifactIdmockito-all/artifactId -version1.10.8/version +version1.10.19/version scopetest/scope /dependency dependency @@ -118,7 +118,7 @@ dependency groupIdorg.apache.commons/groupId artifactIdcommons-lang3/artifactId -version3.3.2/version +version3.4/version /dependency dependency groupIdorg.antlr/groupId @@ -158,12 +158,12 @@ dependency groupIdcom.jcraft/groupId artifactIdjsch/artifactId -version0.1.51/version +version0.1.52/version /dependency dependency groupIdorg.apache.httpcomponents/groupId artifactIdhttpclient/artifactId -version4.3.6/version +version4.4.1/version /dependency dependency groupIdjavax.mail/groupId @@ -183,7 +183,7 @@ dependency groupIdnet.sf.saxon/groupId artifactIdSaxon-HE/artifactId -version9.6.0-4/version +version9.6.0-5/version
[2/2] incubator-nifi git commit: NIFI-551 checkstyle mods to provided patch. Main issue was extraneous imports. No biggie.
NIFI-551 checkstyle mods to provided patch. Main issue was extraneous imports. No biggie. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/5eed3358 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/5eed3358 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/5eed3358 Branch: refs/heads/develop Commit: 5eed335804ccbbb15316e80fb5fb09b36897c69f Parents: 6f32e6e Author: joewitt joew...@apache.org Authored: Thu Jun 4 15:34:58 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jun 4 15:34:58 2015 -0400 -- .../nifi/processors/kite/AbstractKiteProcessor.java | 3 +-- .../apache/nifi/processors/kite/ConvertJSONToAvro.java | 8 .../nifi/processors/kite/TestJSONToAvroProcessor.java | 12 +++- 3 files changed, 8 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/5eed3358/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AbstractKiteProcessor.java -- diff --git a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AbstractKiteProcessor.java b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AbstractKiteProcessor.java index fec8239..da1c046 100644 --- a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AbstractKiteProcessor.java +++ b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AbstractKiteProcessor.java @@ -106,8 +106,7 @@ abstract class AbstractKiteProcessor extends AbstractProcessor { }; /** - * Resolves a {@link Schema} for the given string, either a URI or a JSON - * literal. + * Resolves a {@link Schema} for the given string, either a URI or a JSON literal. */ protected static Schema getSchema(String uriOrLiteral, Configuration conf) { URI uri; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/5eed3358/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertJSONToAvro.java -- diff --git a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertJSONToAvro.java b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertJSONToAvro.java index d4cc760..7969a8f 100644 --- a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertJSONToAvro.java +++ b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertJSONToAvro.java @@ -122,7 +122,7 @@ public class ConvertJSONToAvro extends AbstractKiteProcessor { writer.setCodec(CodecFactory.snappyCodec()); try { - successfulRecords = session.write(successfulRecords, new StreamCallback() { +successfulRecords = session.write(successfulRecords, new StreamCallback() { @Override public void process(InputStream in, OutputStream out) throws IOException { FlowFile failedRecords = session.create(); @@ -143,8 +143,8 @@ public class ConvertJSONToAvro extends AbstractKiteProcessor { failedRecords = session.append(failedRecords, new OutputStreamCallback() { @Override public void process(OutputStream out) throws IOException { -out.write((e.getMessage() + [ + - e.getCause().getMessage() + ]\n).getBytes()); +out.write((e.getMessage() + [ ++ e.getCause().getMessage() + ]\n).getBytes()); } }); errors += 1; @@ -154,7 +154,7 @@ public class ConvertJSONToAvro extends AbstractKiteProcessor { session.adjustCounter(Converted records, written, false /* update only if file transfer is successful */); session.adjustCounter(Conversion errors, errors, - false /* update only if file transfer is successful */); +false /* update only if file transfer
[1/2] incubator-nifi git commit: NIFI-551 - ConvertJSONToAvro improve error message
Repository: incubator-nifi Updated Branches: refs/heads/develop 8201381c9 - 5eed33580 NIFI-551 - ConvertJSONToAvro improve error message - Report failure counts as an log error message - Send record parsing errors to a separate flowfile which is transfered down the failure relationship Signed-off-by: joewitt joew...@apache.org Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/6f32e6e9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/6f32e6e9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/6f32e6e9 Branch: refs/heads/develop Commit: 6f32e6e9776548b746f6388d25067cd17aa1898c Parents: 8201381 Author: ricky ri...@cloudera.com Authored: Tue Apr 28 15:58:09 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jun 4 14:52:16 2015 -0400 -- .../nifi/processors/kite/ConvertJSONToAvro.java | 38 ++-- .../kite/TestJSONToAvroProcessor.java | 23 ++-- 2 files changed, 47 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/6f32e6e9/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertJSONToAvro.java -- diff --git a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertJSONToAvro.java b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertJSONToAvro.java index 78f80b9..d4cc760 100644 --- a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertJSONToAvro.java +++ b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/ConvertJSONToAvro.java @@ -38,6 +38,7 @@ import org.apache.nifi.processor.ProcessContext; import org.apache.nifi.processor.ProcessSession; import org.apache.nifi.processor.Relationship; import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.io.OutputStreamCallback; import org.apache.nifi.processor.io.StreamCallback; import org.kitesdk.data.DatasetException; import org.kitesdk.data.DatasetIOException; @@ -97,22 +98,22 @@ public class ConvertJSONToAvro extends AbstractKiteProcessor { } @Override -public void onTrigger(ProcessContext context, final ProcessSession session) +public void onTrigger(final ProcessContext context, final ProcessSession session) throws ProcessException { -FlowFile flowFile = session.get(); -if (flowFile == null) { +FlowFile successfulRecords = session.get(); +if (successfulRecords == null) { return; } String schemaProperty = context.getProperty(SCHEMA) -.evaluateAttributeExpressions(flowFile) +.evaluateAttributeExpressions(successfulRecords) .getValue(); final Schema schema; try { schema = getSchema(schemaProperty, DefaultConfiguration.get()); } catch (SchemaNotFoundException e) { getLogger().error(Cannot find schema: + schemaProperty); -session.transfer(flowFile, FAILURE); +session.transfer(successfulRecords, FAILURE); return; } @@ -121,21 +122,31 @@ public class ConvertJSONToAvro extends AbstractKiteProcessor { writer.setCodec(CodecFactory.snappyCodec()); try { -flowFile = session.write(flowFile, new StreamCallback() { + successfulRecords = session.write(successfulRecords, new StreamCallback() { @Override public void process(InputStream in, OutputStream out) throws IOException { +FlowFile failedRecords = session.create(); long written = 0L; long errors = 0L; +long total = 0L; try (JSONFileReaderRecord reader = new JSONFileReader( in, schema, Record.class)) { reader.initialize(); try (DataFileWriterRecord w = writer.create(schema, out)) { while (reader.hasNext()) { +total += 1; try { Record record = reader.next(); w.append(record); written += 1; -} catch (DatasetRecordException e) { +} catch (final DatasetRecordException e
incubator-nifi git commit: NIFI-602: Ensure we read all data from socket after sending 'SHUTDOWN' command
Repository: incubator-nifi Updated Branches: refs/heads/develop 5eed33580 - c7c4427cb NIFI-602: Ensure we read all data from socket after sending 'SHUTDOWN' command Signed-off-by: joewitt joew...@apache.org Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/c7c4427c Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/c7c4427c Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/c7c4427c Branch: refs/heads/develop Commit: c7c4427cbf964e932be32b2000df26958255b043 Parents: 5eed335 Author: Mark Payne marka...@hotmail.com Authored: Thu Jun 4 14:10:43 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jun 4 15:37:32 2015 -0400 -- .../java/org/apache/nifi/bootstrap/RunNiFi.java | 34 1 file changed, 20 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c7c4427c/nifi/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java -- diff --git a/nifi/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java b/nifi/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java index bb83e3d..e6b1bc5 100644 --- a/nifi/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java +++ b/nifi/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java @@ -229,7 +229,10 @@ public class RunNiFi { props.load(fis); } -logger.log(Level.FINE, Properties: {0}, props); +final MapObject, Object modified = new HashMap(props); +modified.remove(secret.key); +logger.log(Level.FINE, Properties: {0}, modified); + return props; } @@ -250,8 +253,8 @@ public class RunNiFi { Files.setPosixFilePermissions(statusFile.toPath(), perms); } catch (final Exception e) { logger.log(Level.WARNING, Failed to set permissions so that only the owner can read status file {0}; -+ this may allows others to have access to the key needed to communicate with NiFi. -+ Permissions should be changed so that only the owner can read this file, statusFile); ++ this may allows others to have access to the key needed to communicate with NiFi. ++ Permissions should be changed so that only the owner can read this file, statusFile); } try (final FileOutputStream fos = new FileOutputStream(statusFile)) { @@ -328,8 +331,8 @@ public class RunNiFi { boolean running = false; String line; try (final InputStream in = proc.getInputStream(); -final Reader streamReader = new InputStreamReader(in); -final BufferedReader reader = new BufferedReader(streamReader)) { +final Reader streamReader = new InputStreamReader(in); +final BufferedReader reader = new BufferedReader(streamReader)) { while ((line = reader.readLine()) != null) { if (line.trim().startsWith(pid)) { @@ -395,7 +398,7 @@ public class RunNiFi { final Status status = getStatus(); if (status.isRespondingToPing()) { logger.log(Level.INFO, Apache NiFi is currently running, listening to Bootstrap on port {0}, PID={1}, -new Object[]{status.getPort(), status.getPid() == null ? unknkown : status.getPid()}); +new Object[]{status.getPort(), status.getPid() == null ? unknkown : status.getPid()}); return; } @@ -488,12 +491,15 @@ public class RunNiFi { final OutputStream out = socket.getOutputStream(); out.write((SHUTDOWN_CMD + + secretKey + \n).getBytes(StandardCharsets.UTF_8)); out.flush(); -out.close(); +socket.shutdownOutput(); final InputStream in = socket.getInputStream(); -final BufferedReader reader = new BufferedReader(new InputStreamReader(in)); -final String response = reader.readLine(); -reader.close(); +int lastChar; +final StringBuilder sb = new StringBuilder(); +while ((lastChar = in.read()) -1) { +sb.append((char) lastChar); +} +final String response = sb.toString().trim(); logger.log(Level.FINE, Received response to SHUTDOWN command: {0}, response); @@ -557,7 +563,7 @@ public class RunNiFi { final Process proc = Runtime.getRuntime().exec(new String[]{ps, -o, pid, --no-headers, --ppid, ppid}); final ListString childPids = new ArrayList(); try (final InputStream in = proc.getInputStream
incubator-nifi git commit: NIFI-553
Repository: incubator-nifi Updated Branches: refs/heads/develop c7c4427cb - aeefe73f0 NIFI-553 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/aeefe73f Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/aeefe73f Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/aeefe73f Branch: refs/heads/develop Commit: aeefe73f0b7bdbbe18ef38457fbc3521da3fba3d Parents: c7c4427 Author: joewitt joew...@apache.org Authored: Thu Jun 4 15:59:06 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jun 4 15:59:06 2015 -0400 -- .../org/apache/nifi/processors/standard/Base64EncodeContent.java | 2 +- .../java/org/apache/nifi/processors/standard/DetectDuplicate.java | 2 +- .../java/org/apache/nifi/processors/standard/EncodeContent.java| 2 +- .../java/org/apache/nifi/processors/standard/EvaluateXQuery.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/aeefe73f/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/Base64EncodeContent.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/Base64EncodeContent.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/Base64EncodeContent.java index d0b78a5..9887e38 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/Base64EncodeContent.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/Base64EncodeContent.java @@ -49,7 +49,7 @@ import org.apache.nifi.util.StopWatch; @EventDriven @SideEffectFree @SupportsBatching -@Tags({experimental, encode, base64}) +@Tags({encode, base64}) @CapabilityDescription(Encodes or decodes content to and from base64) public class Base64EncodeContent extends AbstractProcessor { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/aeefe73f/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DetectDuplicate.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DetectDuplicate.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DetectDuplicate.java index 5e1fffa..b825972 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DetectDuplicate.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DetectDuplicate.java @@ -51,7 +51,7 @@ import org.apache.nifi.processor.util.StandardValidators; @EventDriven @SupportsBatching -@Tags({experimental, hash, dupe, duplicate, dedupe}) +@Tags({hash, dupe, duplicate, dedupe}) @CapabilityDescription(Caches a value, computed from FlowFile attributes, for each incoming FlowFile and determines if the cached value has already been seen. + If so, routes the FlowFile to 'duplicate' with an attribute named 'original.identifier' that specifies the original FlowFile's + \description\, which is specified in the FlowFile Description property. If the FlowFile is not determined to be a duplicate, the Processor http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/aeefe73f/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java index 3e26857..67c2214 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java @@ -55,7 +55,7 @@ import org.apache.nifi.util.StopWatch; @EventDriven @SideEffectFree @SupportsBatching -@Tags({experimental, encode, decode, base64, hex}) +@Tags({encode, decode, base64, hex
[2/2] incubator-nifi git commit: NIFI-656 moving from 0.1.1 to 0.2.0 to reflect new feature merged to develop
NIFI-656 moving from 0.1.1 to 0.2.0 to reflect new feature merged to develop Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/310ae3eb Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/310ae3eb Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/310ae3eb Branch: refs/heads/develop Commit: 310ae3ebcd7dfa62a14275a0aa7b67159ab957c0 Parents: 8980167 Author: joewitt joew...@apache.org Authored: Thu Jun 4 09:09:30 2015 -0400 Committer: joewitt joew...@apache.org Committed: Thu Jun 4 09:09:30 2015 -0400 -- nifi/nifi-api/pom.xml | 2 +- nifi/nifi-assembly/pom.xml | 12 +-- nifi/nifi-bootstrap/pom.xml | 2 +- .../nifi-data-provenance-utils/pom.xml | 2 +- .../nifi-expression-language/pom.xml| 2 +- .../nifi-commons/nifi-flowfile-packager/pom.xml | 2 +- .../nifi-hl7-query-language/pom.xml | 2 +- nifi/nifi-commons/nifi-logging-utils/pom.xml| 2 +- .../nifi-processor-utilities/pom.xml| 2 +- nifi/nifi-commons/nifi-properties/pom.xml | 2 +- nifi/nifi-commons/nifi-security-utils/pom.xml | 2 +- .../nifi-site-to-site-client/pom.xml| 4 +- nifi/nifi-commons/nifi-socket-utils/pom.xml | 2 +- nifi/nifi-commons/nifi-utils/pom.xml| 4 +- nifi/nifi-commons/nifi-web-utils/pom.xml| 2 +- nifi/nifi-commons/nifi-write-ahead-log/pom.xml | 2 +- nifi/nifi-commons/pom.xml | 2 +- nifi/nifi-docs/pom.xml | 2 +- nifi/nifi-external/nifi-spark-receiver/pom.xml | 2 +- nifi/nifi-external/pom.xml | 2 +- .../nifi-processor-bundle-archetype/pom.xml | 2 +- nifi/nifi-maven-archetypes/pom.xml | 2 +- nifi/nifi-mock/pom.xml | 2 +- .../nifi-aws-bundle/nifi-aws-nar/pom.xml| 4 +- .../nifi-aws-bundle/nifi-aws-processors/pom.xml | 2 +- nifi/nifi-nar-bundles/nifi-aws-bundle/pom.xml | 2 +- .../nifi-framework-nar/pom.xml | 2 +- .../nifi-framework/nifi-administration/pom.xml | 2 +- .../nifi-framework/nifi-client-dto/pom.xml | 2 +- .../nifi-cluster-authorization-provider/pom.xml | 2 +- .../nifi-framework/nifi-documentation/pom.xml | 2 +- .../nifi-file-authorization-provider/pom.xml| 2 +- .../nifi-framework-cluster-protocol/pom.xml | 2 +- .../nifi-framework-cluster-web/pom.xml | 2 +- .../nifi-framework-cluster/pom.xml | 2 +- .../nifi-framework-core-api/pom.xml | 2 +- .../nifi-framework/nifi-framework-core/pom.xml | 2 +- .../nifi-framework/nifi-nar-utils/pom.xml | 2 +- .../nifi-framework/nifi-resources/pom.xml | 2 +- .../nifi-framework/nifi-runtime/pom.xml | 2 +- .../nifi-framework/nifi-security/pom.xml| 2 +- .../nifi-framework/nifi-site-to-site/pom.xml| 2 +- .../nifi-framework/nifi-user-actions/pom.xml| 2 +- .../nifi-web/nifi-custom-ui-utilities/pom.xml | 2 +- .../nifi-framework/nifi-web/nifi-jetty/pom.xml | 2 +- .../nifi-web/nifi-ui-extension/pom.xml | 2 +- .../nifi-web/nifi-web-api/pom.xml | 2 +- .../nifi-web/nifi-web-content-access/pom.xml| 2 +- .../nifi-web/nifi-web-content-viewer/pom.xml| 2 +- .../nifi-web/nifi-web-docs/pom.xml | 2 +- .../nifi-web/nifi-web-error/pom.xml | 2 +- .../nifi-web-optimistic-locking/pom.xml | 2 +- .../nifi-web/nifi-web-security/pom.xml | 2 +- .../nifi-framework/nifi-web/nifi-web-ui/pom.xml | 2 +- .../nifi-framework/nifi-web/pom.xml | 12 +-- .../nifi-framework/pom.xml | 2 +- .../nifi-framework-bundle/pom.xml | 38 - .../nifi-geo-bundle/nifi-geo-nar/pom.xml| 2 +- .../nifi-geo-bundle/nifi-geo-processors/pom.xml | 2 +- nifi/nifi-nar-bundles/nifi-geo-bundle/pom.xml | 4 +- .../nifi-hadoop-bundle/nifi-hadoop-nar/pom.xml | 2 +- .../nifi-hdfs-processors/pom.xml| 2 +- .../nifi-nar-bundles/nifi-hadoop-bundle/pom.xml | 4 +- .../nifi-hadoop-libraries-nar/pom.xml | 2 +- .../nifi-hadoop-libraries-bundle/pom.xml| 2 +- .../nifi-hl7-bundle/nifi-hl7-nar/pom.xml| 4 +- .../nifi-hl7-bundle/nifi-hl7-processors/pom.xml | 4 +- nifi/nifi-nar-bundles/nifi-hl7-bundle/pom.xml | 2 +- nifi/nifi-nar-bundles/nifi-jetty-bundle/pom.xml | 2 +- .../nifi-kafka-bundle/nifi-kafka-nar/pom.xml| 2 +- .../nifi-kafka-processors/pom.xml | 2 +- nifi/nifi-nar-bundles/nifi-kafka-bundle/pom.xml | 4 +- .../nifi-kite-bundle/nifi-kite-nar/pom.xml | 2 +- .../nifi-kite-processors/pom.xml| 2 +- nifi/nifi-nar-bundles/nifi-kite-bundle/pom.xml | 4 +- .../nifi-language
[1/2] incubator-nifi git commit: NIFI-656 moving from 0.1.1 to 0.2.0 to reflect new feature merged to develop
Repository: incubator-nifi Updated Branches: refs/heads/develop 89801675b - 310ae3ebc http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/310ae3eb/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/pom.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/pom.xml b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/pom.xml index 1545245..14459fc 100644 --- a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/pom.xml @@ -17,7 +17,7 @@ parent groupIdorg.apache.nifi/groupId artifactIdnifi-provenance-repository-bundle/artifactId -version0.1.1-incubating-SNAPSHOT/version +version0.2.0-incubating-SNAPSHOT/version /parent artifactIdnifi-persistent-provenance-repository/artifactId packagingjar/packaging http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/310ae3eb/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-provenance-repository-nar/pom.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-provenance-repository-nar/pom.xml b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-provenance-repository-nar/pom.xml index 87aedcc..b44b462 100644 --- a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-provenance-repository-nar/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-provenance-repository-nar/pom.xml @@ -17,7 +17,7 @@ parent groupIdorg.apache.nifi/groupId artifactIdnifi-provenance-repository-bundle/artifactId -version0.1.1-incubating-SNAPSHOT/version +version0.2.0-incubating-SNAPSHOT/version /parent artifactIdnifi-provenance-repository-nar/artifactId packagingnar/packaging http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/310ae3eb/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-volatile-provenance-repository/pom.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-volatile-provenance-repository/pom.xml b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-volatile-provenance-repository/pom.xml index e1f1e62..e955498 100644 --- a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-volatile-provenance-repository/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-volatile-provenance-repository/pom.xml @@ -17,7 +17,7 @@ parent groupIdorg.apache.nifi/groupId artifactIdnifi-provenance-repository-bundle/artifactId -version0.1.1-incubating-SNAPSHOT/version +version0.2.0-incubating-SNAPSHOT/version /parent artifactIdnifi-volatile-provenance-repository/artifactId packagingjar/packaging http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/310ae3eb/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/pom.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/pom.xml b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/pom.xml index 574beb6..be19f92 100644 --- a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/pom.xml @@ -17,7 +17,7 @@ parent groupIdorg.apache.nifi/groupId artifactIdnifi-nar-bundles/artifactId -version0.1.1-incubating-SNAPSHOT/version +version0.2.0-incubating-SNAPSHOT/version /parent artifactIdnifi-provenance-repository-bundle/artifactId packagingpom/packaging @@ -31,12 +31,12 @@ dependency groupIdorg.apache.nifi/groupId artifactIdnifi-persistent-provenance-repository/artifactId -version0.1.1-incubating-SNAPSHOT/version +version0.2.0-incubating-SNAPSHOT/version /dependency dependency groupIdorg.apache.nifi/groupId artifactIdnifi-volatile-provenance-repository/artifactId -version0.1.1-incubating-SNAPSHOT/version +version0.2.0-incubating-SNAPSHOT/version /dependency /dependencies /dependencyManagement http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/310ae3eb/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-social-media-nar/pom.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-social-media-nar/pom.xml
svn commit: r1679304 [3/3] - in /incubator/nifi/site/trunk: ./ assets/js/ docs/
Modified: incubator/nifi/site/trunk/assets/js/webfontloader.js URL: http://svn.apache.org/viewvc/incubator/nifi/site/trunk/assets/js/webfontloader.js?rev=1679304r1=1679303r2=1679304view=diff == --- incubator/nifi/site/trunk/assets/js/webfontloader.js (original) +++ incubator/nifi/site/trunk/assets/js/webfontloader.js Thu May 14 02:29:30 2015 @@ -1,30 +1,30 @@ -/* Web Font Loader v1.5.14 - (c) Adobe Systems, Google. License: Apache 2.0 */ -;(function(window,document,undefined){function aa(a,b,c){return a.call.apply(a.bind,arguments)}function ba(a,b,c){if(!a)throw Error();if(2arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function k(a,b,c){k=Function.prototype.bind-1!=Function.prototype.bind.toString().indexOf(native code)?aa:ba;return k.apply(null,arguments)}var n=Date.now||function(){return+new Date};function q(a,b){this.J=a;this.t=b||a;this.C=this.t.document}q.prototype.createElement=function(a,b,c){a=this.C.createElement(a);if(b)for(var d in b)b.hasOwnProperty(d)(style==d?a.style.cssText=b[d]:a.setAttribute(d,b[d]));ca.appendChild(this.C.createTextNode(c));return a};function r(a,b,c){a=a.C.getElementsByTagName(b)[0];a||(a=document.documentElement);aa.lastChilda.insertBefore(c,a.lastChild)}function ca(a,b){function c(){a.C .body?b():setTimeout(c,0)}c()} +/* Web Font Loader v1.5.18 - (c) Adobe Systems, Google. License: Apache 2.0 */ +;(function(window,document,undefined){function aa(a,b,c){return a.call.apply(a.bind,arguments)}function ba(a,b,c){if(!a)throw Error();if(2arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function k(a,b,c){k=Function.prototype.bind-1!=Function.prototype.bind.toString().indexOf(native code)?aa:ba;return k.apply(null,arguments)}var n=Date.now||function(){return+new Date};function q(a,b){this.K=a;this.w=b||a;this.G=this.w.document}q.prototype.createElement=function(a,b,c){a=this.G.createElement(a);if(b)for(var d in b)b.hasOwnProperty(d)(style==d?a.style.cssText=b[d]:a.setAttribute(d,b[d]));ca.appendChild(this.G.createTextNode(c));return a};function r(a,b,c){a=a.G.getElementsByTagName(b)[0];a||(a=document.documentElement);aa.lastChilda.insertBefore(c,a.lastChild)}function ca(a,b){function c(){a.G .body?b():setTimeout(c,0)}c()} function s(a,b,c){b=b||[];c=c||[];for(var d=a.className.split(/\s+/),e=0;eb.length;e+=1){for(var f=!1,g=0;gd.length;g+=1)if(b[e]===d[g]){f=!0;break}f||d.push(b[e])}b=[];for(e=0;ed.length;e+=1){f=!1;for(g=0;gc.length;g+=1)if(d[e]===c[g]){f=!0;break}f||b.push(d[e])}a.className=b.join( ).replace(/\s+/g, ).replace(/^\s+|\s+$/,)}function t(a,b){for(var c=a.className.split(/\s+/),d=0,e=c.length;de;d++)if(c[d]==b)return!0;return!1} -function u(a){if(string===typeof a.ma)return a.ma;var b=a.t.location.protocol;about:==b(b=a.J.location.protocol);returnhttps:==b?https::http:}function v(a,b){var c=a.createElement(link,{rel:stylesheet,href:b}),d=!1;c.onload=function(){d||(d=!0)};c.onerror=function(){d||(d=!0)};r(a,head,c)} -function w(a,b,c,d){var e=a.C.getElementsByTagName(head)[0];if(e){var f=a.createElement(script,{src:b}),g=!1;f.onload=f.onreadystatechange=function(){g||this.readyStateloaded!=this.readyStatecomplete!=this.readyState||(g=!0,cc(null),f.onload=f.onreadystatechange=null,HEAD==f.parentNode.tagNamee.removeChild(f))};e.appendChild(f);window.setTimeout(function(){g||(g=!0,cc(Error(Script load timeout)))},d||5E3);return f}return null};function x(a,b){this.X=a;this.fa=b};function y(a,b,c,d){this.c=null!=a?a:null;this.g=null!=b?b:null;this.A=null!=c?c:null;this.e=null!=d?d:null}var da=/^([0-9]+)(?:[\._-]([0-9]+))?(?:[\._-]([0-9]+))?(?:[\._+-]?(.*))?$/;y.prototype.compare=function(a){return this.ca.c||this.c===a.cthis.ga.g||this.c===a.cthis.g===a.gthis.Aa.A?1:this.ca.c||this.c===a.cthis.ga.g||this.c===a.cthis.g===a.gthis.Aa.A?-1:0};y.prototype.toString=function(){return[this.c,this.g||,this.A||,this.e||].join()}; -function z(a){a=da.exec(a);var b=null,c=null,d=null,e=null;a(null!==a[1]a[1](b=parseInt(a[1],10)),null!==a[2]a[2](c=parseInt(a[2],10)),null!==a[3]a[3](d=parseInt(a[3],10)),null!==a[4]a[4](e=/^[0-9]+$/.test(a[4])?parseInt(a[4],10):a[4]));return new y(b,c,d,e)};function A(a,b,c,d,e,f,g,h){this.M=a;this.k=h}A.prototype.getName=function(){return this.M};function B(a){this.a=a}var ea=new A(Unknown,0,0,0,0,0,0,new x(!1,!1)); +function u(a){if(string===typeof a.na)return a.na;var b=a.w.location.protocol;about:==b(b=a.K.location.protocol);returnhttps:==b?https::http:}function v(a,b){var
svn commit: r1679304 [1/3] - in /incubator/nifi/site/trunk: ./ assets/js/ docs/
Author: joewitt Date: Thu May 14 02:29:30 2015 New Revision: 1679304 URL: http://svn.apache.org/r1679304 Log: Updated main index page for the feature highlights Modified: incubator/nifi/site/trunk/assets/js/foundation.js incubator/nifi/site/trunk/assets/js/jquery.min.js incubator/nifi/site/trunk/assets/js/webfontloader.js incubator/nifi/site/trunk/docs/administration-guide.html incubator/nifi/site/trunk/docs/developer-guide.html incubator/nifi/site/trunk/docs/expression-language-guide.html incubator/nifi/site/trunk/docs/overview.html incubator/nifi/site/trunk/docs/user-guide.html incubator/nifi/site/trunk/index.html Modified: incubator/nifi/site/trunk/assets/js/foundation.js URL: http://svn.apache.org/viewvc/incubator/nifi/site/trunk/assets/js/foundation.js?rev=1679304r1=1679303r2=1679304view=diff == --- incubator/nifi/site/trunk/assets/js/foundation.js (original) +++ incubator/nifi/site/trunk/assets/js/foundation.js Thu May 14 02:29:30 2015 @@ -14,7 +14,7 @@ var head = $('head'); while (i--) { - if(head.has('.' + class_array[i]).length === 0) { + if (head.has('.' + class_array[i]).length === 0) { head.append('meta class=' + class_array[i] + ' /'); } } @@ -34,7 +34,7 @@ // Enable FastClick if present - $(function() { + $(function () { if (typeof FastClick !== 'undefined') { // Don't attach to body if undefined if (typeof document.body !== 'undefined') { @@ -52,7 +52,9 @@ var cont; if (context.jquery) { cont = context[0]; - if (!cont) return context; + if (!cont) { +return context; + } } else { cont = context; } @@ -69,8 +71,12 @@ var attr_name = function (init) { var arr = []; -if (!init) arr.push('data'); -if (this.namespace.length 0) arr.push(this.namespace); +if (!init) { + arr.push('data'); +} +if (this.namespace.length 0) { + arr.push(this.namespace); +} arr.push(this.name); return arr.join('-'); @@ -100,24 +106,20 @@ var bindings = function (method, options) { var self = this, -should_bind_events = !S(this).data(this.attr_name(true)); - -if (S(this.scope).is('[' + this.attr_name() +']')) { - S(this.scope).data(this.attr_name(true) + '-init', $.extend({}, this.settings, (options || method), this.data_options(S(this.scope; +bind = function(){ + var $this = S(this), + should_bind_events = !$this.data(self.attr_name(true) + '-init'); + $this.data(self.attr_name(true) + '-init', $.extend({}, self.settings, (options || method), self.data_options($this))); - if (should_bind_events) { -this.events(this.scope); - } + if (should_bind_events) { +self.events(this); + } +}; +if (S(this.scope).is('[' + this.attr_name() +']')) { + bind.call(this.scope); } else { - S('[' + this.attr_name() +']', this.scope).each(function () { -var should_bind_events = !S(this).data(self.attr_name(true) + '-init'); -S(this).data(self.attr_name(true) + '-init', $.extend({}, self.settings, (options || method), self.data_options(S(this; - -if (should_bind_events) { - self.events(this); -} - }); + S('[' + this.attr_name() +']', this.scope).each(bind); } // # Patch to fix #5043 to move this *after* the if/else clause in order for Backbone and similar frameworks to have improved control over event binding and data-options updating. if (typeof method === 'string') { @@ -155,42 +157,52 @@ } }; - /* -https://github.com/paulirish/matchMedia.js - */ + /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */ - window.matchMedia = window.matchMedia || (function( doc ) { + window.matchMedia || (window.matchMedia = function() { + use strict; -'use strict'; + // For browsers that support matchMedium api such as IE 9 and webkit + var styleMedia = (window.styleMedia || window.media); -var bool, -docElem = doc.documentElement, -refNode = docElem.firstElementChild || docElem.firstChild, -// fakeBody required for FF4 when executed in head -fakeBody = doc.createElement( 'body' ), -div = doc.createElement( 'div' ); + // For those that don't support matchMedium + if (!styleMedia) { + var style = document.createElement('style'), + script = document.getElementsByTagName('script')[0], + info= null; -div.id = 'mq-test-1'; -div.style.cssText = 'position:absolute;top:-100em'; -fakeBody.style.background = 'none
incubator-nifi git commit: Updated main index for feature highlights
Repository: incubator-nifi Updated Branches: refs/heads/develop e2750d408 - 30fcf882e Updated main index for feature highlights Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/30fcf882 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/30fcf882 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/30fcf882 Branch: refs/heads/develop Commit: 30fcf882ec2fcbeefec2229393f5ca453d922d05 Parents: e2750d4 Author: joewitt joew...@apache.org Authored: Wed May 13 22:30:50 2015 -0400 Committer: joewitt joew...@apache.org Committed: Wed May 13 22:30:50 2015 -0400 -- nifi-site/src/pages/html/index.hbs | 179 1 file changed, 22 insertions(+), 157 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/30fcf882/nifi-site/src/pages/html/index.hbs -- diff --git a/nifi-site/src/pages/html/index.hbs b/nifi-site/src/pages/html/index.hbs index d01e8bc..8ee8208 100644 --- a/nifi-site/src/pages/html/index.hbs +++ b/nifi-site/src/pages/html/index.hbs @@ -42,169 +42,34 @@ title: Apache NiFi of the high-level capabilities and objectives of Apache NiFi include: /p ul -liWeb-based user interface for seamless experience between design, control, feedback, and monitoring -of data flows +liWeb-based user interface +ulliSeamless experience between design, control, feedback, and monitoring/li/ul /li -liHighly configurable along several dimensions of quality of service such as loss tolerant versus -guaranteed delivery, low latency versus high throughput, and priority based queuing +liHighly configurable +ul +liLoss tolerant vs guaranteed delivery/li +liLow latency vs high throughput/li +liDynamic prioritization/li +liFlow can be modified at runtime/li +liBack pressure/li +/ul /li -liFine-grained data provenance for all data received, forked, joined, cloned, modified, sent, and -ultimately dropped as data reaches its configured end-state +liData Provenance +ulliTrack dataflow from beginning to end/li/ul /li -liComponent-based extension model along well defined interfaces enabling rapid development and -effective testing +liDesigned for extension +ul +liBuild your own processors and more/li +liEnables rapid development and effective testing/li +/ul /li -liSecurity: Supports various forms of SSL, SSH, HTTPS for system to system flows and content -encryption/decryption. And SSL, PKI, pluggable authorization for users. +liSecure +ul +liSSL, SSH, HTTPS, encrypted content, etc.../li +liPluggable role-based authentication/authorization/li +/ul /li /ul /div /div -!--div class=row -div class=large-12 columns -h1Welcome to Foundation/h1 -/div -/div - -div class=row -div class=large-12 columns -div class=panel -h3Wersquo;re stoked you want to try Foundation! /h3 -pTo get going, this file (index.html) includes some basic styles you can modify, play around with, or totally destroy to get going./p -pOnce you've exhausted the fun in this document, you should check out:/p -div class=row -div class=large-4 medium-4 columns -pa href=http://foundation.zurb.com/docs;Foundation Documentation/abr /Everything you need to know about using the framework./p -/div -div class=large-4 medium-4 columns -pa href=http://github.com/zurb/foundation;Foundation on Github/abr /Latest code, issue reports, feature requests and more./p -/div -div class=large-4 medium-4 columns -pa href=http://twitter.com/foundationzurb;@foundationzurb/abr /Ping us on Twitter if you have questions. If you build something with this we'd love to see it (and send you a totally boss sticker)./p -/div -/div -/div -/div -/div - -div class=row -div class=large-8 medium-8 columns -h5Herersquo;s your basic grid:/h5 -Grid Example - -div class=row -div class=large-12 columns -div class=callout
svn commit: r1679304 [2/3] - in /incubator/nifi/site/trunk: ./ assets/js/ docs/
Modified: incubator/nifi/site/trunk/assets/js/jquery.min.js URL: http://svn.apache.org/viewvc/incubator/nifi/site/trunk/assets/js/jquery.min.js?rev=1679304r1=1679303r2=1679304view=diff == --- incubator/nifi/site/trunk/assets/js/jquery.min.js (original) +++ incubator/nifi/site/trunk/assets/js/jquery.min.js Thu May 14 02:29:30 2015 @@ -1,5 +1,5 @@ -/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){object==typeof moduleobject==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error(jQuery requires a window with a document);return b(a)}:b(a)}(undefined!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m=2.1.3,n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:,length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply( this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0a?b:0);return this.pushStack(c=0bc?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for(boolean==typeof g(j=g,g=arguments[h]||{},h++),object==typeof g||n.isFunction(g)||(g={}),h===i(g=this,h--);ih;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d(jd(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=cn.isArray(c)?c:[]):f=cn.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d(g[b]=d));return g},n.extend({expando:jQuery+(m+Math.random()).replace(/\D/g,),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){returnfunction===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=aa===a.window},isNumeric:functi on(a){return!n.isArray(a)a-parseFloat(a)+1=0},isPlainObject:function(a){returnobject!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor!j.call(a.constructor.prototype,isPrototypeOf)?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+:object==typeof a||function==typeof a?h[i.call(a)]||object:typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a(1===a.indexOf(use strict)?(b=l.createElement(script),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,ms-).replace(q,r)},nodeName:function(a,b){return a.nodeNamea.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;fe;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;fe;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a ){return null==a?:(a+).replace(o,)},makeArray:function(a,b){var c=b||[];return null!=a(s(Object(a))?n.merge(c,string==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;cd;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;gf;f++)d=!b(a[f],f),d!==he.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;gf;f++)d=b(a[f],f,c),null!=di.push(d);else for(f in a)d=b(a[f],f,c),null!=di.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;returnstring==typeof b(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each(Boolean Number String Function Array Date RegExp Object Error.split( ),function(a,b){h[[object +b+]]=b.toLowerCase()});function s(a){va r b=a.length,c=n.type(a);returnfunction===c||n.isWindow(a)?!1:1===a.nodeTypeb?!0:array===c||0===b||number==typeof bb0b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=sizzle+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b(l=!0),0},C=131,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;dc;c++)if(a[c]===b)return
svn commit: r1677740 - /incubator/nifi/site/trunk/content/development/release-guide.md
Author: joewitt Date: Tue May 5 04:25:59 2015 New Revision: 1677740 URL: http://svn.apache.org/r1677740 Log: modified profile name to reflect new name 'contrib-check' for NIFI-587 Modified: incubator/nifi/site/trunk/content/development/release-guide.md Modified: incubator/nifi/site/trunk/content/development/release-guide.md URL: http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/release-guide.md?rev=1677740r1=1677739r2=1677740view=diff == --- incubator/nifi/site/trunk/content/development/release-guide.md (original) +++ incubator/nifi/site/trunk/content/development/release-guide.md Tue May 5 04:25:59 2015 @@ -75,7 +75,7 @@ There are two lists here: one of specifi - `https://repository.apache.org/service/local/repositories/orgapachenifi-1011/content/org/apache/nifi/nifi/0.0.1-incubating/nifi-0.0.1-incubating-source-release.zip.asc` - Need a quick reminder on how to [verify a signature](http://www.apache.org/dev/release-signing.html#verifying-signature)? - Do all sources have necessary headers? -- Unzip the sources file into a directory and execute `mvn install -Pcheck-licenses` +- Unzip the sources file into a directory and execute `mvn install -Pcontrib-check` - Are there no unexpected binary files in the release? - The only thing we'd expect would be potentially test resources files. - Does the app (if appropriate) execute and function as expected? @@ -141,7 +141,7 @@ The application should be up and running Evaluate and ensure the appropriate license headers are present on all source files. Ensure LICENSE and NOTICE files are complete and accurate. Developers should always be keeping these up to date as they go along adding source and modifying dependencies to keep this burden manageable. -This command `mvn install -Pcheck-licenses` should be run as well to help validate. If that doesn't complete cleanly it must be addressed. +This command `mvn install -Pcontrib-check` should be run as well to help validate. If that doesn't complete cleanly it must be addressed. Now its time to have maven prepare the release so execute `mvn release:prepare -Psigned_release -DscmCommentPrefix=NIFI-270-RC1 -Darguments=-DskipTests`. Maven will ask:
svn commit: r950128 - /websites/production/nifi/content/
Author: joewitt Date: Tue May 5 04:26:14 2015 New Revision: 950128 Log: Publishing svnmucc operation to nifi site by joewitt Added: websites/production/nifi/content/ - copied from r950127, websites/staging/nifi/trunk/content/
incubator-nifi git commit: NIFI-587 moved checkstyle into profile with rat plugin. They were too unstable
Repository: incubator-nifi Updated Branches: refs/heads/develop 37e5548ac - 41b21af57 NIFI-587 moved checkstyle into profile with rat plugin. They were too unstable Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/41b21af5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/41b21af5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/41b21af5 Branch: refs/heads/develop Commit: 41b21af5769211b9a57e5bef47fe40c6d34839b1 Parents: 37e5548 Author: joewitt joew...@apache.org Authored: Tue May 5 00:59:28 2015 -0400 Committer: joewitt joew...@apache.org Committed: Tue May 5 00:59:28 2015 -0400 -- nifi-parent/pom.xml | 32 +--- 1 file changed, 21 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/41b21af5/nifi-parent/pom.xml -- diff --git a/nifi-parent/pom.xml b/nifi-parent/pom.xml index 6fcf364..fb2f827 100644 --- a/nifi-parent/pom.xml +++ b/nifi-parent/pom.xml @@ -259,14 +259,6 @@ plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId -executions -execution -idcheck-style/id -goals -goalcheck/goal -/goals -/execution -/executions configuration checkstyleRules module name=Checker @@ -377,9 +369,15 @@ /build profiles profile -!-- Automatically check for licenses. Too slow to always run. -Activate with -P check-licenses -- -idcheck-licenses/id +!-- +Checks style and licensing requirements. This is a good idea to +run for contributions and for the release process. While it +would be nice to run always these plugins can considerably slow +the build and have proven to create unstable builds in our +multi-module project and when building using multiple threads. +The stability issues seen with Checkstyle in multi-module builds +include false-positives and false negatives.-- +idcontrib-check/id build plugins plugin @@ -394,6 +392,18 @@ /execution /executions /plugin +plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-checkstyle-plugin/artifactId +executions +execution +idcheck-style/id +goals +goalcheck/goal +/goals +/execution +/executions +/plugin /plugins /build /profile
[2/2] incubator-nifi git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/a43eecf1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/a43eecf1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/a43eecf1 Branch: refs/heads/develop Commit: a43eecf1bde9b7ab30fbfdcdf5bd1d04fa2f0985 Parents: 34c81e1 b6b8c95 Author: joewitt joew...@apache.org Authored: Sat May 2 16:43:44 2015 -0400 Committer: joewitt joew...@apache.org Committed: Sat May 2 16:43:44 2015 -0400 -- .../nifi-resources/src/main/resources/conf/logback.xml| 3 +++ .../java/org/apache/nifi/web/api/SystemDiagnosticsResource.java | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) --
incubator-nifi git commit: NIFI-526 addressed the two checkstyle findings. Curious how they got in there
Repository: incubator-nifi Updated Branches: refs/heads/develop 8c006237e - 57e78bf72 NIFI-526 addressed the two checkstyle findings. Curious how they got in there Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/57e78bf7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/57e78bf7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/57e78bf7 Branch: refs/heads/develop Commit: 57e78bf723c0f1ddb642475e0b16cdf52c8ee1fd Parents: 8c00623 Author: joewitt joew...@apache.org Authored: Tue Apr 28 15:31:27 2015 -0400 Committer: joewitt joew...@apache.org Committed: Tue Apr 28 15:31:27 2015 -0400 -- .../main/java/org/apache/nifi/processors/standard/GetHTTP.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/57e78bf7/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java index a1f57da..db32e30 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java @@ -435,7 +435,7 @@ public class GetHTTP extends AbstractSessionFactoryProcessor { readLock.unlock(); writeLock.lock(); try { - if (timeToPersist System.currentTimeMillis()) { +if (timeToPersist System.currentTimeMillis()) { timeToPersist = System.currentTimeMillis() + PERSISTENCE_INTERVAL_MSEC; File httpCache = new File(HTTP_CACHE_FILE_PREFIX + getIdentifier()); try (FileOutputStream fos = new FileOutputStream(httpCache)) { @@ -447,8 +447,7 @@ public class GetHTTP extends AbstractSessionFactoryProcessor { getLogger().error(Failed to persist ETag and LastMod due to + e, e); } } -} -finally { +} finally { readLock.lock(); writeLock.unlock(); }
[15/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java index 7f92213..042e4a6 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java @@ -45,7 +45,14 @@ import org.apache.nifi.util.ObjectHolder; import java.io.IOException; import java.io.OutputStream; import java.nio.charset.StandardCharsets; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; @@ -64,8 +71,10 @@ import java.util.concurrent.ConcurrentMap; + If Destination is 'flowfile-content' and the JsonPath does not evaluate to a defined path, the FlowFile will be routed to 'unmatched' without having its contents modified. + If Destination is flowfile-attribute and the expression matches nothing, attributes will be created with + empty strings as the value, and the FlowFile will always be routed to 'matched.') -@DynamicProperty(name = A FlowFile attribute(if Destination is set to 'flowfile-attribute'), value = A JsonPath expression, description = If Destination='flowfile-attribute' then that FlowFile attribute + -will be set to any JSON objects that match the JsonPath. If Destination='flowfile-content' then the FlowFile content will be updated to any JSON objects that match the JsonPath.) +@DynamicProperty(name = A FlowFile attribute(if Destination is set to 'flowfile-attribute'), +value = A JsonPath expression, description = If Destination='flowfile-attribute' then that FlowFile attribute ++ will be set to any JSON objects that match the JsonPath. If Destination='flowfile-content' then the FlowFile ++ content will be updated to any JSON objects that match the JsonPath.) public class EvaluateJsonPath extends AbstractJsonPathProcessor { public static final String DESTINATION_ATTRIBUTE = flowfile-attribute; @@ -77,34 +86,47 @@ public class EvaluateJsonPath extends AbstractJsonPathProcessor { public static final String PATH_NOT_FOUND_IGNORE = ignore; public static final String PATH_NOT_FOUND_WARN = warn; - + public static final PropertyDescriptor DESTINATION = new PropertyDescriptor.Builder() .name(Destination) -.description(Indicates whether the results of the JsonPath evaluation are written to the FlowFile content or a FlowFile attribute; if using attribute, must specify the Attribute Name property. If set to flowfile-content, only one JsonPath may be specified, and the property name is ignored.) +.description(Indicates whether the results of the JsonPath evaluation are written to the FlowFile content or a FlowFile attribute; ++ if using attribute, must specify the Attribute Name property. If set to flowfile-content, only one JsonPath may be specified, ++ and the property name is ignored.) .required(true) .allowableValues(DESTINATION_CONTENT, DESTINATION_ATTRIBUTE) .defaultValue(DESTINATION_CONTENT) .build(); public static final PropertyDescriptor RETURN_TYPE = new PropertyDescriptor.Builder() -.name(Return Type) -.description(Indicates the desired return type of the JSON Path expressions. Selecting 'auto-detect' will set the return type to 'json' for a Destination of 'flowfile-content', and 'string' for a Destination of 'flowfile-attribute'.) +.name(Return Type).description(Indicates the desired return type of the JSON Path expressions. Selecting 'auto-detect' will set the return type to 'json' ++ for a Destination of 'flowfile-content', and 'string' for a Destination of 'flowfile-attribute'.) .required(true) .allowableValues(RETURN_TYPE_AUTO, RETURN_TYPE_JSON, RETURN_TYPE_SCALAR) .defaultValue(RETURN_TYPE_AUTO) .build(); - + public static final PropertyDescriptor PATH_NOT_FOUND = new PropertyDescriptor.Builder() .name(Path Not Found
[06/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/org/apache/tika/mime/custom-mimetypes.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/org/apache/tika/mime/custom-mimetypes.xml b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/org/apache/tika/mime/custom-mimetypes.xml index 7a357d5..78694cc 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/org/apache/tika/mime/custom-mimetypes.xml +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/org/apache/tika/mime/custom-mimetypes.xml @@ -15,83 +15,83 @@ -- mime-info - mime-type type=application/flowfile-v1 -_commentNiFi FlowFile V1/_comment -sub-class-of type=application/x-tar/ -magic - match value=flowfile.attributes type=string offset=0 / -/magic - /mime-type +mime-type type=application/flowfile-v1 +_commentNiFi FlowFile V1/_comment +sub-class-of type=application/x-tar/ +magic +match value=flowfile.attributes type=string offset=0 / +/magic +/mime-type - mime-type type=application/flowfile-v3 -_commentNiFi FlowFile V3/_comment -magic - match value=NiFiFF3 type=string offset=0 / -/magic - /mime-type +mime-type type=application/flowfile-v3 +_commentNiFi FlowFile V3/_comment +magic +match value=NiFiFF3 type=string offset=0 / +/magic +/mime-type - mime-type type=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet -_commentOffice Open XML Workbook/_comment -glob pattern=*.xlsx/ -sub-class-of type=application/x-tika-ooxml/ -magic priority=60 - match value=PK\003\004 type=string offset=0 -match value=[Content_Types].xml type=string offset=30 - match value=xl/_rels/workbook.xml.rels type=string offset=30:4096/ -/match - /match -/magic - /mime-type +mime-type type=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet +_commentOffice Open XML Workbook/_comment +glob pattern=*.xlsx/ +sub-class-of type=application/x-tika-ooxml/ +magic priority=60 +match value=PK\003\004 type=string offset=0 +match value=[Content_Types].xml type=string offset=30 +match value=xl/_rels/workbook.xml.rels type=string offset=30:4096/ +/match +/match +/magic +/mime-type - mime-type type=application/vnd.openxmlformats-officedocument.wordprocessingml.document -_commentOffice Open XML Document/_comment -glob pattern=*.docx/ -sub-class-of type=application/x-tika-ooxml/ -magic priority=60 - match value=PK\003\004 type=string offset=0 -match value=[Content_Types].xml type=string offset=30 - match value=word/_rels/document.xml.rels type=string offset=30:4096/ -/match - /match -/magic - /mime-type +mime-type type=application/vnd.openxmlformats-officedocument.wordprocessingml.document +_commentOffice Open XML Document/_comment +glob pattern=*.docx/ +sub-class-of type=application/x-tika-ooxml/ +magic priority=60 +match value=PK\003\004 type=string offset=0 +match value=[Content_Types].xml type=string offset=30 +match value=word/_rels/document.xml.rels type=string offset=30:4096/ +/match +/match +/magic +/mime-type - mime-type type=application/vnd.openxmlformats-officedocument.presentationml.presentation -_commentOffice Open XML Presentation/_comment -glob pattern=*.pptx/ -glob pattern=*.thmx/ -sub-class-of type=application/x-tika-ooxml/ -magic priority=60 - match value=PK\003\004 type=string offset=0 -match value=[Content_Types].xml type=string offset=30 - match value=ppt/slides/_rels/slide type=string offset=30:4096/ -/match - /match -/magic - /mime-type +mime-type type=application/vnd.openxmlformats-officedocument.presentationml.presentation +_commentOffice Open XML Presentation/_comment +glob pattern=*.pptx/ +glob pattern=*.thmx/ +sub-class-of type=application/x-tika-ooxml/ +magic priority=60 +match value=PK\003\004 type=string offset=0 +match value=[Content_Types].xml type=string offset=30 +match value=ppt/slides/_rels/slide type=string offset=30:4096/ +/match +/match +/magic +/mime-type - mime-type type=application/java-archive -_commentJava Archive/_comment -
[01/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
Repository: incubator-nifi Updated Branches: refs/heads/develop 87e829682 - 548188939 http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitText.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitText.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitText.java index 893ed29..aeb887a 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitText.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitText.java @@ -81,17 +81,22 @@ public class TestSplitText { runner.assertTransferCount(SplitText.REL_ORIGINAL, 1); runner.assertTransferCount(SplitText.REL_SPLITS, 4); -final ListMockFlowFile splits = runner.getFlowFilesForRelationship(SplitText.REL_SPLITS); +final ListMockFlowFile splits = runner. +getFlowFilesForRelationship(SplitText.REL_SPLITS); final String expected0 = Header Line #1\nHeader Line #2\nLine #1; final String expected1 = Line #2\nLine #3\nLine #4; final String expected2 = Line #5\nLine #6\nLine #7; final String expected3 = Line #8\nLine #9\nLine #10; -splits.get(0).assertContentEquals(expected0); -splits.get(1).assertContentEquals(expected1); -splits.get(2).assertContentEquals(expected2); -splits.get(3).assertContentEquals(expected3); +splits.get(0). +assertContentEquals(expected0); +splits.get(1). +assertContentEquals(expected1); +splits.get(2). +assertContentEquals(expected2); +splits.get(3). +assertContentEquals(expected3); } @Test @@ -107,11 +112,14 @@ public class TestSplitText { runner.assertTransferCount(SplitText.REL_ORIGINAL, 1); runner.assertTransferCount(SplitText.REL_SPLITS, 4); -final ListMockFlowFile splits = runner.getFlowFilesForRelationship(SplitText.REL_SPLITS); +final ListMockFlowFile splits = runner. +getFlowFilesForRelationship(SplitText.REL_SPLITS); for (int i = 0; i splits.size(); i++) { final MockFlowFile split = splits.get(i); -split.assertContentEquals(file.getParent().resolve((i + 1) + .txt)); -split.assertAttributeEquals(SplitText.FRAGMENT_INDEX, String.valueOf(i + 1)); +split.assertContentEquals(file.getParent(). +resolve((i + 1) + .txt)); +split.assertAttributeEquals(SplitText.FRAGMENT_INDEX, String. +valueOf(i + 1)); } } @@ -128,16 +136,26 @@ public class TestSplitText { runner.assertTransferCount(SplitText.REL_ORIGINAL, 1); runner.assertTransferCount(SplitText.REL_SPLITS, 2); -final ListMockFlowFile splits = runner.getFlowFilesForRelationship(SplitText.REL_SPLITS); -splits.get(0).assertContentEquals(file.getParent().resolve(5.txt)); -splits.get(0).assertAttributeEquals(SplitText.FRAGMENT_INDEX, String.valueOf(1)); -splits.get(1).assertContentEquals(file.getParent().resolve(6.txt)); -splits.get(1).assertAttributeEquals(SplitText.FRAGMENT_INDEX, String.valueOf(2)); +final ListMockFlowFile splits = runner. +getFlowFilesForRelationship(SplitText.REL_SPLITS); +splits.get(0). +assertContentEquals(file.getParent(). +resolve(5.txt)); +splits.get(0). +assertAttributeEquals(SplitText.FRAGMENT_INDEX, String. +valueOf(1)); +splits.get(1). +assertContentEquals(file.getParent(). +resolve(6.txt)); +splits.get(1). +assertAttributeEquals(SplitText.FRAGMENT_INDEX, String. +valueOf(2)); } @Test public void testSplitThenMerge() throws IOException { -final TestRunner splitRunner = TestRunners.newTestRunner(new SplitText()); +final TestRunner splitRunner = TestRunners. +newTestRunner(new SplitText()); splitRunner.setProperty(SplitText.LINE_SPLIT_COUNT, 3); splitRunner.setProperty(SplitText.REMOVE_TRAILING_NEWLINES, false); @@ -148,15 +166,20 @@ public class TestSplitText { splitRunner.assertTransferCount(SplitText.REL_ORIGINAL, 1); splitRunner.assertTransferCount(SplitText.REL_FAILURE, 0); -final ListMockFlowFile splits =
[12/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java index d67ed09..6b906c2 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java @@ -121,7 +121,7 @@ import com.sun.jersey.api.client.ClientResponse.Status; @SupportsBatching @Tags({http, https, remote, copy, archive}) @CapabilityDescription(Performs an HTTP Post with the content of the FlowFile) -@ReadsAttribute(attribute=mime.type, description=If not sending data as a FlowFile, the mime.type attribute will be used to set the HTTP Header for Content-Type) +@ReadsAttribute(attribute = mime.type, description = If not sending data as a FlowFile, the mime.type attribute will be used to set the HTTP Header for Content-Type) public class PostHTTP extends AbstractProcessor { public static final String CONTENT_TYPE = Content-Type; @@ -143,7 +143,8 @@ public class PostHTTP extends AbstractProcessor { public static final PropertyDescriptor URL = new PropertyDescriptor.Builder() .name(URL) -.description(The URL to POST to. The first part of the URL must be static. However, the path of the URL may be defined using the Attribute Expression Language. For example, https://${hostname} is not valid, but https://1.1.1.1:8080/files/${nf.file.name} is valid.) +.description(The URL to POST to. The first part of the URL must be static. However, the path of the URL may be defined using the Attribute Expression Language. ++ For example, https://${hostname} is not valid, but https://1.1.1.1:8080/files/${nf.file.name} is valid.) .required(true) .addValidator(StandardValidators.createRegexMatchingValidator(Pattern.compile(https?\\://.*))) .addValidator(StandardValidators.URL_VALIDATOR) @@ -210,7 +211,9 @@ public class PostHTTP extends AbstractProcessor { .build(); public static final PropertyDescriptor MAX_BATCH_SIZE = new PropertyDescriptor.Builder() .name(Max Batch Size) -.description(If the Send as FlowFile property is true, specifies the max data size for a batch of FlowFiles to send in a single HTTP POST. If not specified, each FlowFile will be sent separately. If the Send as FlowFile property is false, this property is ignored) +.description(If the Send as FlowFile property is true, specifies the max data size for a batch of FlowFiles to send in a single ++ HTTP POST. If not specified, each FlowFile will be sent separately. If the Send as FlowFile property is false, this ++ property is ignored) .required(false) .addValidator(StandardValidators.DATA_SIZE_VALIDATOR) .defaultValue(100 MB) @@ -230,8 +233,14 @@ public class PostHTTP extends AbstractProcessor { .identifiesControllerService(SSLContextService.class) .build(); -public static final Relationship REL_SUCCESS = new Relationship.Builder().name(success).description(Files that are successfully send will be transferred to success).build(); -public static final Relationship REL_FAILURE = new Relationship.Builder().name(failure).description(Files that fail to send will transferred to failure).build(); +public static final Relationship REL_SUCCESS = new Relationship.Builder() +.name(success) +.description(Files that are successfully send will be transferred to success) +.build(); +public static final Relationship REL_FAILURE = new Relationship.Builder() +.name(failure) +.description(Files that fail to send will transferred to failure) +.build(); private SetRelationship relationships; private ListPropertyDescriptor properties; @@ -281,9 +290,7 @@ public class PostHTTP extends AbstractProcessor { if (context.getProperty(URL).getValue().startsWith(https) context.getProperty(SSL_CONTEXT_SERVICE).getValue() == null) { results.add(new ValidationResult.Builder() .explanation(URL is set to HTTPS protocol but no SSLContext has been specified) -.valid(false) -.subject(SSL Context) -.build()); +
[02/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceTextWithMapping.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceTextWithMapping.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceTextWithMapping.java index 080f4b2..89f330b 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceTextWithMapping.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceTextWithMapping.java @@ -36,15 +36,23 @@ public class TestReplaceTextWithMapping { @Test public void testSimple() throws IOException { -final TestRunner runner = TestRunners.newTestRunner(new ReplaceTextWithMapping()); -final String mappingFile = Paths.get(src/test/resources/TestReplaceTextWithMapping/color-fruit-mapping.txt).toFile().getAbsolutePath(); +final TestRunner runner = TestRunners. +newTestRunner(new ReplaceTextWithMapping()); +final String mappingFile = Paths. + get(src/test/resources/TestReplaceTextWithMapping/color-fruit-mapping.txt). +toFile(). +getAbsolutePath(); runner.setProperty(ReplaceTextWithMapping.MAPPING_FILE, mappingFile); - runner.enqueue(Paths.get(src/test/resources/TestReplaceTextWithMapping/colors-without-dashes.txt)); +runner.enqueue(Paths. + get(src/test/resources/TestReplaceTextWithMapping/colors-without-dashes.txt)); runner.run(); - runner.assertAllFlowFilesTransferred(ReplaceTextWithMapping.REL_SUCCESS, 1); -final MockFlowFile out = runner.getFlowFilesForRelationship(ReplaceTextWithMapping.REL_SUCCESS).get(0); +runner. + assertAllFlowFilesTransferred(ReplaceTextWithMapping.REL_SUCCESS, 1); +final MockFlowFile out = runner. + getFlowFilesForRelationship(ReplaceTextWithMapping.REL_SUCCESS). +get(0); String outputString = new String(out.toByteArray()); String expected = roses are apple\n + violets are blueberry\n @@ -55,8 +63,12 @@ public class TestReplaceTextWithMapping { @Test public void testExpressionLanguageInText() throws IOException { -final TestRunner runner = TestRunners.newTestRunner(new ReplaceTextWithMapping()); -final String mappingFile = Paths.get(src/test/resources/TestReplaceTextWithMapping/color-fruit-mapping.txt).toFile().getAbsolutePath(); +final TestRunner runner = TestRunners. +newTestRunner(new ReplaceTextWithMapping()); +final String mappingFile = Paths. + get(src/test/resources/TestReplaceTextWithMapping/color-fruit-mapping.txt). +toFile(). +getAbsolutePath(); runner.setProperty(ReplaceTextWithMapping.MAPPING_FILE, mappingFile); String text = ${foo} red ${baz}; @@ -64,8 +76,11 @@ public class TestReplaceTextWithMapping { runner.enqueue(text.getBytes()); runner.run(); - runner.assertAllFlowFilesTransferred(ReplaceTextWithMapping.REL_SUCCESS, 1); -final MockFlowFile out = runner.getFlowFilesForRelationship(ReplaceTextWithMapping.REL_SUCCESS).get(0); +runner. + assertAllFlowFilesTransferred(ReplaceTextWithMapping.REL_SUCCESS, 1); +final MockFlowFile out = runner. + getFlowFilesForRelationship(ReplaceTextWithMapping.REL_SUCCESS). +get(0); String outputString = new String(out.toByteArray()); String expected = ${foo} apple ${baz}; assertEquals(expected, outputString); @@ -73,19 +88,27 @@ public class TestReplaceTextWithMapping { @Test public void testExpressionLanguageInText2() throws IOException { -final TestRunner runner = TestRunners.newTestRunner(new ReplaceTextWithMapping()); -final String mappingFile = Paths.get(src/test/resources/TestReplaceTextWithMapping/color-fruit-mapping.txt).toFile().getAbsolutePath(); +final TestRunner runner = TestRunners. +newTestRunner(new ReplaceTextWithMapping()); +final String mappingFile = Paths. + get(src/test/resources/TestReplaceTextWithMapping/color-fruit-mapping.txt). +toFile(). +getAbsolutePath(); runner.setProperty(ReplaceTextWithMapping.MAPPING_FILE, mappingFile); runner.setProperty(ReplaceTextWithMapping.REGEX, \\|(.*?)\\|); -
[09/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java index 1220b7c..8e80e91 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java @@ -66,17 +66,26 @@ import org.xml.sax.XMLReader; @CapabilityDescription(Splits an XML File into multiple separate FlowFiles, each comprising a child or descendant of the original root element) public class SplitXml extends AbstractProcessor { -public static final PropertyDescriptor SPLIT_DEPTH = new PropertyDescriptor.Builder() -.name(Split Depth) -.description(Indicates the XML-nesting depth to start splitting XML fragments. A depth of 1 means split the root's children, whereas a depth of 2 means split the root's children's children and so forth.) -.required(true) -.addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR) -.defaultValue(1) -.build(); - -public static final Relationship REL_ORIGINAL = new Relationship.Builder().name(original).description(The original FlowFile that was split into segments. If the FlowFile fails processing, nothing will be sent to this relationship).build(); -public static final Relationship REL_SPLIT = new Relationship.Builder().name(split).description(All segments of the original FlowFile will be routed to this relationship).build(); -public static final Relationship REL_FAILURE = new Relationship.Builder().name(failure).description(If a FlowFile fails processing for any reason (for example, the FlowFile is not valid XML), it will be routed to this relationship).build(); +public static final PropertyDescriptor SPLIT_DEPTH = new PropertyDescriptor.Builder(). +name(Split Depth). +description(Indicates the XML-nesting depth to start splitting XML fragments. A depth of 1 means split the root's children, whereas a depth of 2 means split the root's children's children and so forth.). +required(true). +addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR). +defaultValue(1). +build(); + +public static final Relationship REL_ORIGINAL = new Relationship.Builder(). +name(original). +description(The original FlowFile that was split into segments. If the FlowFile fails processing, nothing will be sent to this relationship). +build(); +public static final Relationship REL_SPLIT = new Relationship.Builder(). +name(split). +description(All segments of the original FlowFile will be routed to this relationship). +build(); +public static final Relationship REL_FAILURE = new Relationship.Builder(). +name(failure). +description(If a FlowFile fails processing for any reason (for example, the FlowFile is not valid XML), it will be routed to this relationship). +build(); private ListPropertyDescriptor properties; private SetRelationship relationships; @@ -84,7 +93,8 @@ public class SplitXml extends AbstractProcessor { private static final String FEATURE_PREFIX = http://xml.org/sax/features/;; public static final String ENABLE_NAMESPACES_FEATURE = FEATURE_PREFIX + namespaces; public static final String ENABLE_NAMESPACE_PREFIXES_FEATURE = FEATURE_PREFIX + namespace-prefixes; -private static final SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); +private static final SAXParserFactory saxParserFactory = SAXParserFactory. +newInstance(); static { saxParserFactory.setNamespaceAware(true); @@ -93,7 +103,8 @@ public class SplitXml extends AbstractProcessor { saxParserFactory.setFeature(ENABLE_NAMESPACE_PREFIXES_FEATURE, true); } catch (Exception e) { final Logger staticLogger = LoggerFactory.getLogger(SplitXml.class); -staticLogger.warn(Unable to configure SAX Parser to make namespaces available, e); +staticLogger. +warn(Unable to configure SAX Parser to make namespaces available, e); } } @@ -127,7 +138,8 @@ public class SplitXml extends AbstractProcessor { return; } -final int depth = context.getProperty(SPLIT_DEPTH).asInteger(); +
[03/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestModifyBytes.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestModifyBytes.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestModifyBytes.java index 329aace..2c58b80 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestModifyBytes.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestModifyBytes.java @@ -41,11 +41,14 @@ public class TestModifyBytes { runner.setProperty(ModifyBytes.START_OFFSET, 1 MB); runner.setProperty(ModifyBytes.END_OFFSET, 1 MB); - runner.enqueue(Paths.get(src/test/resources/TestModifyBytes/testFile.txt)); +runner.enqueue(Paths. +get(src/test/resources/TestModifyBytes/testFile.txt)); runner.run(); runner.assertAllFlowFilesTransferred(ModifyBytes.REL_SUCCESS, 1); -final MockFlowFile out = runner.getFlowFilesForRelationship(ModifyBytes.REL_SUCCESS).get(0); +final MockFlowFile out = runner. +getFlowFilesForRelationship(ModifyBytes.REL_SUCCESS). +get(0); out.assertContentEquals(.getBytes(UTF-8)); } @@ -55,12 +58,16 @@ public class TestModifyBytes { runner.setProperty(ModifyBytes.START_OFFSET, 0 MB); runner.setProperty(ModifyBytes.END_OFFSET, 0 MB); - runner.enqueue(Paths.get(src/test/resources/TestModifyBytes/testFile.txt)); +runner.enqueue(Paths. +get(src/test/resources/TestModifyBytes/testFile.txt)); runner.run(); runner.assertAllFlowFilesTransferred(ModifyBytes.REL_SUCCESS, 1); -final MockFlowFile out = runner.getFlowFilesForRelationship(ModifyBytes.REL_SUCCESS).get(0); -out.assertContentEquals(translateNewLines(new File(src/test/resources/TestModifyBytes/testFile.txt))); +final MockFlowFile out = runner. +getFlowFilesForRelationship(ModifyBytes.REL_SUCCESS). +get(0); +out. +assertContentEquals(translateNewLines(new File(src/test/resources/TestModifyBytes/testFile.txt))); } @Test @@ -69,14 +76,18 @@ public class TestModifyBytes { runner.setProperty(ModifyBytes.START_OFFSET, 12 B); //REMOVE - 'HEADER' runner.setProperty(ModifyBytes.END_OFFSET, 0 MB); - runner.enqueue(Paths.get(src/test/resources/TestModifyBytes/testFile.txt)); +runner.enqueue(Paths. +get(src/test/resources/TestModifyBytes/testFile.txt)); runner.run(); runner.assertAllFlowFilesTransferred(ModifyBytes.REL_SUCCESS, 1); -final MockFlowFile out = runner.getFlowFilesForRelationship(ModifyBytes.REL_SUCCESS).get(0); +final MockFlowFile out = runner. +getFlowFilesForRelationship(ModifyBytes.REL_SUCCESS). +get(0); final String outContent = new String(out.toByteArray(), StandardCharsets.UTF_8); System.out.println(outContent); -out.assertContentEquals(translateNewLines(new File(src/test/resources/TestModifyBytes/noHeader.txt))); +out. +assertContentEquals(translateNewLines(new File(src/test/resources/TestModifyBytes/noHeader.txt))); } @Test @@ -85,11 +96,14 @@ public class TestModifyBytes { runner.setProperty(ModifyBytes.START_OFFSET, 181 B); runner.setProperty(ModifyBytes.END_OFFSET, 0 B); - runner.enqueue(Paths.get(src/test/resources/TestModifyBytes/testFile.txt)); +runner.enqueue(Paths. +get(src/test/resources/TestModifyBytes/testFile.txt)); runner.run(); runner.assertAllFlowFilesTransferred(ModifyBytes.REL_SUCCESS, 1); -final MockFlowFile out = runner.getFlowFilesForRelationship(ModifyBytes.REL_SUCCESS).get(0); +final MockFlowFile out = runner. +getFlowFilesForRelationship(ModifyBytes.REL_SUCCESS). +get(0); final String outContent = new String(out.toByteArray(), StandardCharsets.UTF_8); System.out.println(outContent); out.assertContentEquals(FOOTER.getBytes(UTF-8)); @@ -101,11 +115,14 @@ public class TestModifyBytes { runner.setProperty(ModifyBytes.START_OFFSET, 0 B); runner.setProperty(ModifyBytes.END_OFFSET, 181 B); - runner.enqueue(Paths.get(src/test/resources/TestModifyBytes/testFile.txt)); +runner.enqueue(Paths. +
[11/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFileTransfer.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFileTransfer.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFileTransfer.java index da80546..893aee9 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFileTransfer.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFileTransfer.java @@ -43,13 +43,23 @@ import java.util.concurrent.TimeUnit; /** * Base class for PutFTP PutSFTP + * * @param T */ public abstract class PutFileTransferT extends FileTransfer extends AbstractProcessor { -public static final Relationship REL_SUCCESS = new Relationship.Builder().name(success).description(FlowFiles that are successfully sent will be routed to success).build(); -public static final Relationship REL_FAILURE = new Relationship.Builder().name(failure).description(FlowFiles that failed to send to the remote system; failure is usually looped back to this processor).build(); -public static final Relationship REL_REJECT = new Relationship.Builder().name(reject).description(FlowFiles that were rejected by the destination system).build(); +public static final Relationship REL_SUCCESS = new Relationship.Builder(). +name(success). +description(FlowFiles that are successfully sent will be routed to success). +build(); +public static final Relationship REL_FAILURE = new Relationship.Builder(). +name(failure). +description(FlowFiles that failed to send to the remote system; failure is usually looped back to this processor). +build(); +public static final Relationship REL_REJECT = new Relationship.Builder(). +name(reject). +description(FlowFiles that were rejected by the destination system). +build(); private final SetRelationship relationships; @@ -85,26 +95,42 @@ public abstract class PutFileTransferT extends FileTransfer extends AbstractPr } final ProcessorLog logger = getLogger(); -final String hostname = context.getProperty(FileTransfer.HOSTNAME).evaluateAttributeExpressions(flowFile).getValue(); +final String hostname = context.getProperty(FileTransfer.HOSTNAME). +evaluateAttributeExpressions(flowFile). +getValue(); -final int maxNumberOfFiles = context.getProperty(FileTransfer.BATCH_SIZE).asInteger(); +final int maxNumberOfFiles = context. +getProperty(FileTransfer.BATCH_SIZE). +asInteger(); int fileCount = 0; try (final T transfer = getFileTransfer(context)) { do { -final String rootPath = context.getProperty(FileTransfer.REMOTE_PATH).evaluateAttributeExpressions(flowFile).getValue(); +final String rootPath = context. +getProperty(FileTransfer.REMOTE_PATH). +evaluateAttributeExpressions(flowFile). +getValue(); final String workingDirPath; if (rootPath == null) { workingDirPath = null; } else { File workingDirectory = new File(rootPath); -if (!workingDirectory.getPath().startsWith(/) !workingDirectory.getPath().startsWith(\\)) { -workingDirectory = new File(transfer.getHomeDirectory(flowFile), workingDirectory.getPath()); +if (!workingDirectory.getPath(). +startsWith(/) !workingDirectory.getPath(). +startsWith(\\)) { +workingDirectory = new File(transfer. +getHomeDirectory(flowFile), workingDirectory. +getPath()); } -workingDirPath = workingDirectory.getPath().replace(\\, /); +workingDirPath = workingDirectory.getPath(). +replace(\\, /); } -final boolean rejectZeroByteFiles = context.getProperty(FileTransfer.REJECT_ZERO_BYTE).asBoolean(); -final ConflictResult conflictResult = identifyAndResolveConflictFile(context.getProperty(FileTransfer.CONFLICT_RESOLUTION).getValue(), +final boolean rejectZeroByteFiles = context. +
[10/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteOnContent.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteOnContent.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteOnContent.java index 44d090b..8f1eb4e 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteOnContent.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteOnContent.java @@ -60,9 +60,9 @@ import org.apache.nifi.util.IntegerHolder; + of the property is the name of the relationship and the value is a Regular Expression to match against the FlowFile + content. User-Defined properties do support the Attribute Expression Language, but the results are interpreted as + literal values, not Regular Expressions) -@DynamicProperty(name=Relationship Name, value=A Regular Expression, supportsExpressionLanguage=true, description=Routes FlowFiles whose + -content matches the regular expressoin defined by Dynamic Property's value to the Relationship defined by the Dynamic Property's key) -@DynamicRelationship(name=Name from Dynamic Property, description=FlowFiles that match the Dynamic Property's Regular Expression) +@DynamicProperty(name = Relationship Name, value = A Regular Expression, supportsExpressionLanguage = true, description = Routes FlowFiles whose ++ content matches the regular expressoin defined by Dynamic Property's value to the Relationship defined by the Dynamic Property's key) +@DynamicRelationship(name = Name from Dynamic Property, description = FlowFiles that match the Dynamic Property's Regular Expression) public class RouteOnContent extends AbstractProcessor { public static final String ROUTE_ATTRIBUTE_KEY = RouteOnContent.Route; @@ -70,30 +70,34 @@ public class RouteOnContent extends AbstractProcessor { public static final String MATCH_ALL = content must match exactly; public static final String MATCH_SUBSEQUENCE = content must contain match; -public static final PropertyDescriptor BUFFER_SIZE = new PropertyDescriptor.Builder() -.name(Content Buffer Size) -.description(Specifies the maximum amount of data to buffer in order to apply the regular expressions. If the size of the FlowFile exceeds this value, any amount of this value will be ignored) -.required(true) -.addValidator(StandardValidators.DATA_SIZE_VALIDATOR) -.defaultValue(1 MB) -.build(); -public static final PropertyDescriptor MATCH_REQUIREMENT = new PropertyDescriptor.Builder() -.name(Match Requirement) -.description(Specifies whether the entire content of the file must match the regular expression exactly, or if any part of the file (up to Content Buffer Size) can contain the regular expression in order to be considered a match) -.required(true) -.allowableValues(MATCH_ALL, MATCH_SUBSEQUENCE) -.defaultValue(MATCH_ALL) -.build(); -public static final PropertyDescriptor CHARACTER_SET = new PropertyDescriptor.Builder() -.name(Character Set) -.description(The Character Set in which the file is encoded) -.required(true) -.addValidator(StandardValidators.CHARACTER_SET_VALIDATOR) -.defaultValue(UTF-8) -.build(); - -public static final Relationship REL_NO_MATCH = new Relationship.Builder().name(unmatched) -.description(FlowFiles that do not match any of the user-supplied regular expressions will be routed to this relationship).build(); +public static final PropertyDescriptor BUFFER_SIZE = new PropertyDescriptor.Builder(). +name(Content Buffer Size). +description(Specifies the maximum amount of data to buffer in order to apply the regular expressions. If the size of the FlowFile ++ exceeds this value, any amount of this value will be ignored). +required(true). +addValidator(StandardValidators.DATA_SIZE_VALIDATOR). +defaultValue(1 MB). +build(); +public static final PropertyDescriptor MATCH_REQUIREMENT = new PropertyDescriptor.Builder(). +name(Match Requirement). +description(Specifies whether the entire content of the file must match the regular expression exactly, or if any part of the file ++ (up to Content Buffer Size) can contain the regular expression in order
[07/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JmsProperties.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JmsProperties.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JmsProperties.java index 3a5695e..8332082 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JmsProperties.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JmsProperties.java @@ -37,141 +37,144 @@ public class JmsProperties { public static final String MSG_TYPE_EMPTY = empty; // Standard JMS Properties -public static final PropertyDescriptor JMS_PROVIDER = new PropertyDescriptor.Builder() -.name(JMS Provider) -.description(The Provider used for the JMS Server) -.required(true) -.allowableValues(ACTIVEMQ_PROVIDER) -.defaultValue(ACTIVEMQ_PROVIDER) -.build(); -public static final PropertyDescriptor URL = new PropertyDescriptor.Builder() -.name(URL) -.description(The URL of the JMS Server) -.addValidator(StandardValidators.URI_VALIDATOR) -.required(true) -.build(); -public static final PropertyDescriptor TIMEOUT = new PropertyDescriptor.Builder() -.name(Communications Timeout) -.description(The amount of time to wait when attempting to receive a message before giving up and assuming failure) -.required(true) -.addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) -.defaultValue(30 sec) -.build(); -public static final PropertyDescriptor USERNAME = new PropertyDescriptor.Builder() -.name(Username) -.description(Username used for authentication and authorization) -.required(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); -public static final PropertyDescriptor PASSWORD = new PropertyDescriptor.Builder() -.name(Password) -.description(Password used for authentication and authorization) -.required(false) -.addValidator(Validator.VALID) -.sensitive(true) -.build(); -public static final PropertyDescriptor CLIENT_ID_PREFIX = new PropertyDescriptor.Builder() -.name(Client ID Prefix) -.description(A human-readable ID that can be used to associate connections with yourself so that the maintainers of the JMS Server know who to contact if problems arise) -.required(false) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); +public static final PropertyDescriptor JMS_PROVIDER = new PropertyDescriptor.Builder(). +name(JMS Provider). +description(The Provider used for the JMS Server). +required(true). +allowableValues(ACTIVEMQ_PROVIDER). +defaultValue(ACTIVEMQ_PROVIDER). +build(); +public static final PropertyDescriptor URL = new PropertyDescriptor.Builder(). +name(URL). +description(The URL of the JMS Server). +addValidator(StandardValidators.URI_VALIDATOR). +required(true). +build(); +public static final PropertyDescriptor TIMEOUT = new PropertyDescriptor.Builder(). +name(Communications Timeout). +description(The amount of time to wait when attempting to receive a message before giving up and assuming failure). +required(true). +addValidator(StandardValidators.TIME_PERIOD_VALIDATOR). +defaultValue(30 sec). +build(); +public static final PropertyDescriptor USERNAME = new PropertyDescriptor.Builder(). +name(Username). +description(Username used for authentication and authorization). +required(false). +addValidator(StandardValidators.NON_EMPTY_VALIDATOR). +build(); +public static final PropertyDescriptor PASSWORD = new PropertyDescriptor.Builder(). +name(Password). +description(Password used for authentication and authorization). +required(false). +addValidator(Validator.VALID). +sensitive(true). +build(); +public static final PropertyDescriptor CLIENT_ID_PREFIX = new PropertyDescriptor.Builder(). +name(Client ID Prefix). +description(A
[16/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
NIFI-271 chipping away - more work left in standard bundle Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/54818893 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/54818893 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/54818893 Branch: refs/heads/develop Commit: 548188939c44ed02d8b0ef8e0bbd4513afaade60 Parents: 87e8296 Author: joewitt joew...@apache.org Authored: Mon Apr 27 07:44:57 2015 -0400 Committer: joewitt joew...@apache.org Committed: Mon Apr 27 07:44:57 2015 -0400 -- .../web/StandardContentViewerController.java| 9 +- .../standard/AbstractJsonPathProcessor.java | 19 +- .../standard/Base64EncodeContent.java | 11 +- .../nifi/processors/standard/BinFiles.java | 170 ++-- .../processors/standard/CompressContent.java| 38 +- .../nifi/processors/standard/ControlRate.java | 39 +- .../standard/ConvertCharacterSet.java | 37 +- .../processors/standard/DetectDuplicate.java| 28 +- .../processors/standard/DistributeLoad.java | 89 +- .../nifi/processors/standard/EncodeContent.java | 27 +- .../processors/standard/EncryptContent.java | 23 +- .../processors/standard/EvaluateJsonPath.java | 91 ++- .../standard/EvaluateRegularExpression.java | 31 +- .../nifi/processors/standard/EvaluateXPath.java | 89 +- .../processors/standard/EvaluateXQuery.java | 63 +- .../processors/standard/ExecuteProcess.java | 19 +- .../standard/ExecuteStreamCommand.java | 71 +- .../nifi/processors/standard/ExtractText.java | 26 +- .../processors/standard/GenerateFlowFile.java | 10 +- .../apache/nifi/processors/standard/GetFTP.java | 14 +- .../nifi/processors/standard/GetFile.java | 32 +- .../processors/standard/GetFileTransfer.java| 9 +- .../nifi/processors/standard/GetHTTP.java | 69 +- .../nifi/processors/standard/GetJMSTopic.java | 50 +- .../nifi/processors/standard/GetSFTP.java | 16 +- .../processors/standard/HandleHttpRequest.java | 468 ++- .../processors/standard/HandleHttpResponse.java | 127 +-- .../nifi/processors/standard/HashAttribute.java | 38 +- .../nifi/processors/standard/HashContent.java | 18 +- .../processors/standard/IdentifyMimeType.java | 17 +- .../nifi/processors/standard/InvokeHTTP.java| 149 ++-- .../nifi/processors/standard/JmsConsumer.java | 100 +-- .../nifi/processors/standard/ListenHTTP.java| 18 +- .../nifi/processors/standard/ListenUDP.java | 133 ++- .../nifi/processors/standard/LogAttribute.java | 5 +- .../nifi/processors/standard/MergeContent.java | 180 ++-- .../nifi/processors/standard/ModifyBytes.java | 3 - .../processors/standard/MonitorActivity.java| 27 +- .../nifi/processors/standard/PostHTTP.java | 152 ++-- .../nifi/processors/standard/PutEmail.java | 423 +- .../apache/nifi/processors/standard/PutFTP.java | 56 +- .../nifi/processors/standard/PutFile.java | 264 +++--- .../processors/standard/PutFileTransfer.java| 127 ++- .../apache/nifi/processors/standard/PutJMS.java | 133 ++- .../nifi/processors/standard/PutSFTP.java | 9 +- .../nifi/processors/standard/ReplaceText.java | 163 ++-- .../standard/ReplaceTextWithMapping.java| 215 +++-- .../processors/standard/RouteOnAttribute.java | 111 ++- .../processors/standard/RouteOnContent.java | 149 ++-- .../nifi/processors/standard/ScanAttribute.java | 115 ++- .../nifi/processors/standard/ScanContent.java | 83 +- .../processors/standard/SegmentContent.java | 75 +- .../nifi/processors/standard/SplitContent.java | 163 ++-- .../nifi/processors/standard/SplitJson.java | 74 +- .../nifi/processors/standard/SplitText.java | 142 ++-- .../nifi/processors/standard/SplitXml.java | 61 +- .../nifi/processors/standard/TransformXml.java | 121 +-- .../nifi/processors/standard/UnpackContent.java | 216 +++-- .../nifi/processors/standard/ValidateXml.java | 45 +- .../servlets/ContentAcknowledgmentServlet.java | 53 +- .../standard/servlets/ListenHTTPServlet.java| 156 ++-- .../nifi/processors/standard/util/Bin.java | 6 +- .../processors/standard/util/BinManager.java| 26 +- .../standard/util/DocumentReaderCallback.java | 3 +- .../processors/standard/util/FTPTransfer.java | 351 +--- .../nifi/processors/standard/util/FTPUtils.java | 38 +- .../nifi/processors/standard/util/FileInfo.java | 3 +- .../processors/standard/util/FileTransfer.java | 356 .../processors/standard/util/JmsFactory.java| 127 ++- .../standard/util/JmsProcessingSummary.java | 100 ++- .../processors/standard/util/JmsProperties.java | 257 +++--- .../util/JsonPathExpressionValidator.java | 107 ++- .../standard/util/SFTPConnection.java | 9 - .../processors
[13/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java index c8345d2..8f4286b 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java @@ -27,7 +27,6 @@ import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.Charset; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -72,13 +71,14 @@ import org.joda.time.format.DateTimeFormatter; @SupportsBatching @Tags({http, https, rest, client}) @CapabilityDescription(An HTTP client processor which converts FlowFile attributes to HTTP headers, with configurable HTTP method, url, etc.) -@WritesAttributes({ @WritesAttribute(attribute = invokehttp.status.code, description = The status code that is returned), -@WritesAttribute(attribute = invokehttp.status.message, description = The status message that is returned), -@WritesAttribute(attribute = invokehttp.response.body, description = The response body), -@WritesAttribute(attribute = invokehttp.request.url, description = The request URL), -@WritesAttribute(attribute = invokehttp.tx.id, description = The transaction ID that is returned after reading the response), -@WritesAttribute(attribute = invokehttp.remote.dn, description = The DN of the remote server) }) -@DynamicProperty(name=Trusted Hostname, value=A hostname, description=Bypass the normal truststore hostname verifier to allow the specified (single) remote hostname as trusted +@WritesAttributes({ +@WritesAttribute(attribute = invokehttp.status.code, description = The status code that is returned), +@WritesAttribute(attribute = invokehttp.status.message, description = The status message that is returned), +@WritesAttribute(attribute = invokehttp.response.body, description = The response body), +@WritesAttribute(attribute = invokehttp.request.url, description = The request URL), +@WritesAttribute(attribute = invokehttp.tx.id, description = The transaction ID that is returned after reading the response), +@WritesAttribute(attribute = invokehttp.remote.dn, description = The DN of the remote server)}) +@DynamicProperty(name = Trusted Hostname, value = A hostname, description = Bypass the normal truststore hostname verifier to allow the specified (single) remote hostname as trusted + Enabling this property has MITM security implications, use wisely. Only valid with SSL (HTTPS) connections.) public final class InvokeHTTP extends AbstractProcessor { @@ -88,7 +88,7 @@ public final class InvokeHTTP extends AbstractProcessor { return Config.PROPERTIES; } - + @Override protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) { if (Config.PROP_TRUSTED_HOSTNAME.getName().equalsIgnoreCase(propertyDescriptorName)) { @@ -118,7 +118,8 @@ public final class InvokeHTTP extends AbstractProcessor { } else { SSLContextService svc = (SSLContextService) getControllerServiceLookup().getControllerService(newValue); sslContextRef.set(svc.createSSLContext(ClientAuth.NONE)); // ClientAuth is only useful for servers, not clients. -getLogger().info(Loading SSL configuration from keystore={} and truststore={}, new Object[]{svc.getKeyStoreFile(), svc.getTrustStoreFile()}); +getLogger().info(Loading SSL configuration from keystore={} and truststore={}, +new Object[]{svc.getKeyStoreFile(), svc.getTrustStoreFile()}); } } @@ -143,17 +144,14 @@ public final class InvokeHTTP extends AbstractProcessor { } for (FlowFile flowfile : flowfiles) { -Transaction transaction = new Transaction( -getLogger(), sslContextRef, attributesToSendRef, context, session, flowfile -); +Transaction transaction = new Transaction(getLogger(), sslContextRef, attributesToSendRef, context, session, flowfile); transaction.process(); } } /** * - * Stores properties, relationships, configuration values, hard coded - * strings, magic numbers, etc. + *
[08/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java index c3d7bbf..0a076ca 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java @@ -56,54 +56,54 @@ public class FTPTransfer implements FileTransfer { public static final String PROXY_TYPE_HTTP = Proxy.Type.HTTP.name(); public static final String PROXY_TYPE_SOCKS = Proxy.Type.SOCKS.name(); -public static final PropertyDescriptor CONNECTION_MODE = new PropertyDescriptor.Builder() -.name(Connection Mode) -.description(The FTP Connection Mode) -.allowableValues(CONNECTION_MODE_ACTIVE, CONNECTION_MODE_PASSIVE) -.defaultValue(CONNECTION_MODE_PASSIVE) -.build(); -public static final PropertyDescriptor TRANSFER_MODE = new PropertyDescriptor.Builder() -.name(Transfer Mode) -.description(The FTP Transfer Mode) -.allowableValues(TRANSFER_MODE_BINARY, TRANSFER_MODE_ASCII) -.defaultValue(TRANSFER_MODE_BINARY) -.build(); -public static final PropertyDescriptor PORT = new PropertyDescriptor.Builder() -.name(Port) -.description(The port that the remote system is listening on for file transfers) -.addValidator(StandardValidators.PORT_VALIDATOR) -.required(true) -.defaultValue(21) -.build(); -public static final PropertyDescriptor PROXY_TYPE = new PropertyDescriptor.Builder() -.name(Proxy Type) -.description(Proxy type used for file transfers) -.allowableValues(PROXY_TYPE_DIRECT, PROXY_TYPE_HTTP, PROXY_TYPE_SOCKS) -.defaultValue(PROXY_TYPE_DIRECT) -.build(); -public static final PropertyDescriptor PROXY_HOST = new PropertyDescriptor.Builder() -.name(Proxy Host) -.description(The fully qualified hostname or IP address of the proxy server) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.build(); -public static final PropertyDescriptor PROXY_PORT = new PropertyDescriptor.Builder() -.name(Proxy Port) -.description(The port of the proxy server) -.addValidator(StandardValidators.PORT_VALIDATOR) -.build(); -public static final PropertyDescriptor HTTP_PROXY_USERNAME = new PropertyDescriptor.Builder() -.name(Http Proxy Username) -.description(Http Proxy Username) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.required(false) -.build(); -public static final PropertyDescriptor HTTP_PROXY_PASSWORD = new PropertyDescriptor.Builder() -.name(Http Proxy Password) -.description(Http Proxy Password) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.required(false) -.sensitive(true) -.build(); +public static final PropertyDescriptor CONNECTION_MODE = new PropertyDescriptor.Builder(). +name(Connection Mode). +description(The FTP Connection Mode). +allowableValues(CONNECTION_MODE_ACTIVE, CONNECTION_MODE_PASSIVE). +defaultValue(CONNECTION_MODE_PASSIVE). +build(); +public static final PropertyDescriptor TRANSFER_MODE = new PropertyDescriptor.Builder(). +name(Transfer Mode). +description(The FTP Transfer Mode). +allowableValues(TRANSFER_MODE_BINARY, TRANSFER_MODE_ASCII). +defaultValue(TRANSFER_MODE_BINARY). +build(); +public static final PropertyDescriptor PORT = new PropertyDescriptor.Builder(). +name(Port). +description(The port that the remote system is listening on for file transfers). +addValidator(StandardValidators.PORT_VALIDATOR). +required(true). +defaultValue(21). +build(); +public static final PropertyDescriptor PROXY_TYPE = new PropertyDescriptor.Builder(). +name(Proxy Type). +description(Proxy type used for file transfers). +allowableValues(PROXY_TYPE_DIRECT, PROXY_TYPE_HTTP, PROXY_TYPE_SOCKS). +
[04/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetJMSQueue.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetJMSQueue.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetJMSQueue.java index 9c833f5..b6c79d5 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetJMSQueue.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetJMSQueue.java @@ -36,12 +36,16 @@ public class TestGetJMSQueue { @org.junit.Ignore public void testSendTextToQueue() throws Exception { final TestRunner runner = TestRunners.newTestRunner(GetJMSQueue.class); -runner.setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER); +runner. +setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER); runner.setProperty(JmsProperties.URL, tcp://localhost:61616); -runner.setProperty(JmsProperties.DESTINATION_TYPE, JmsProperties.DESTINATION_TYPE_QUEUE); +runner. +setProperty(JmsProperties.DESTINATION_TYPE, JmsProperties.DESTINATION_TYPE_QUEUE); runner.setProperty(JmsProperties.DESTINATION_NAME, queue.testing); -runner.setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO); -WrappedMessageProducer wrappedProducer = JmsFactory.createMessageProducer(runner.getProcessContext(), true); +runner. +setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO); +WrappedMessageProducer wrappedProducer = JmsFactory. +createMessageProducer(runner.getProcessContext(), true); final Session jmsSession = wrappedProducer.getSession(); final MessageProducer producer = wrappedProducer.getProducer(); @@ -56,12 +60,16 @@ public class TestGetJMSQueue { @org.junit.Ignore public void testSendBytesToQueue() throws Exception { final TestRunner runner = TestRunners.newTestRunner(GetJMSQueue.class); -runner.setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER); +runner. +setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER); runner.setProperty(JmsProperties.URL, tcp://localhost:61616); -runner.setProperty(JmsProperties.DESTINATION_TYPE, JmsProperties.DESTINATION_TYPE_QUEUE); +runner. +setProperty(JmsProperties.DESTINATION_TYPE, JmsProperties.DESTINATION_TYPE_QUEUE); runner.setProperty(JmsProperties.DESTINATION_NAME, queue.testing); -runner.setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO); -WrappedMessageProducer wrappedProducer = JmsFactory.createMessageProducer(runner.getProcessContext(), true); +runner. +setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO); +WrappedMessageProducer wrappedProducer = JmsFactory. +createMessageProducer(runner.getProcessContext(), true); final Session jmsSession = wrappedProducer.getSession(); final MessageProducer producer = wrappedProducer.getProducer(); @@ -77,12 +85,16 @@ public class TestGetJMSQueue { @org.junit.Ignore public void testSendStreamToQueue() throws Exception { final TestRunner runner = TestRunners.newTestRunner(GetJMSQueue.class); -runner.setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER); +runner. +setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER); runner.setProperty(JmsProperties.URL, tcp://localhost:61616); -runner.setProperty(JmsProperties.DESTINATION_TYPE, JmsProperties.DESTINATION_TYPE_QUEUE); +runner. +setProperty(JmsProperties.DESTINATION_TYPE, JmsProperties.DESTINATION_TYPE_QUEUE); runner.setProperty(JmsProperties.DESTINATION_NAME, queue.testing); -runner.setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO); -WrappedMessageProducer wrappedProducer = JmsFactory.createMessageProducer(runner.getProcessContext(), true); +runner. +setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO); +WrappedMessageProducer wrappedProducer = JmsFactory. +createMessageProducer(runner.getProcessContext(), true); final Session jmsSession = wrappedProducer.getSession(); final
[14/16] incubator-nifi git commit: NIFI-271 chipping away - more work left in standard bundle
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/54818893/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java index c1af0ea..11e75ed 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java @@ -91,7 +91,7 @@ import org.apache.nifi.util.StopWatch; @Tags({get, fetch, poll, http, https, ingest, source, input}) @CapabilityDescription(Fetches a file via HTTP) -@WritesAttribute(attribute=filename, description=the filename is set to the name of the file on the remote server) +@WritesAttribute(attribute = filename, description = the filename is set to the name of the file on the remote server) public class GetHTTP extends AbstractSessionFactoryProcessor { static final int PERSISTENCE_INTERVAL_MSEC = 1; @@ -112,8 +112,7 @@ public class GetHTTP extends AbstractSessionFactoryProcessor { .build(); public static final PropertyDescriptor FOLLOW_REDIRECTS = new PropertyDescriptor.Builder() .name(Follow Redirects) -.description( -If we receive a 3xx HTTP Status Code from the server, indicates whether or not we should follow the redirect that the server specifies) +.description(If we receive a 3xx HTTP Status Code from the server, indicates whether or not we should follow the redirect that the server specifies) .defaultValue(false) .allowableValues(true, false) .build(); @@ -132,8 +131,7 @@ public class GetHTTP extends AbstractSessionFactoryProcessor { .build(); public static final PropertyDescriptor DATA_TIMEOUT = new PropertyDescriptor.Builder() .name(Data Timeout) -.description( -How long to wait between receiving segments of data from the remote server before giving up and discarding the partial file) +.description(How long to wait between receiving segments of data from the remote server before giving up and discarding the partial file) .required(true) .defaultValue(30 sec) .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) @@ -170,8 +168,10 @@ public class GetHTTP extends AbstractSessionFactoryProcessor { .identifiesControllerService(SSLContextService.class) .build(); -public static final Relationship REL_SUCCESS = new Relationship.Builder().name(success) -.description(All files are transferred to the success relationship).build(); +public static final Relationship REL_SUCCESS = new Relationship.Builder() +.name(success) +.description(All files are transferred to the success relationship) +.build(); public static final String LAST_MODIFIED_DATE_PATTERN_RFC1123 = EEE, dd MMM HH:mm:ss zzz; @@ -275,28 +275,23 @@ public class GetHTTP extends AbstractSessionFactoryProcessor { return results; } - -private SSLContext createSSLContext(final SSLContextService service) throws KeyStoreException, IOException, NoSuchAlgorithmException, -CertificateException, KeyManagementException, UnrecoverableKeyException -{ -final KeyStore truststore = KeyStore.getInstance(service.getTrustStoreType()); +private SSLContext createSSLContext(final SSLContextService service) +throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, KeyManagementException, UnrecoverableKeyException { +final KeyStore truststore = KeyStore.getInstance(service.getTrustStoreType()); try (final InputStream in = new FileInputStream(new File(service.getTrustStoreFile( { truststore.load(in, service.getTrustStorePassword().toCharArray()); } - -final KeyStore keystore = KeyStore.getInstance(service.getKeyStoreType()); + +final KeyStore keystore = KeyStore.getInstance(service.getKeyStoreType()); try (final InputStream in = new FileInputStream(new File(service.getKeyStoreFile( { keystore.load(in, service.getKeyStorePassword().toCharArray()); } - -SSLContext sslContext = SSLContexts.custom() -.loadTrustMaterial(truststore, new TrustSelfSignedStrategy()) -.loadKeyMaterial(keystore,
incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop e811929f5 - 1eb4387db NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/1eb4387d Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/1eb4387d Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/1eb4387d Branch: refs/heads/develop Commit: 1eb4387dbe8964862316d9a2ce2e999651e2124b Parents: e811929 Author: joewitt joew...@apache.org Authored: Mon Apr 27 21:29:06 2015 -0400 Committer: joewitt joew...@apache.org Committed: Mon Apr 27 21:29:06 2015 -0400 -- .../nifi-file-authorization-provider/pom.xml| 8 ++ .../FileAuthorizationProvider.java | 90 +--- .../FileAuthorizationProviderTest.java | 63 +++--- 3 files changed, 41 insertions(+), 120 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1eb4387d/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorization-provider/pom.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorization-provider/pom.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorization-provider/pom.xml index d79b0ca..b5cde8d 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorization-provider/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorization-provider/pom.xml @@ -49,6 +49,14 @@ generateDirectory${project.build.directory}/generated-sources/jaxb/generateDirectory /configuration /plugin +plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-checkstyle-plugin/artifactId +configuration +excludes**/user/generated/*.java/excludes +/configuration +/plugin + /plugins /build dependencies http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1eb4387d/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorization-provider/src/main/java/org/apache/nifi/authorization/FileAuthorizationProvider.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorization-provider/src/main/java/org/apache/nifi/authorization/FileAuthorizationProvider.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorization-provider/src/main/java/org/apache/nifi/authorization/FileAuthorizationProvider.java index 5657369..9c2cad5 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorization-provider/src/main/java/org/apache/nifi/authorization/FileAuthorizationProvider.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorization-provider/src/main/java/org/apache/nifi/authorization/FileAuthorizationProvider.java @@ -167,23 +167,10 @@ public class FileAuthorizationProvider implements AuthorityProvider { public void preDestruction() { } -/** - * Determines if this provider has a default role. - * - * @return - */ private boolean hasDefaultRoles() { return !defaultAuthorities.isEmpty(); } -/** - * Determines if the specified dn is known to this authority provider. When - * this provider is configured to have default role(s), all dn are - * considered to exist. - * - * @param dn - * @return True if he dn is known, false otherwise - */ @Override public boolean doesDnExist(String dn) throws AuthorityAccessException { if (hasDefaultRoles()) { @@ -194,21 +181,11 @@ public class FileAuthorizationProvider implements AuthorityProvider { return user != null; } -/** - * Loads the authorities for the specified user. If this provider is - * configured for default user role(s) and a non existent dn is specified, a - * new user will be automatically created with the default role(s). - * - * @param dn - * @return - * @throws UnknownIdentityException - * @throws AuthorityAccessException - */ @Override public synchronized SetAuthority getAuthorities(String dn) throws UnknownIdentityException, AuthorityAccessException { final SetAuthority authorities = EnumSet.noneOf(Authority.class); -// get the user +// get the user final User user = getUser(dn); // ensure the user was located @@ -234,16 +211,6 @@ public class FileAuthorizationProvider implements AuthorityProvider
[02/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a52cf529/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterConnectionStatusEntity.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterConnectionStatusEntity.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterConnectionStatusEntity.java index 732a4b7..f211cc4 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterConnectionStatusEntity.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterConnectionStatusEntity.java @@ -20,9 +20,7 @@ import javax.xml.bind.annotation.XmlRootElement; import org.apache.nifi.web.api.dto.status.ClusterConnectionStatusDTO; /** - * A serialized representation of this class can be placed in the entity body of - * a request or response to or from the API. This particular entity holds a - * reference to a ClusterConnectionStatusDTO. + * A serialized representation of this class can be placed in the entity body of a request or response to or from the API. This particular entity holds a reference to a ClusterConnectionStatusDTO. */ @XmlRootElement(name = clusterConnectionStatusEntity) public class ClusterConnectionStatusEntity extends Entity { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a52cf529/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterEntity.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterEntity.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterEntity.java index 8306b0f..c59ce01 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterEntity.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterEntity.java @@ -20,9 +20,7 @@ import javax.xml.bind.annotation.XmlRootElement; import org.apache.nifi.web.api.dto.ClusterDTO; /** - * A serialized representation of this class can be placed in the entity body of - * a request or response to or from the API. This particular entity holds a - * reference to a ClusterDTO. + * A serialized representation of this class can be placed in the entity body of a request or response to or from the API. This particular entity holds a reference to a ClusterDTO. */ @XmlRootElement(name = clusterEntity) public class ClusterEntity extends Entity { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a52cf529/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterPortStatusEntity.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterPortStatusEntity.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterPortStatusEntity.java index 16a2497..477b6ec 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterPortStatusEntity.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterPortStatusEntity.java @@ -20,9 +20,7 @@ import javax.xml.bind.annotation.XmlRootElement; import org.apache.nifi.web.api.dto.status.ClusterPortStatusDTO; /** - * A serialized representation of this class can be placed in the entity body of - * a request or response to or from the API. This particular entity holds a - * reference to a ClusterPortStatusDTO. + * A serialized representation of this class can be placed in the entity body of a request or response to or from the API. This particular entity holds a reference to a ClusterPortStatusDTO. */ @XmlRootElement(name = clusterPortStatusEntity) public class ClusterPortStatusEntity extends Entity { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a52cf529/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterProcessGroupStatusEntity.java
[12/12] incubator-nifi git commit: NIFI-271
NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e6274827 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e6274827 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e6274827 Branch: refs/heads/develop Commit: e627482734ab701bd0ccc5b5f389340df8ed90f4 Parents: 525ce7f Author: joewitt joew...@apache.org Authored: Tue Apr 28 00:35:56 2015 -0400 Committer: joewitt joew...@apache.org Committed: Tue Apr 28 00:35:56 2015 -0400 -- .../org/apache/nifi/processors/GeoEnrichIP.java | 14 +++ .../nifi/processors/maxmind/DatabaseReader.java | 40 +++- 2 files changed, 20 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e6274827/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java -- diff --git a/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java index 1ecb221..b766878 100644 --- a/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java +++ b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java @@ -189,17 +189,17 @@ public class GeoEnrichIP extends AbstractProcessor { final MapString, String attrs = new HashMap(); attrs.put(new StringBuilder(ipAttributeName).append(.geo.lookup.micros).toString(), String.valueOf(stopWatch.getDuration(TimeUnit.MICROSECONDS))); attrs.put(new StringBuilder(ipAttributeName).append(.geo.city).toString(), response.getCity().getName()); - + final Double latitude = response.getLocation().getLatitude(); -if ( latitude != null ) { - attrs.put(new StringBuilder(ipAttributeName).append(.geo.latitude).toString(), latitude.toString()); +if (latitude != null) { +attrs.put(new StringBuilder(ipAttributeName).append(.geo.latitude).toString(), latitude.toString()); } - + final Double longitude = response.getLocation().getLongitude(); -if ( longitude != null ) { - attrs.put(new StringBuilder(ipAttributeName).append(.geo.longitude).toString(), longitude.toString()); +if (longitude != null) { +attrs.put(new StringBuilder(ipAttributeName).append(.geo.longitude).toString(), longitude.toString()); } - + int i = 0; for (final Subdivision subd : response.getSubdivisions()) { attrs.put(new StringBuilder(ipAttributeName).append(.geo.subdivision.).append(i).toString(), subd.getName()); http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e6274827/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/maxmind/DatabaseReader.java -- diff --git a/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/maxmind/DatabaseReader.java b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/maxmind/DatabaseReader.java index f1d26bf..fb84daf 100644 --- a/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/maxmind/DatabaseReader.java +++ b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/maxmind/DatabaseReader.java @@ -43,17 +43,13 @@ import com.maxmind.geoip2.model.IspResponse; /** * p - * This class was copied from - * https://raw.githubusercontent.com/maxmind/GeoIP2-java/master/src/main/java/com/maxmind/geoip2/DatabaseReader.java - * It is written by Maxmind and it is available under Apache Software License V2 + * This class was copied from https://raw.githubusercontent.com/maxmind/GeoIP2-java/master/src/main/java/com/maxmind/geoip2/DatabaseReader.java It is written by Maxmind and it is available under + * Apache Software License V2 * - * The modification we're making to the code below is to stop using exceptions - * for mainline flow control. Specifically we don't want to throw an exception - * simply because an address was not found. + * The modification we're making to the code below is to stop using exceptions for mainline flow control. Specifically we don't want to throw an exception simply because an address was not found. * /p * - * Instances of this class provide a reader for the GeoIP2 database format. IP - * addresses can
[04/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/ReadOnlyAccessControlTest.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/ReadOnlyAccessControlTest.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/ReadOnlyAccessControlTest.java index 6ac8b47..0ab074f 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/ReadOnlyAccessControlTest.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/ReadOnlyAccessControlTest.java @@ -101,7 +101,7 @@ public class ReadOnlyAccessControlTest { /** * Ensures the admin user can get a groups content. * - * @throws Exception + * @throws Exception ex */ @Test public void testGroupGet() throws Exception { @@ -133,13 +133,12 @@ public class ReadOnlyAccessControlTest { Assert.assertEquals(1, processGroupContentsDTO.getInputPorts().size()); Assert.assertEquals(1, processGroupContentsDTO.getOutputPorts().size()); Assert.assertEquals(1, processGroupContentsDTO.getLabels().size()); -//Assert.assertEquals(1, processGroupContentsDTO.getRemoteProcessGroups().size()); } /** * Verifies the admin user cannot update a group. * - * @throws Exception + * @throws Exception ex */ @Test public void testGroupPut() throws Exception { @@ -163,7 +162,7 @@ public class ReadOnlyAccessControlTest { /** * Verifies the read only user can retrieve the controller configuration. * - * @throws Exception + * @throws Exception ex */ @Test public void testControllerConfigurationGet() throws Exception { @@ -188,7 +187,7 @@ public class ReadOnlyAccessControlTest { /** * Verifies the read only user cannot update the controller configuration. * - * @throws Exception + * @throws Exception ex */ @Test public void testControllerConfigurationPut() throws Exception { @@ -212,7 +211,7 @@ public class ReadOnlyAccessControlTest { /** * Verifies the read only user cannot create a new flow archive. * - * @throws Exception + * @throws Exception ex */ @Test public void testFlowConfigurationArchivePost() throws Exception { @@ -232,7 +231,7 @@ public class ReadOnlyAccessControlTest { /** * Verifies the read only user can retrieve his credentials. * - * @throws Exception + * @throws Exception ex */ @Test public void testAuthoritiesGet() throws Exception { @@ -255,7 +254,7 @@ public class ReadOnlyAccessControlTest { /** * Verifies the read only user can retrieve the banners. * - * @throws Exception + * @throws Exception ex */ @Test public void testBannersGet() throws Exception { @@ -278,7 +277,7 @@ public class ReadOnlyAccessControlTest { /** * Verifies the read only user can retrieve the processor types. * - * @throws Exception + * @throws Exception ex */ @Test public void testProcessorTypesGet() throws Exception { @@ -300,7 +299,7 @@ public class ReadOnlyAccessControlTest { /** * Verifies the read only user can retrieve the prioritizer types. * - * @throws Exception + * @throws Exception ex */ @Test public void testPrioritizerTypesGet() throws Exception { @@ -325,7 +324,7 @@ public class ReadOnlyAccessControlTest { /** * Verifies that the admin user can get process groups. * - * @throws Exception + * @throws Exception ex */ @Test public void testProcessorGroupsGet() throws Exception { @@ -346,7 +345,7 @@ public class ReadOnlyAccessControlTest { /** * Verifies that the operator user cannot create new process groups. * - * @throws Exception + * @throws Exception ex */ @Test public void testProcessGroupPost() throws Exception { @@ -369,10 +368,9 @@ public class ReadOnlyAccessControlTest { } /** - * Verifies that the operator user cannot update process group - * configuration. + * Verifies that the operator user cannot update process group configuration. * - * @throws Exception + * @throws Exception ex */ @Test public void testProcessGroupPut() throws Exception { @@ -397,7 +395,7 @@ public class ReadOnlyAccessControlTest { /** * Verifies that the operator user cannot delete
[11/12] incubator-nifi git commit: NIFI-271
NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/525ce7fb Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/525ce7fb Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/525ce7fb Branch: refs/heads/develop Commit: 525ce7fb2db5c039c3b5d1c36085953f6ca9af10 Parents: e1160f5 Author: joewitt joew...@apache.org Authored: Tue Apr 28 00:32:13 2015 -0400 Committer: joewitt joew...@apache.org Committed: Tue Apr 28 00:32:13 2015 -0400 -- .../flowfile/attributes/CoreAttributes.java | 12 +- .../apache/nifi/remote/VersionNegotiator.java | 15 +-- .../TransmissionDisabledException.java | 3 +- .../nifi/remote/io/CompressionOutputStream.java | 3 +- .../remote/io/socket/BufferStateManager.java| 4 +- .../socket/ssl/SSLSocketChannelInputStream.java | 3 +- .../ssl/SSLSocketChannelOutputStream.java | 3 +- .../nifi/stream/io/BufferedInputStream.java | 7 +- .../nifi/stream/io/BufferedOutputStream.java| 31 ++--- .../nifi/stream/io/ByteArrayInputStream.java| 113 ++ .../nifi/stream/io/ByteArrayOutputStream.java | 80 + .../stream/io/ByteCountingOutputStream.java | 5 +- .../apache/nifi/stream/io/DataOutputStream.java | 113 ++ .../apache/nifi/stream/io/GZIPOutputStream.java | 4 +- .../stream/io/LeakyBucketStreamThrottler.java | 3 +- .../stream/io/MinimumLengthInputStream.java | 3 +- .../nifi/stream/io/NonCloseableInputStream.java | 5 +- .../org/apache/nifi/stream/io/StreamUtils.java | 30 ++--- .../apache/nifi/stream/io/ZipOutputStream.java | 5 +- .../java/org/apache/nifi/util/EscapeUtils.java | 4 +- .../java/org/apache/nifi/util/LongHolder.java | 6 +- .../apache/nifi/util/NaiveSearchRingBuffer.java | 21 ++-- .../java/org/apache/nifi/util/RingBuffer.java | 26 ++--- .../java/org/apache/nifi/util/StopWatch.java| 3 +- .../org/apache/nifi/util/file/FileUtils.java| 114 ++- .../file/monitor/CompoundUpdateMonitor.java | 7 +- .../file/monitor/SynchronousFileWatcher.java| 6 +- .../org/apache/nifi/util/search/Search.java | 18 +-- .../org/apache/nifi/util/search/SearchTerm.java | 5 +- 29 files changed, 203 insertions(+), 449 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/525ce7fb/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/flowfile/attributes/CoreAttributes.java -- diff --git a/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/flowfile/attributes/CoreAttributes.java b/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/flowfile/attributes/CoreAttributes.java index b0f4048..9b4c3af 100644 --- a/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/flowfile/attributes/CoreAttributes.java +++ b/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/flowfile/attributes/CoreAttributes.java @@ -19,18 +19,15 @@ package org.apache.nifi.flowfile.attributes; public enum CoreAttributes implements FlowFileAttributeKey { /** - * The flowfile's path indicates the relative directory to which a FlowFile - * belongs and does not contain the filename + * The flowfile's path indicates the relative directory to which a FlowFile belongs and does not contain the filename */ PATH(path), /** - * The flowfile's absolute path indicates the absolute directory to which a - * FlowFile belongs and does not contain the filename + * The flowfile's absolute path indicates the absolute directory to which a FlowFile belongs and does not contain the filename */ ABSOLUTE_PATH(absolute.path), /** - * The filename of the FlowFile. The filename should not contain any - * directory structure. + * The filename of the FlowFile. The filename should not contain any directory structure. */ FILENAME(filename), /** @@ -50,8 +47,7 @@ public enum CoreAttributes implements FlowFileAttributeKey { */ DISCARD_REASON(discard.reason), /** - * Indicates an identifier other than the FlowFile's UUID that is known to - * refer to this FlowFile. + * Indicates an identifier other than the FlowFile's UUID that is known to refer to this FlowFile. */ ALTERNATE_IDENTIFIER(alternate.identifier); http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/525ce7fb/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/remote/VersionNegotiator.java -- diff --git a/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/remote/VersionNegotiator.java b/nifi/nifi-commons/nifi-utils/src/main/java/org
[08/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ConnectionResource.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ConnectionResource.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ConnectionResource.java index 5d233f7..137cc07 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ConnectionResource.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ConnectionResource.java @@ -85,8 +85,8 @@ public class ConnectionResource extends ApplicationResource { /** * Populate the uri's for the specified processors and their relationships. * - * @param connections - * @return + * @param connections connections + * @return dtos */ public SetConnectionDTO populateRemainingConnectionsContent(SetConnectionDTO connections) { for (ConnectionDTO connection : connections) { @@ -97,9 +97,6 @@ public class ConnectionResource extends ApplicationResource { /** * Populate the uri's for the specified processor and its relationships. - * - * @param connection - * @return */ private ConnectionDTO populateRemainingConnectionContent(ConnectionDTO connection) { // populate the remaining properties @@ -110,9 +107,7 @@ public class ConnectionResource extends ApplicationResource { /** * Gets all the connections. * - * @param clientId Optional client id. If the client id is not specified, a - * new one will be generated. This value (whether specified or generated) is - * included in the response. + * @param clientId Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response. * @return A connectionsEntity. */ @GET @@ -145,9 +140,7 @@ public class ConnectionResource extends ApplicationResource { /** * Retrieves the specified connection. * - * @param clientId Optional client id. If the client id is not specified, a - * new one will be generated. This value (whether specified or generated) is - * included in the response. + * @param clientId Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response. * @param id The id of the connection. * @return A connectionEntity. */ @@ -183,9 +176,7 @@ public class ConnectionResource extends ApplicationResource { /** * Retrieves the specified connection status history. * - * @param clientId Optional client id. If the client id is not specified, a - * new one will be generated. This value (whether specified or generated) is - * included in the response. + * @param clientId Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response. * @param id The id of the connection to retrieve. * @return A statusHistoryEntity. */ @@ -220,12 +211,9 @@ public class ConnectionResource extends ApplicationResource { /** * Creates a connection. * - * @param httpServletRequest - * @param version The revision is used to verify the client is working with - * the latest version of the flow. - * @param clientId Optional client id. If the client id is not specified, a - * new one will be generated. This value (whether specified or generated) is - * included in the response. + * @param httpServletRequest request + * @param version The revision is used to verify the client is working with the latest version of the flow. + * @param clientId Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response. * @param name The name of the connection. * @param sourceId The id of the source connectable. * @param sourceGroupId The parent group id for the source. @@ -233,19 +221,14 @@ public class ConnectionResource extends ApplicationResource { * @param bends Array of bend points in string form [x,y, x,y, x,y] * @param relationships Array of relationships. * @param flowFileExpiration The flow file expiration in minutes - * @param backPressureObjectThreshold The object count for when to apply - * back pressure. - * @param backPressureDataSizeThreshold The object size for
[01/12] incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop 1eb4387db - e62748273 http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a52cf529/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserEntity.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserEntity.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserEntity.java index 963e853..71554dd 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserEntity.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserEntity.java @@ -20,9 +20,7 @@ import javax.xml.bind.annotation.XmlRootElement; import org.apache.nifi.web.api.dto.UserDTO; /** - * A serialized representation of this class can be placed in the entity body of - * a request or response to or from the API. This particular entity holds a - * reference to a UserDTO. + * A serialized representation of this class can be placed in the entity body of a request or response to or from the API. This particular entity holds a reference to a UserDTO. */ @XmlRootElement(name = userEntity) public class UserEntity extends Entity { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a52cf529/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java index a6542c8..35a88d5 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java @@ -20,9 +20,7 @@ import javax.xml.bind.annotation.XmlRootElement; import org.apache.nifi.web.api.dto.UserGroupDTO; /** - * A serialized representation of this class can be placed in the entity body of - * a request or response to or from the API. This particular entity holds a - * reference to a UserGroupDTO. + * A serialized representation of this class can be placed in the entity body of a request or response to or from the API. This particular entity holds a reference to a UserGroupDTO. */ @XmlRootElement(name = userGroupEntity) public class UserGroupEntity extends Entity { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a52cf529/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserSearchResultsEntity.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserSearchResultsEntity.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserSearchResultsEntity.java index eece172..fcdeee3 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserSearchResultsEntity.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UserSearchResultsEntity.java @@ -22,9 +22,8 @@ import org.apache.nifi.web.api.dto.search.UserGroupSearchResultDTO; import org.apache.nifi.web.api.dto.search.UserSearchResultDTO; /** - * A serialized representation of this class can be placed in the entity body of - * a request or response to or from the API. This particular entity holds a - * reference to UserSearchResultDTOs and UserGroupSearchResultDTOs. + * A serialized representation of this class can be placed in the entity body of a request or response to or from the API. This particular entity holds a reference to UserSearchResultDTOs and + * UserGroupSearchResultDTOs. */ @XmlRootElement(name = userSearchResultsEntity) public class UserSearchResultsEntity { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a52cf529/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UsersEntity.java -- diff --git
[05/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java index dd9fc0d..486e6d7 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java @@ -37,12 +37,6 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro private ControllerServiceProvider serviceProvider; -/** - * Locates the specified controller service. - * - * @param controllerServiceId - * @return - */ private ControllerServiceNode locateControllerService(final String controllerServiceId) { // get the controller service final ControllerServiceNode controllerService = serviceProvider.getControllerServiceNode(controllerServiceId); @@ -55,12 +49,6 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro return controllerService; } -/** - * Creates a controller service. - * - * @param controllerServiceDTO The controller service DTO - * @return The controller service - */ @Override public ControllerServiceNode createControllerService(final ControllerServiceDTO controllerServiceDTO) { // ensure the type is specified @@ -72,7 +60,7 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro // create the controller service final ControllerServiceNode controllerService = serviceProvider.createControllerService(controllerServiceDTO.getType(), controllerServiceDTO.getId(), true); -// ensure we can perform the update +// ensure we can perform the update verifyUpdate(controllerService, controllerServiceDTO); // perform the update @@ -84,50 +72,27 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro } } -/** - * Gets the specified controller service. - * - * @param controllerServiceId The controller service id - * @return The controller service - */ @Override public ControllerServiceNode getControllerService(final String controllerServiceId) { return locateControllerService(controllerServiceId); } -/** - * Determines if the specified controller service exists. - * - * @param controllerServiceId - * @return - */ @Override public boolean hasControllerService(final String controllerServiceId) { return serviceProvider.getControllerServiceNode(controllerServiceId) != null; } -/** - * Gets all of the controller services. - * - * @return The controller services - */ @Override public SetControllerServiceNode getControllerServices() { return serviceProvider.getAllControllerServices(); } -/** - * Updates the specified controller service. - * - * @param controllerServiceDTO The controller service DTO - * @return The controller service - */ @Override public ControllerServiceNode updateControllerService(final ControllerServiceDTO controllerServiceDTO) { // get the controller service final ControllerServiceNode controllerService = locateControllerService(controllerServiceDTO.getId()); -// ensure we can perform the update +// ensure we can perform the update verifyUpdate(controllerService, controllerServiceDTO); // perform the update @@ -151,7 +116,8 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro } @Override -public ControllerServiceReference updateControllerServiceReferencingComponents(final String controllerServiceId, final ScheduledState scheduledState, final ControllerServiceState controllerServiceState) { +public ControllerServiceReference updateControllerServiceReferencingComponents( +final String controllerServiceId, final ScheduledState scheduledState, final ControllerServiceState controllerServiceState) { // get the controller service final ControllerServiceNode controllerService = locateControllerService(controllerServiceId); @@ -173,14 +139,6 @@ public class
[07/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java index 1bf3f77..2b3657e 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java @@ -84,7 +84,7 @@ public class ProcessGroupResource extends ApplicationResource { /** * Get the processor resource within the specified group. * - * @return + * @return the processor resource within the specified group */ @Path(processors) public ProcessorResource getProcessorResource() { @@ -96,7 +96,7 @@ public class ProcessGroupResource extends ApplicationResource { /** * Get the connection sub-resource within the specified group. * - * @return + * @return the connection sub-resource within the specified group */ @Path(connections) public ConnectionResource getConnectionResource() { @@ -108,7 +108,7 @@ public class ProcessGroupResource extends ApplicationResource { /** * Get the input ports sub-resource within the specified group. * - * @return + * @return the input ports sub-resource within the specified group */ @Path(input-ports) public InputPortResource getInputPortResource() { @@ -120,7 +120,7 @@ public class ProcessGroupResource extends ApplicationResource { /** * Get the output ports sub-resource within the specified group. * - * @return + * @return the output ports sub-resource within the specified group */ @Path(output-ports) public OutputPortResource getOutputPortResource() { @@ -132,7 +132,7 @@ public class ProcessGroupResource extends ApplicationResource { /** * Locates the label sub-resource within the specified group. * - * @return + * @return the label sub-resource within the specified group */ @Path(labels) public LabelResource getLabelResource() { @@ -144,7 +144,7 @@ public class ProcessGroupResource extends ApplicationResource { /** * Locates the funnel sub-resource within the specified group. * - * @return + * @return the funnel sub-resource within the specified group */ @Path(funnels) public FunnelResource getFunnelResource() { @@ -156,7 +156,7 @@ public class ProcessGroupResource extends ApplicationResource { /** * Locates the remote process group sub-resource within the specified group. * - * @return + * @return the remote process group sub-resource within the specified group */ @Path(remote-process-groups) public RemoteProcessGroupResource getRemoteProcessGroupResource() { @@ -168,8 +168,8 @@ public class ProcessGroupResource extends ApplicationResource { /** * Populates the remaining fields in the specified process groups. * - * @param processGroups - * @return + * @param processGroups groups + * @return group dto */ public SetProcessGroupDTO populateRemainingProcessGroupsContent(SetProcessGroupDTO processGroups) { for (ProcessGroupDTO processGroup : processGroups) { @@ -181,9 +181,9 @@ public class ProcessGroupResource extends ApplicationResource { /** * Populates the remaining fields in the specified process group. * - * @param processGroup - * @param verbose - * @return + * @param processGroup group + * @param processGroupUri processGroupUri + * @return group dto */ private ProcessGroupDTO populateRemainingProcessGroupContent(ProcessGroupDTO processGroup, String processGroupUri) { FlowSnippetDTO flowSnippet = processGroup.getContents(); @@ -201,9 +201,6 @@ public class ProcessGroupResource extends ApplicationResource { /** * Populates the remaining content of the specified snippet. - * - * @param snippet - * @return */ private FlowSnippetDTO populateRemainingSnippetContent(FlowSnippetDTO snippet) { getProcessorResource().populateRemainingProcessorsContent(snippet.getProcessors()); @@ -224,9 +221,6 @@ public class ProcessGroupResource extends ApplicationResource { /** * Generates a URI for a process group. - * - * @param processGroupId - * @return */ private String
[09/12] incubator-nifi git commit: NIFI-271
NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e1160f59 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e1160f59 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e1160f59 Branch: refs/heads/develop Commit: e1160f5932b59eedf738eca18b8031a58385ca16 Parents: a52cf52 Author: joewitt joew...@apache.org Authored: Tue Apr 28 00:27:12 2015 -0400 Committer: joewitt joew...@apache.org Committed: Tue Apr 28 00:27:12 2015 -0400 -- nifi-parent/pom.xml | 33 ++-- .../apache/nifi/audit/ControllerAuditor.java| 38 ++-- .../nifi/audit/ControllerServiceAuditor.java| 93 +- .../org/apache/nifi/audit/FunnelAuditor.java| 33 ++-- .../java/org/apache/nifi/audit/NiFiAuditor.java | 8 +- .../java/org/apache/nifi/audit/PortAuditor.java | 45 +++-- .../apache/nifi/audit/ProcessGroupAuditor.java | 42 ++--- .../org/apache/nifi/audit/ProcessorAuditor.java | 66 +++ .../apache/nifi/audit/RelationshipAuditor.java | 72 .../nifi/audit/RemoteProcessGroupAuditor.java | 56 +++--- .../apache/nifi/audit/ReportingTaskAuditor.java | 64 --- .../org/apache/nifi/audit/SnippetAuditor.java | 40 ++--- .../IllegalClusterResourceRequestException.java | 3 +- .../nifi/web/StandardNiFiServiceFacade.java | 36 ++-- .../StandardNiFiWebConfigurationContext.java| 35 ++-- .../apache/nifi/web/StandardNiFiWebContext.java | 8 +- .../nifi/web/api/ApplicationResource.java | 34 ++-- .../nifi/web/api/BulletinBoardResource.java | 7 +- .../apache/nifi/web/api/ClusterResource.java| 6 +- .../apache/nifi/web/api/ConnectionResource.java | 80 +++-- .../apache/nifi/web/api/ControllerResource.java | 113 .../nifi/web/api/ControllerServiceResource.java | 132 ++ .../org/apache/nifi/web/api/FunnelResource.java | 43 ++--- .../apache/nifi/web/api/HistoryResource.java| 52 ++ .../apache/nifi/web/api/InputPortResource.java | 48 ++ .../org/apache/nifi/web/api/LabelResource.java | 46 ++--- .../org/apache/nifi/web/api/NodeResource.java | 20 +-- .../apache/nifi/web/api/OutputPortResource.java | 48 ++ .../nifi/web/api/ProcessGroupResource.java | 155 ++--- .../apache/nifi/web/api/ProcessorResource.java | 69 +++- .../apache/nifi/web/api/ProvenanceResource.java | 129 +- .../web/api/RemoteProcessGroupResource.java | 99 --- .../nifi/web/api/ReportingTaskResource.java | 92 +++--- .../apache/nifi/web/api/SnippetResource.java| 79 - .../nifi/web/api/SystemDiagnosticsResource.java | 4 +- .../apache/nifi/web/api/TemplateResource.java | 38 ++-- .../apache/nifi/web/api/UserGroupResource.java | 44 ++--- .../org/apache/nifi/web/api/UserResource.java | 33 ++-- .../config/AdministrationExceptionMapper.java | 1 - ...ationCredentialsNotFoundExceptionMapper.java | 3 +- .../web/api/config/ClusterExceptionMapper.java | 1 - .../NoResponseFromNodesExceptionMapper.java | 3 +- .../nifi/web/api/config/ThrowableMapper.java| 1 - .../org/apache/nifi/web/api/dto/DtoFactory.java | 172 +-- .../org/apache/nifi/web/api/package-info.java | 41 ++--- .../request/BulletinBoardPatternParameter.java | 3 +- .../nifi/web/api/request/ClientIdParameter.java | 3 +- .../nifi/web/api/request/DateTimeParameter.java | 3 +- .../nifi/web/api/request/DoubleParameter.java | 3 +- .../nifi/web/api/request/IntegerParameter.java | 3 +- .../nifi/web/api/request/LongParameter.java | 3 +- .../ApplicationStartupContextListener.java | 8 +- .../nifi/web/controller/ControllerFacade.java | 162 - .../nifi/web/dao/ControllerServiceDAO.java | 3 +- .../java/org/apache/nifi/web/dao/PortDAO.java | 2 +- .../apache/nifi/web/dao/ProcessGroupDAO.java| 11 +- .../org/apache/nifi/web/dao/ProcessorDAO.java | 3 +- .../nifi/web/dao/RemoteProcessGroupDAO.java | 4 +- .../apache/nifi/web/dao/ReportingTaskDAO.java | 11 +- .../org/apache/nifi/web/dao/SnippetDAO.java | 3 +- .../org/apache/nifi/web/dao/TemplateDAO.java| 17 +- .../apache/nifi/web/dao/impl/ComponentDAO.java | 21 +-- .../web/dao/impl/StandardConnectionDAO.java | 48 -- .../dao/impl/StandardControllerServiceDAO.java | 67 +--- .../nifi/web/dao/impl/StandardFunnelDAO.java| 48 -- .../nifi/web/dao/impl/StandardInputPortDAO.java | 41 - .../nifi/web/dao/impl/StandardLabelDAO.java | 48 -- .../web/dao/impl/StandardOutputPortDAO.java | 41 - .../web/dao/impl/StandardProcessGroupDAO.java | 34 .../nifi/web/dao/impl/StandardProcessorDAO.java | 49 -- .../dao/impl/StandardRemoteProcessGroupDAO.java | 29 +--- .../web/dao/impl
[03/12] incubator-nifi git commit: NIFI-271
NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/a52cf529 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/a52cf529 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/a52cf529 Branch: refs/heads/develop Commit: a52cf52948d3774f07f8713c5010ee4d7d768a75 Parents: 1eb4387 Author: joewitt joew...@apache.org Authored: Mon Apr 27 21:34:55 2015 -0400 Committer: joewitt joew...@apache.org Committed: Mon Apr 27 21:34:55 2015 -0400 -- .../nifi/web/api/dto/BulletinBoardDTO.java | 3 +- .../apache/nifi/web/api/dto/BulletinDTO.java| 7 +-- .../nifi/web/api/dto/BulletinQueryDTO.java | 3 +- .../apache/nifi/web/api/dto/ConnectableDTO.java | 6 +-- .../apache/nifi/web/api/dto/ConnectionDTO.java | 25 -- .../web/api/dto/ControllerConfigurationDTO.java | 6 +-- .../apache/nifi/web/api/dto/ControllerDTO.java | 17 ++- .../nifi/web/api/dto/ControllerServiceDTO.java | 10 ++-- ...ontrollerServiceReferencingComponentDTO.java | 19 +++- .../org/apache/nifi/web/api/dto/CounterDTO.java | 3 +- .../org/apache/nifi/web/api/dto/LabelDTO.java | 1 - .../nifi/web/api/dto/NiFiComponentDTO.java | 3 +- .../org/apache/nifi/web/api/dto/PortDTO.java| 10 ++-- .../nifi/web/api/dto/ProcessGroupDTO.java | 3 +- .../nifi/web/api/dto/ProcessorConfigDTO.java| 32 - .../apache/nifi/web/api/dto/ProcessorDTO.java | 10 ++-- .../nifi/web/api/dto/PropertyDescriptorDTO.java | 22 +++-- .../nifi/web/api/dto/RemoteProcessGroupDTO.java | 15 ++ .../web/api/dto/RemoteProcessGroupPortDTO.java | 3 +- .../nifi/web/api/dto/ReportingTaskDTO.java | 19 +++- .../apache/nifi/web/api/dto/RevisionDTO.java| 11 ++--- .../org/apache/nifi/web/api/dto/SnippetDTO.java | 48 +++- .../org/apache/nifi/web/api/dto/UserDTO.java| 3 +- .../web/api/dto/provenance/ProvenanceDTO.java | 3 +- .../api/dto/provenance/ProvenanceEventDTO.java | 35 +- .../provenance/lineage/LineageRequestDTO.java | 7 +-- .../provenance/lineage/ProvenanceNodeDTO.java | 3 +- .../web/api/dto/status/ControllerStatusDTO.java | 3 +- .../nifi/web/api/dto/status/PortStatusDTO.java | 6 +-- .../api/dto/status/ProcessGroupStatusDTO.java | 9 ++-- .../web/api/dto/status/ProcessorStatusDTO.java | 9 ++-- .../dto/status/RemoteProcessGroupStatusDTO.java | 6 +-- .../apache/nifi/web/api/entity/AboutEntity.java | 4 +- .../nifi/web/api/entity/ActionEntity.java | 4 +- .../nifi/web/api/entity/AuthorityEntity.java| 4 +- .../nifi/web/api/entity/BannerEntity.java | 4 +- .../web/api/entity/BulletinBoardEntity.java | 4 +- .../entity/ClusterConnectionStatusEntity.java | 4 +- .../nifi/web/api/entity/ClusterEntity.java | 4 +- .../web/api/entity/ClusterPortStatusEntity.java | 4 +- .../entity/ClusterProcessGroupStatusEntity.java | 4 +- .../entity/ClusterProcessorStatusEntity.java| 4 +- .../ClusterRemoteProcessGroupStatusEntity.java | 5 +- .../api/entity/ClusterSearchResultsEntity.java | 4 +- .../web/api/entity/ClusterStatusEntity.java | 4 +- .../api/entity/ClusterStatusHistoryEntity.java | 4 +- .../web/api/entity/ComponentHistoryEntity.java | 4 +- .../nifi/web/api/entity/ConnectionEntity.java | 4 +- .../nifi/web/api/entity/ConnectionsEntity.java | 4 +- .../entity/ControllerConfigurationEntity.java | 4 +- .../nifi/web/api/entity/ControllerEntity.java | 4 +- .../web/api/entity/ControllerServiceEntity.java | 4 +- ...ollerServiceReferencingComponentsEntity.java | 8 ++-- .../entity/ControllerServiceTypesEntity.java| 4 +- .../api/entity/ControllerServicesEntity.java| 4 +- .../web/api/entity/ControllerStatusEntity.java | 4 +- .../nifi/web/api/entity/CounterEntity.java | 4 +- .../nifi/web/api/entity/CountersEntity.java | 7 +-- .../nifi/web/api/entity/FlowSnippetEntity.java | 4 +- .../nifi/web/api/entity/FunnelEntity.java | 4 +- .../nifi/web/api/entity/FunnelsEntity.java | 4 +- .../nifi/web/api/entity/HistoryEntity.java | 4 +- .../nifi/web/api/entity/InputPortEntity.java| 4 +- .../nifi/web/api/entity/InputPortsEntity.java | 4 +- .../apache/nifi/web/api/entity/LabelEntity.java | 4 +- .../nifi/web/api/entity/LabelsEntity.java | 4 +- .../nifi/web/api/entity/LineageEntity.java | 4 +- .../apache/nifi/web/api/entity/NodeEntity.java | 4 +- .../nifi/web/api/entity/NodeStatusEntity.java | 4 +- .../api/entity/NodeSystemDiagnosticsEntity.java | 4 +- .../nifi/web/api/entity/OutputPortEntity.java | 4 +- .../nifi/web/api/entity/OutputPortsEntity.java | 4 +- .../web/api/entity/PrioritizerTypesEntity.java | 4 +- .../nifi/web/api/entity/ProcessGroupEntity.java | 4 +- .../api/entity/ProcessGroupStatusEntity.java| 4
[06/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/UserGroupResource.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/UserGroupResource.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/UserGroupResource.java index 573c407..f7b2009 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/UserGroupResource.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/UserGroupResource.java @@ -54,7 +54,7 @@ public class UserGroupResource extends ApplicationResource { /* * Developer Note: Clustering assumes a centralized security provider. The - * cluster manager will manage user accounts when in clustered mode and + * cluster manager will manage user accounts when in clustered mode and * interface with the authorization provider. However, when nodes perform * Site-to-Site, the authorization details of the remote NiFi will be cached * locally. These details need to be invalidated when certain actions are @@ -68,18 +68,14 @@ public class UserGroupResource extends ApplicationResource { /** * Updates a new user group. * - * @param httpServletRequest - * @param clientId Optional client id. If the client id is not specified, a - * new one will be generated. This value (whether specified or generated) is - * included in the response. - * @param userIds A collection of user ids to include in this group. If a - * user already belongs to another group, they will be placed in this group - * instead. Existing users in this group will remain in this group. + * @param httpServletRequest request + * @param clientId Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response. + * @param userIds A collection of user ids to include in this group. If a user already belongs to another group, they will be placed in this group instead. Existing users in this group will remain + * in this group. * @param group The name of the group. - * @param rawAuthorities Array of authorities to assign to the specified - * user. + * @param rawAuthorities Array of authorities to assign to the specified user. * @param status The status of the specified users account. - * @param formParams + * @param formParams form params * @return A userGroupEntity. */ @PUT @@ -132,7 +128,7 @@ public class UserGroupResource extends ApplicationResource { /** * Creates a new user group with the specified users. * - * @param httpServletRequest + * @param httpServletRequest request * @param group The user group. * @param userGroupEntity A userGroupEntity. * @return A userGroupEntity. @@ -177,7 +173,7 @@ public class UserGroupResource extends ApplicationResource { // this user is being modified, replicate to the nodes to invalidate this account // so that it will be re-authorized during the next attempted access - if this wasn't // done the account would remain stale for up to the configured cache duration. this -// is acceptable sometimes but when updating a users authorities or groups via the UI +// is acceptable sometimes but when updating a users authorities or groups via the UI // they shouldn't have to wait for the changes to take effect` if (properties.isClusterManager()) { // change content type to JSON for serializing entity @@ -233,15 +229,12 @@ public class UserGroupResource extends ApplicationResource { } /** - * Deletes the user from the specified group. The user will not be removed, - * just the fact that they were in this group. + * Deletes the user from the specified group. The user will not be removed, just the fact that they were in this group. * - * @param httpServletRequest + * @param httpServletRequest request * @param group The user group. * @param userId The user id to remove. - * @param clientId Optional client id. If the client id is not specified, a - * new one will be generated. This value (whether specified or generated) is - * included in the response. + * @param clientId Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response. * @return A userGroupEntity. */ @DELETE @@
[10/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/525ce7fb/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java -- diff --git a/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java b/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java index 73c8aa0..daefd04 100644 --- a/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java +++ b/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/file/FileUtils.java @@ -39,8 +39,7 @@ import java.util.Random; import org.slf4j.Logger; /** - * A utility class containing a few useful static methods to do typical IO - * operations. + * A utility class containing a few useful static methods to do typical IO operations. * * @author unattributed */ @@ -94,12 +93,10 @@ public class FileUtils { } /** - * Deletes the given file. If the given file exists but could not be deleted - * this will be printed as a warning to the given logger + * Deletes the given file. If the given file exists but could not be deleted this will be printed as a warning to the given logger * * @param file the file to delete - * @param logger the logger to provide logging information to about the - * operation + * @param logger the logger to provide logging information to about the operation * @return true if given file no longer exists */ public static boolean deleteFile(final File file, final Logger logger) { @@ -107,13 +104,11 @@ public class FileUtils { } /** - * Deletes the given file. If the given file exists but could not be deleted - * this will be printed as a warning to the given logger + * Deletes the given file. If the given file exists but could not be deleted this will be printed as a warning to the given logger * * @param file the file to delete * @param logger the logger to write to - * @param attempts indicates how many times an attempt to delete should be - * made + * @param attempts indicates how many times an attempt to delete should be made * @return true if given file no longer exists */ public static boolean deleteFile(final File file, final Logger logger, final int attempts) { @@ -143,8 +138,7 @@ public class FileUtils { } /** - * Deletes all of the given files. If any exist and cannot be deleted that - * will be printed at warn to the given logger. + * Deletes all of the given files. If any exist and cannot be deleted that will be printed at warn to the given logger. * * @param files can be null * @param logger can be null @@ -154,13 +148,11 @@ public class FileUtils { } /** - * Deletes all of the given files. If any exist and cannot be deleted that - * will be printed at warn to the given logger. + * Deletes all of the given files. If any exist and cannot be deleted that will be printed at warn to the given logger. * * @param files can be null * @param logger can be null - * @param attempts indicates how many times an attempt should be made to - * delete each file + * @param attempts indicates how many times an attempt should be made to delete each file */ public static void deleteFile(final ListFile files, final Logger logger, final int attempts) { if (null == files || files.isEmpty()) { @@ -188,9 +180,8 @@ public class FileUtils { } /** - * Deletes all files (not directories..) in the given directory (non - * recursive) that match the given filename filter. If any file cannot be - * deleted then this is printed at warn to the given logger. + * Deletes all files (not directories..) in the given directory (non recursive) that match the given filename filter. If any file cannot be deleted then this is printed at warn to the given + * logger. * * @param directory the directory to scan for files to delete * @param filter if null then no filter is used @@ -201,9 +192,7 @@ public class FileUtils { } /** - * Deletes all files (not directories) in the given directory (recursive) - * that match the given filename filter. If any file cannot be deleted then - * this is printed at warn to the given logger. + * Deletes all files (not directories) in the given directory (recursive) that match the given filename filter. If any file cannot be deleted then this is printed at warn to the given logger. * * @param directory the directory to scan * @param filter if null then no filter is used @@ -215,16 +204,13 @@ public class FileUtils { } /** - * Deletes all files (not directories) in the given directory (recursive) - * that match the given filename filter. If any file cannot be deleted then - *
[06/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d29a2d68/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestCompressContent.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestCompressContent.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestCompressContent.java index f5fea2c..699db39 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestCompressContent.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestCompressContent.java @@ -30,133 +30,100 @@ public class TestCompressContent { @Test public void testBzip2DecompressConcatenated() throws Exception { -final TestRunner runner = TestRunners. -newTestRunner(CompressContent.class); +final TestRunner runner = TestRunners.newTestRunner(CompressContent.class); runner.setProperty(CompressContent.MODE, decompress); runner.setProperty(CompressContent.COMPRESSION_FORMAT, bzip2); runner.setProperty(CompressContent.UPDATE_FILENAME, false); -runner.enqueue(Paths. - get(src/test/resources/CompressedData/SampleFileConcat.txt.bz2)); + runner.enqueue(Paths.get(src/test/resources/CompressedData/SampleFileConcat.txt.bz2)); runner.run(); runner.assertAllFlowFilesTransferred(CompressContent.REL_SUCCESS, 1); -MockFlowFile flowFile = runner. -getFlowFilesForRelationship(CompressContent.REL_SUCCESS). -get(0); -flowFile.assertContentEquals(Paths. -get(src/test/resources/CompressedData/SampleFileConcat.txt)); +MockFlowFile flowFile = runner.getFlowFilesForRelationship(CompressContent.REL_SUCCESS).get(0); + flowFile.assertContentEquals(Paths.get(src/test/resources/CompressedData/SampleFileConcat.txt)); flowFile.assertAttributeEquals(filename, SampleFileConcat.txt.bz2); // not updating filename } @Test public void testBzip2Decompress() throws Exception { -final TestRunner runner = TestRunners. -newTestRunner(CompressContent.class); +final TestRunner runner = TestRunners.newTestRunner(CompressContent.class); runner.setProperty(CompressContent.MODE, decompress); runner.setProperty(CompressContent.COMPRESSION_FORMAT, bzip2); runner.setProperty(CompressContent.UPDATE_FILENAME, true); -runner.enqueue(Paths. -get(src/test/resources/CompressedData/SampleFile.txt.bz2)); + runner.enqueue(Paths.get(src/test/resources/CompressedData/SampleFile.txt.bz2)); runner.run(); runner.assertAllFlowFilesTransferred(CompressContent.REL_SUCCESS, 1); -MockFlowFile flowFile = runner. -getFlowFilesForRelationship(CompressContent.REL_SUCCESS). -get(0); -flowFile.assertContentEquals(Paths. -get(src/test/resources/CompressedData/SampleFile.txt)); +MockFlowFile flowFile = runner.getFlowFilesForRelationship(CompressContent.REL_SUCCESS).get(0); + flowFile.assertContentEquals(Paths.get(src/test/resources/CompressedData/SampleFile.txt)); flowFile.assertAttributeEquals(filename, SampleFile.txt); runner.clearTransferState(); -runner.enqueue(Paths. -get(src/test/resources/CompressedData/SampleFile1.txt.bz2)); + runner.enqueue(Paths.get(src/test/resources/CompressedData/SampleFile1.txt.bz2)); runner.run(); runner.assertAllFlowFilesTransferred(CompressContent.REL_SUCCESS, 1); -flowFile = runner. -getFlowFilesForRelationship(CompressContent.REL_SUCCESS). -get(0); -flowFile.assertContentEquals(Paths. -get(src/test/resources/CompressedData/SampleFile.txt)); +flowFile = runner.getFlowFilesForRelationship(CompressContent.REL_SUCCESS).get(0); + flowFile.assertContentEquals(Paths.get(src/test/resources/CompressedData/SampleFile.txt)); flowFile.assertAttributeEquals(filename, SampleFile1.txt); } @Test public void testGzipDecompress() throws Exception { -final TestRunner runner = TestRunners. -newTestRunner(CompressContent.class); +final TestRunner runner = TestRunners.newTestRunner(CompressContent.class); runner.setProperty(CompressContent.MODE, decompress); runner.setProperty(CompressContent.COMPRESSION_FORMAT, gzip); -assertTrue(runner.setProperty(CompressContent.UPDATE_FILENAME, true). -
[05/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d29a2d68/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateXQuery.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateXQuery.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateXQuery.java index 99d5858..aae4411 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateXQuery.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateXQuery.java @@ -43,8 +43,7 @@ import org.junit.Test; public class TestEvaluateXQuery { -private static final Path XML_SNIPPET = Paths. -get(src/test/resources/TestXml/fruit.xml); +private static final Path XML_SNIPPET = Paths.get(src/test/resources/TestXml/fruit.xml); private static final String[] fruitNames = {apple, apple, banana, orange, blueberry, raspberry, none}; private static final String[] methods = {EvaluateXQuery.OUTPUT_METHOD_XML, EvaluateXQuery.OUTPUT_METHOD_HTML, EvaluateXQuery.OUTPUT_METHOD_TEXT}; @@ -56,15 +55,11 @@ public class TestEvaluateXQuery { for (int i = 0; i methods.length; i++) { for (int j = 0; j booleans.length; j++) { for (int k = 0; k booleans.length; k++) { -Properties props = EvaluateXQuery. -getTransformerProperties(methods[i], booleans[j], booleans[k]); +Properties props = EvaluateXQuery.getTransformerProperties(methods[i], booleans[j], booleans[k]); assertEquals(3, props.size()); -assertEquals(methods[i], props. -getProperty(OutputKeys.METHOD)); -assertEquals(booleans[j] ? yes : no, props. -getProperty(OutputKeys.INDENT)); -assertEquals(booleans[k] ? yes : no, props. -getProperty(OutputKeys.OMIT_XML_DECLARATION)); +assertEquals(methods[i], props.getProperty(OutputKeys.METHOD)); +assertEquals(booleans[j] ? yes : no, props.getProperty(OutputKeys.INDENT)); +assertEquals(booleans[k] ? yes : no, props.getProperty(OutputKeys.OMIT_XML_DECLARATION)); } } } @@ -162,14 +157,10 @@ public class TestEvaluateXQuery { ListString resultStrings = new ArrayList(); runnerProps.clear(); -runnerProps. -put(EvaluateXQuery.DESTINATION.getName(), EvaluateXQuery.DESTINATION_CONTENT); +runnerProps.put(EvaluateXQuery.DESTINATION.getName(), EvaluateXQuery.DESTINATION_CONTENT); runnerProps.put(EvaluateXQuery.XML_OUTPUT_METHOD.getName(), method); -runnerProps.put(EvaluateXQuery.XML_OUTPUT_INDENT.getName(), Boolean. -toString(indent)); -runnerProps. -put(EvaluateXQuery.XML_OUTPUT_OMIT_XML_DECLARATION.getName(), Boolean. -toString(omitDeclaration)); +runnerProps.put(EvaluateXQuery.XML_OUTPUT_INDENT.getName(), Boolean.toString(indent)); + runnerProps.put(EvaluateXQuery.XML_OUTPUT_OMIT_XML_DECLARATION.getName(), Boolean.toString(omitDeclaration)); runnerProps.put(xquery, xQuery); resultFlowFiles = runXquery(xml, runnerProps); @@ -185,26 +176,22 @@ public class TestEvaluateXQuery { @Test(expected = java.lang.AssertionError.class) public void testBadXQuery() throws Exception { -doXqueryTest(XML_SNIPPET, counttt(*:fruitbasket/fruit), Arrays. -asList(7)); +doXqueryTest(XML_SNIPPET, counttt(*:fruitbasket/fruit), Arrays.asList(7)); } @Test public void testXQueries() throws Exception { /* count matches */ -doXqueryTest(XML_SNIPPET, count(*:fruitbasket/fruit), Arrays. -asList(7)); +doXqueryTest(XML_SNIPPET, count(*:fruitbasket/fruit), Arrays.asList(7)); doXqueryTest(XML_SNIPPET, count(//fruit), Arrays.asList(7)); /* Using a namespace */ -doXqueryTest(XML_SNIPPET, declare namespace fb = \http://namespace/1\;; count(fb:fruitbasket/fruit), Arrays. -asList(7)); +doXqueryTest(XML_SNIPPET, declare namespace fb = \http://namespace/1\;; count(fb:fruitbasket/fruit), Arrays.asList(7)); /* determine if node exists */ doXqueryTest(XML_SNIPPET, boolean(//fruit[1]), Arrays.asList(true)); -doXqueryTest(XML_SNIPPET, boolean(//fruit[100]), Arrays. -
[07/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d29a2d68/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JmsProperties.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JmsProperties.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JmsProperties.java index 8332082..ed73569 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JmsProperties.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JmsProperties.java @@ -37,144 +37,144 @@ public class JmsProperties { public static final String MSG_TYPE_EMPTY = empty; // Standard JMS Properties -public static final PropertyDescriptor JMS_PROVIDER = new PropertyDescriptor.Builder(). -name(JMS Provider). -description(The Provider used for the JMS Server). -required(true). -allowableValues(ACTIVEMQ_PROVIDER). -defaultValue(ACTIVEMQ_PROVIDER). -build(); -public static final PropertyDescriptor URL = new PropertyDescriptor.Builder(). -name(URL). -description(The URL of the JMS Server). -addValidator(StandardValidators.URI_VALIDATOR). -required(true). -build(); -public static final PropertyDescriptor TIMEOUT = new PropertyDescriptor.Builder(). -name(Communications Timeout). -description(The amount of time to wait when attempting to receive a message before giving up and assuming failure). -required(true). -addValidator(StandardValidators.TIME_PERIOD_VALIDATOR). -defaultValue(30 sec). -build(); -public static final PropertyDescriptor USERNAME = new PropertyDescriptor.Builder(). -name(Username). -description(Username used for authentication and authorization). -required(false). -addValidator(StandardValidators.NON_EMPTY_VALIDATOR). -build(); -public static final PropertyDescriptor PASSWORD = new PropertyDescriptor.Builder(). -name(Password). -description(Password used for authentication and authorization). -required(false). -addValidator(Validator.VALID). -sensitive(true). -build(); -public static final PropertyDescriptor CLIENT_ID_PREFIX = new PropertyDescriptor.Builder(). -name(Client ID Prefix). -description(A human-readable ID that can be used to associate connections with yourself so that the maintainers of the JMS Server know who to contact if problems arise). -required(false). -addValidator(StandardValidators.NON_EMPTY_VALIDATOR). -build(); +public static final PropertyDescriptor JMS_PROVIDER = new PropertyDescriptor.Builder() +.name(JMS Provider) +.description(The Provider used for the JMS Server) +.required(true) +.allowableValues(ACTIVEMQ_PROVIDER) +.defaultValue(ACTIVEMQ_PROVIDER) +.build(); +public static final PropertyDescriptor URL = new PropertyDescriptor.Builder() +.name(URL) +.description(The URL of the JMS Server) +.addValidator(StandardValidators.URI_VALIDATOR) +.required(true) +.build(); +public static final PropertyDescriptor TIMEOUT = new PropertyDescriptor.Builder() +.name(Communications Timeout) +.description(The amount of time to wait when attempting to receive a message before giving up and assuming failure) +.required(true) +.addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) +.defaultValue(30 sec) +.build(); +public static final PropertyDescriptor USERNAME = new PropertyDescriptor.Builder() +.name(Username) +.description(Username used for authentication and authorization) +.required(false) +.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) +.build(); +public static final PropertyDescriptor PASSWORD = new PropertyDescriptor.Builder() +.name(Password) +.description(Password used for authentication and authorization) +.required(false) +.addValidator(Validator.VALID) +.sensitive(true) +.build(); +public static final PropertyDescriptor CLIENT_ID_PREFIX = new PropertyDescriptor.Builder() +.name(Client ID Prefix) +.description(A
[09/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d29a2d68/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java index 451ba57..6f228b2 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java @@ -94,26 +94,26 @@ public class UnpackContent extends AbstractProcessor { public static final String OCTET_STREAM = application/octet-stream; -public static final PropertyDescriptor PACKAGING_FORMAT = new PropertyDescriptor.Builder(). -name(Packaging Format). -description(The Packaging Format used to create the file). -required(true). -allowableValues(AUTO_DETECT_FORMAT, TAR_FORMAT, ZIP_FORMAT, FLOWFILE_STREAM_FORMAT_V3, FLOWFILE_STREAM_FORMAT_V2, FLOWFILE_TAR_FORMAT). -defaultValue(AUTO_DETECT_FORMAT). -build(); - -public static final Relationship REL_SUCCESS = new Relationship.Builder(). -name(success). -description(Unpacked FlowFiles are sent to this relationship). -build(); -public static final Relationship REL_ORIGINAL = new Relationship.Builder(). -name(original). -description(The original FlowFile is sent to this relationship after it has been successfully unpacked). -build(); -public static final Relationship REL_FAILURE = new Relationship.Builder(). -name(failure). -description(The original FlowFile is sent to this relationship when it cannot be unpacked for some reason). -build(); +public static final PropertyDescriptor PACKAGING_FORMAT = new PropertyDescriptor.Builder() +.name(Packaging Format) +.description(The Packaging Format used to create the file) +.required(true) +.allowableValues(AUTO_DETECT_FORMAT, TAR_FORMAT, ZIP_FORMAT, FLOWFILE_STREAM_FORMAT_V3, FLOWFILE_STREAM_FORMAT_V2, FLOWFILE_TAR_FORMAT) +.defaultValue(AUTO_DETECT_FORMAT) +.build(); + +public static final Relationship REL_SUCCESS = new Relationship.Builder() +.name(success) +.description(Unpacked FlowFiles are sent to this relationship) +.build(); +public static final Relationship REL_ORIGINAL = new Relationship.Builder() +.name(original) +.description(The original FlowFile is sent to this relationship after it has been successfully unpacked) +.build(); +public static final Relationship REL_FAILURE = new Relationship.Builder() +.name(failure) +.description(The original FlowFile is sent to this relationship when it cannot be unpacked for some reason) +.build(); private SetRelationship relationships; private ListPropertyDescriptor properties; @@ -149,15 +149,11 @@ public class UnpackContent extends AbstractProcessor { } final ProcessorLog logger = getLogger(); -String packagingFormat = context.getProperty(PACKAGING_FORMAT). -getValue(). -toLowerCase(); +String packagingFormat = context.getProperty(PACKAGING_FORMAT).getValue().toLowerCase(); if (AUTO_DETECT_FORMAT.equals(packagingFormat)) { -final String mimeType = flowFile. -getAttribute(CoreAttributes.MIME_TYPE.key()); +final String mimeType = flowFile.getAttribute(CoreAttributes.MIME_TYPE.key()); if (mimeType == null) { -logger. -error(No mime.type attribute set for {}; routing to failure, new Object[]{flowFile}); +logger.error(No mime.type attribute set for {}; routing to failure, new Object[]{flowFile}); session.transfer(flowFile, REL_FAILURE); return; } @@ -179,8 +175,7 @@ public class UnpackContent extends AbstractProcessor { packagingFormat = FLOWFILE_TAR_FORMAT; break; default: { -logger. -info(Cannot unpack {} because its mime.type attribute is set to '{}', which is not a format that can be unpacked; routing to 'success', new Object[]{flowFile, mimeType}); +logger.info(Cannot unpack {} because its mime.type attribute is set
[12/12] incubator-nifi git commit: NIFI-271
NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/d29a2d68 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/d29a2d68 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/d29a2d68 Branch: refs/heads/develop Commit: d29a2d688e437bae42c12115768cdb038b7406c5 Parents: 5481889 Author: joewitt joew...@apache.org Authored: Mon Apr 27 11:54:36 2015 -0400 Committer: joewitt joew...@apache.org Committed: Mon Apr 27 11:54:36 2015 -0400 -- .../standard/AbstractJsonPathProcessor.java | 11 +- .../standard/ConvertCharacterSet.java | 2 +- .../nifi/processors/standard/HashAttribute.java | 34 +- .../nifi/processors/standard/PutEmail.java | 302 +++- .../apache/nifi/processors/standard/PutFTP.java | 24 +- .../nifi/processors/standard/PutFile.java | 275 ++ .../processors/standard/PutFileTransfer.java| 140 +++- .../apache/nifi/processors/standard/PutJMS.java | 161 +++-- .../nifi/processors/standard/ReplaceText.java | 169 - .../standard/ReplaceTextWithMapping.java| 231 +--- .../processors/standard/RouteOnAttribute.java | 136 +++ .../processors/standard/RouteOnContent.java | 147 +++- .../nifi/processors/standard/ScanAttribute.java | 121 +++ .../nifi/processors/standard/ScanContent.java | 86 ++--- .../processors/standard/SegmentContent.java | 54 ++- .../nifi/processors/standard/SplitContent.java | 125 +++ .../nifi/processors/standard/SplitJson.java | 77 ++-- .../nifi/processors/standard/SplitText.java | 142 .../nifi/processors/standard/SplitXml.java | 70 ++-- .../nifi/processors/standard/TransformXml.java | 87 ++--- .../nifi/processors/standard/UnpackContent.java | 215 +-- .../servlets/ContentAcknowledgmentServlet.java | 55 +-- .../standard/servlets/ListenHTTPServlet.java| 142 +++- .../nifi/processors/standard/util/Bin.java | 22 +- .../processors/standard/util/BinManager.java| 41 +-- .../standard/util/DocumentReaderCallback.java | 6 +- .../processors/standard/util/FTPTransfer.java | 351 +++--- .../nifi/processors/standard/util/FTPUtils.java | 95 ++--- .../nifi/processors/standard/util/FileInfo.java | 3 +- .../processors/standard/util/FileTransfer.java | 356 +-- .../processors/standard/util/JmsFactory.java| 128 +++ .../processors/standard/util/JmsProperties.java | 256 ++--- .../util/JsonPathExpressionValidator.java | 27 +- .../standard/util/NLKBufferedReader.java| 14 +- .../processors/standard/util/SFTPTransfer.java | 351 +++--- .../processors/standard/util/SFTPUtils.java | 167 - .../standard/util/UDPStreamConsumer.java| 25 +- .../util/ValidatingBase32InputStream.java | 3 +- .../util/ValidatingBase64InputStream.java | 3 +- .../standard/util/WrappedMessageConsumer.java | 9 +- .../standard/util/WrappedMessageProducer.java | 9 +- .../src/test/java/TestIngestAndUpdate.java | 3 +- .../processors/standard/CaptureServlet.java | 3 +- .../standard/RESTServiceContentModified.java| 15 +- .../standard/TestBase64EncodeContent.java | 42 +-- .../standard/TestCompressContent.java | 85 ++--- .../processors/standard/TestControlRate.java| 3 +- .../standard/TestConvertCharacterSet.java | 13 +- .../standard/TestDetectDuplicate.java | 33 +- .../processors/standard/TestDistributeLoad.java | 19 +- .../processors/standard/TestEncodeContent.java | 66 ++-- .../processors/standard/TestEncryptContent.java | 30 +- .../standard/TestEvaluateJsonPath.java | 219 .../processors/standard/TestEvaluateXPath.java | 106 ++ .../processors/standard/TestEvaluateXQuery.java | 312 +--- .../processors/standard/TestExecuteProcess.java | 18 +- .../standard/TestExecuteStreamCommand.java | 135 +++ .../processors/standard/TestExtractText.java| 81 ++--- .../nifi/processors/standard/TestGetFile.java | 63 ++-- .../nifi/processors/standard/TestGetHTTP.java | 57 +-- .../processors/standard/TestGetJMSQueue.java| 63 ++-- .../standard/TestHandleHttpRequest.java | 19 +- .../standard/TestHandleHttpResponse.java| 81 ++--- .../processors/standard/TestHashAttribute.java | 8 +- .../processors/standard/TestHashContent.java| 5 +- .../standard/TestIdentifyMimeType.java | 16 +- .../processors/standard/TestInvokeHTTP.java | 137 ++- .../processors/standard/TestJmsConsumer.java| 88 ++--- .../nifi/processors/standard/TestListenUDP.java | 39 +- .../processors/standard/TestMergeContent.java | 176 +++-- .../processors/standard/TestModifyBytes.java| 82
[11/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d29a2d68/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutJMS.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutJMS.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutJMS.java index b37471e..65bbb36 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutJMS.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutJMS.java @@ -96,14 +96,14 @@ public class PutJMS extends AbstractProcessor { public static final Charset UTF8 = Charset.forName(UTF-8); public static final int DEFAULT_MESSAGE_PRIORITY = 4; -public static final Relationship REL_SUCCESS = new Relationship.Builder(). -name(success). -description(All FlowFiles that are sent to the JMS destination are routed to this relationship). -build(); -public static final Relationship REL_FAILURE = new Relationship.Builder(). -name(failure). -description(All FlowFiles that cannot be routed to the JMS destination are routed to this relationship). -build(); +public static final Relationship REL_SUCCESS = new Relationship.Builder() +.name(success) +.description(All FlowFiles that are sent to the JMS destination are routed to this relationship) +.build(); +public static final Relationship REL_FAILURE = new Relationship.Builder() +.name(failure) +.description(All FlowFiles that cannot be routed to the JMS destination are routed to this relationship) +.build(); private final QueueWrappedMessageProducer producerQueue = new LinkedBlockingQueue(); private final ListPropertyDescriptor properties; @@ -156,10 +156,7 @@ public class PutJMS extends AbstractProcessor { @Override public void onTrigger(final ProcessContext context, final ProcessSession session) throws ProcessException { final ProcessorLog logger = getLogger(); -final ListFlowFile flowFiles = session.get(context. -getProperty(BATCH_SIZE). -asInteger(). -intValue()); +final ListFlowFile flowFiles = session.get(context.getProperty(BATCH_SIZE).asInteger().intValue()); if (flowFiles.isEmpty()) { return; } @@ -167,14 +164,10 @@ public class PutJMS extends AbstractProcessor { WrappedMessageProducer wrappedProducer = producerQueue.poll(); if (wrappedProducer == null) { try { -wrappedProducer = JmsFactory. -createMessageProducer(context, true); -logger.info(Connected to JMS server {}, new Object[]{context. -getProperty(URL). -getValue()}); +wrappedProducer = JmsFactory.createMessageProducer(context, true); +logger.info(Connected to JMS server {}, new Object[]{context.getProperty(URL).getValue()}); } catch (final JMSException e) { -logger. -error(Failed to connect to JMS Server due to {}, new Object[]{e}); +logger.error(Failed to connect to JMS Server due to {}, new Object[]{e}); session.transfer(flowFiles, REL_FAILURE); context.yield(); return; @@ -184,9 +177,7 @@ public class PutJMS extends AbstractProcessor { final Session jmsSession = wrappedProducer.getSession(); final MessageProducer producer = wrappedProducer.getProducer(); -final int maxBufferSize = context.getProperty(MAX_BUFFER_SIZE). -asDataSize(DataUnit.B). -intValue(); +final int maxBufferSize = context.getProperty(MAX_BUFFER_SIZE).asDataSize(DataUnit.B).intValue(); try { final SetFlowFile successfulFlowFiles = new HashSet(); @@ -194,8 +185,7 @@ public class PutJMS extends AbstractProcessor { for (FlowFile flowFile : flowFiles) { if (flowFile.getSize() maxBufferSize) { session.transfer(flowFile, REL_FAILURE); -logger. -warn(Routing {} to failure because its size exceeds the configured max, new Object[]{flowFile}); +logger.warn(Routing {} to failure because its size exceeds the configured max, new Object[]{flowFile}); continue; } @@ -208,29 +198,18 @@ public class PutJMS extends AbstractProcessor {
[08/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d29a2d68/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java index 0a076ca..21e6b4c 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java @@ -56,54 +56,54 @@ public class FTPTransfer implements FileTransfer { public static final String PROXY_TYPE_HTTP = Proxy.Type.HTTP.name(); public static final String PROXY_TYPE_SOCKS = Proxy.Type.SOCKS.name(); -public static final PropertyDescriptor CONNECTION_MODE = new PropertyDescriptor.Builder(). -name(Connection Mode). -description(The FTP Connection Mode). -allowableValues(CONNECTION_MODE_ACTIVE, CONNECTION_MODE_PASSIVE). -defaultValue(CONNECTION_MODE_PASSIVE). -build(); -public static final PropertyDescriptor TRANSFER_MODE = new PropertyDescriptor.Builder(). -name(Transfer Mode). -description(The FTP Transfer Mode). -allowableValues(TRANSFER_MODE_BINARY, TRANSFER_MODE_ASCII). -defaultValue(TRANSFER_MODE_BINARY). -build(); -public static final PropertyDescriptor PORT = new PropertyDescriptor.Builder(). -name(Port). -description(The port that the remote system is listening on for file transfers). -addValidator(StandardValidators.PORT_VALIDATOR). -required(true). -defaultValue(21). -build(); -public static final PropertyDescriptor PROXY_TYPE = new PropertyDescriptor.Builder(). -name(Proxy Type). -description(Proxy type used for file transfers). -allowableValues(PROXY_TYPE_DIRECT, PROXY_TYPE_HTTP, PROXY_TYPE_SOCKS). -defaultValue(PROXY_TYPE_DIRECT). -build(); -public static final PropertyDescriptor PROXY_HOST = new PropertyDescriptor.Builder(). -name(Proxy Host). -description(The fully qualified hostname or IP address of the proxy server). -addValidator(StandardValidators.NON_EMPTY_VALIDATOR). -build(); -public static final PropertyDescriptor PROXY_PORT = new PropertyDescriptor.Builder(). -name(Proxy Port). -description(The port of the proxy server). -addValidator(StandardValidators.PORT_VALIDATOR). -build(); -public static final PropertyDescriptor HTTP_PROXY_USERNAME = new PropertyDescriptor.Builder(). -name(Http Proxy Username). -description(Http Proxy Username). -addValidator(StandardValidators.NON_EMPTY_VALIDATOR). -required(false). -build(); -public static final PropertyDescriptor HTTP_PROXY_PASSWORD = new PropertyDescriptor.Builder(). -name(Http Proxy Password). -description(Http Proxy Password). -addValidator(StandardValidators.NON_EMPTY_VALIDATOR). -required(false). -sensitive(true). -build(); +public static final PropertyDescriptor CONNECTION_MODE = new PropertyDescriptor.Builder() +.name(Connection Mode) +.description(The FTP Connection Mode) +.allowableValues(CONNECTION_MODE_ACTIVE, CONNECTION_MODE_PASSIVE) +.defaultValue(CONNECTION_MODE_PASSIVE) +.build(); +public static final PropertyDescriptor TRANSFER_MODE = new PropertyDescriptor.Builder() +.name(Transfer Mode) +.description(The FTP Transfer Mode) +.allowableValues(TRANSFER_MODE_BINARY, TRANSFER_MODE_ASCII) +.defaultValue(TRANSFER_MODE_BINARY) +.build(); +public static final PropertyDescriptor PORT = new PropertyDescriptor.Builder() +.name(Port) +.description(The port that the remote system is listening on for file transfers) +.addValidator(StandardValidators.PORT_VALIDATOR) +.required(true) +.defaultValue(21) +.build(); +public static final PropertyDescriptor PROXY_TYPE = new PropertyDescriptor.Builder() +.name(Proxy Type) +.description(Proxy type used for file transfers) +.allowableValues(PROXY_TYPE_DIRECT, PROXY_TYPE_HTTP, PROXY_TYPE_SOCKS) +
[02/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d29a2d68/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceTextWithMapping.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceTextWithMapping.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceTextWithMapping.java index 89f330b..7a480a8 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceTextWithMapping.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceTextWithMapping.java @@ -16,7 +16,6 @@ */ package org.apache.nifi.processors.standard; -import org.apache.nifi.processors.standard.ReplaceTextWithMapping; import static org.junit.Assert.assertEquals; import java.io.IOException; @@ -36,23 +35,15 @@ public class TestReplaceTextWithMapping { @Test public void testSimple() throws IOException { -final TestRunner runner = TestRunners. -newTestRunner(new ReplaceTextWithMapping()); -final String mappingFile = Paths. - get(src/test/resources/TestReplaceTextWithMapping/color-fruit-mapping.txt). -toFile(). -getAbsolutePath(); +final TestRunner runner = TestRunners.newTestRunner(new ReplaceTextWithMapping()); +final String mappingFile = Paths.get(src/test/resources/TestReplaceTextWithMapping/color-fruit-mapping.txt).toFile().getAbsolutePath(); runner.setProperty(ReplaceTextWithMapping.MAPPING_FILE, mappingFile); -runner.enqueue(Paths. - get(src/test/resources/TestReplaceTextWithMapping/colors-without-dashes.txt)); + runner.enqueue(Paths.get(src/test/resources/TestReplaceTextWithMapping/colors-without-dashes.txt)); runner.run(); -runner. - assertAllFlowFilesTransferred(ReplaceTextWithMapping.REL_SUCCESS, 1); -final MockFlowFile out = runner. - getFlowFilesForRelationship(ReplaceTextWithMapping.REL_SUCCESS). -get(0); + runner.assertAllFlowFilesTransferred(ReplaceTextWithMapping.REL_SUCCESS, 1); +final MockFlowFile out = runner.getFlowFilesForRelationship(ReplaceTextWithMapping.REL_SUCCESS).get(0); String outputString = new String(out.toByteArray()); String expected = roses are apple\n + violets are blueberry\n @@ -63,12 +54,8 @@ public class TestReplaceTextWithMapping { @Test public void testExpressionLanguageInText() throws IOException { -final TestRunner runner = TestRunners. -newTestRunner(new ReplaceTextWithMapping()); -final String mappingFile = Paths. - get(src/test/resources/TestReplaceTextWithMapping/color-fruit-mapping.txt). -toFile(). -getAbsolutePath(); +final TestRunner runner = TestRunners.newTestRunner(new ReplaceTextWithMapping()); +final String mappingFile = Paths.get(src/test/resources/TestReplaceTextWithMapping/color-fruit-mapping.txt).toFile().getAbsolutePath(); runner.setProperty(ReplaceTextWithMapping.MAPPING_FILE, mappingFile); String text = ${foo} red ${baz}; @@ -76,11 +63,8 @@ public class TestReplaceTextWithMapping { runner.enqueue(text.getBytes()); runner.run(); -runner. - assertAllFlowFilesTransferred(ReplaceTextWithMapping.REL_SUCCESS, 1); -final MockFlowFile out = runner. - getFlowFilesForRelationship(ReplaceTextWithMapping.REL_SUCCESS). -get(0); + runner.assertAllFlowFilesTransferred(ReplaceTextWithMapping.REL_SUCCESS, 1); +final MockFlowFile out = runner.getFlowFilesForRelationship(ReplaceTextWithMapping.REL_SUCCESS).get(0); String outputString = new String(out.toByteArray()); String expected = ${foo} apple ${baz}; assertEquals(expected, outputString); @@ -88,27 +72,19 @@ public class TestReplaceTextWithMapping { @Test public void testExpressionLanguageInText2() throws IOException { -final TestRunner runner = TestRunners. -newTestRunner(new ReplaceTextWithMapping()); -final String mappingFile = Paths. - get(src/test/resources/TestReplaceTextWithMapping/color-fruit-mapping.txt). -toFile(). -getAbsolutePath(); +final TestRunner runner = TestRunners.newTestRunner(new ReplaceTextWithMapping()); +final String mappingFile =
[01/12] incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop 548188939 - d29a2d688 http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d29a2d68/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitText.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitText.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitText.java index aeb887a..aa28cc0 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitText.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitText.java @@ -36,16 +36,6 @@ public class TestSplitText { final Path dataPath = Paths.get(src/test/resources/TestSplitText); final Path file = dataPath.resolve(originalFilename); -//public static void main(final String[] args) throws IOException { -//for (int i=1; i = 4; i++) { -//final Path path = Paths.get(src/test/resources/TestSplitText/ + i + .txt); -//final byte[] data = Files.readAllBytes(path); -//final String text = new String(data, StandardCharsets.UTF_8); -//final String updated = text.replace(\n, \r\n); -//final Path updatedPath = Paths.get(src/test/resources/TestSplitText/updated/ + i + .txt); -//Files.write(updatedPath, updated.getBytes(StandardCharsets.UTF_8), StandardOpenOption.CREATE_NEW); -//} -//} @Test public void testRoutesToFailureIfHeaderLinesNotAllPresent() throws IOException { final TestRunner runner = TestRunners.newTestRunner(new SplitText()); @@ -81,22 +71,17 @@ public class TestSplitText { runner.assertTransferCount(SplitText.REL_ORIGINAL, 1); runner.assertTransferCount(SplitText.REL_SPLITS, 4); -final ListMockFlowFile splits = runner. -getFlowFilesForRelationship(SplitText.REL_SPLITS); +final ListMockFlowFile splits = runner.getFlowFilesForRelationship(SplitText.REL_SPLITS); final String expected0 = Header Line #1\nHeader Line #2\nLine #1; final String expected1 = Line #2\nLine #3\nLine #4; final String expected2 = Line #5\nLine #6\nLine #7; final String expected3 = Line #8\nLine #9\nLine #10; -splits.get(0). -assertContentEquals(expected0); -splits.get(1). -assertContentEquals(expected1); -splits.get(2). -assertContentEquals(expected2); -splits.get(3). -assertContentEquals(expected3); +splits.get(0).assertContentEquals(expected0); +splits.get(1).assertContentEquals(expected1); +splits.get(2).assertContentEquals(expected2); +splits.get(3).assertContentEquals(expected3); } @Test @@ -112,14 +97,11 @@ public class TestSplitText { runner.assertTransferCount(SplitText.REL_ORIGINAL, 1); runner.assertTransferCount(SplitText.REL_SPLITS, 4); -final ListMockFlowFile splits = runner. -getFlowFilesForRelationship(SplitText.REL_SPLITS); +final ListMockFlowFile splits = runner.getFlowFilesForRelationship(SplitText.REL_SPLITS); for (int i = 0; i splits.size(); i++) { final MockFlowFile split = splits.get(i); -split.assertContentEquals(file.getParent(). -resolve((i + 1) + .txt)); -split.assertAttributeEquals(SplitText.FRAGMENT_INDEX, String. -valueOf(i + 1)); +split.assertContentEquals(file.getParent().resolve((i + 1) + .txt)); +split.assertAttributeEquals(SplitText.FRAGMENT_INDEX, String.valueOf(i + 1)); } } @@ -136,26 +118,16 @@ public class TestSplitText { runner.assertTransferCount(SplitText.REL_ORIGINAL, 1); runner.assertTransferCount(SplitText.REL_SPLITS, 2); -final ListMockFlowFile splits = runner. -getFlowFilesForRelationship(SplitText.REL_SPLITS); -splits.get(0). -assertContentEquals(file.getParent(). -resolve(5.txt)); -splits.get(0). -assertAttributeEquals(SplitText.FRAGMENT_INDEX, String. -valueOf(1)); -splits.get(1). -assertContentEquals(file.getParent(). -resolve(6.txt)); -splits.get(1). -assertAttributeEquals(SplitText.FRAGMENT_INDEX, String. -valueOf(2)); +final ListMockFlowFile splits = runner.getFlowFilesForRelationship(SplitText.REL_SPLITS); +
[04/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d29a2d68/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestHandleHttpRequest.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestHandleHttpRequest.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestHandleHttpRequest.java index 8b9b2ac..6012b04 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestHandleHttpRequest.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestHandleHttpRequest.java @@ -44,15 +44,13 @@ public class TestHandleHttpRequest { @Test public void testRequestAddedToService() throws InitializationException, MalformedURLException, IOException { -final TestRunner runner = TestRunners. -newTestRunner(HandleHttpRequest.class); +final TestRunner runner = TestRunners.newTestRunner(HandleHttpRequest.class); runner.setProperty(HandleHttpRequest.PORT, 0); final MockHttpContextMap contextMap = new MockHttpContextMap(); runner.addControllerService(http-context-map, contextMap); runner.enableControllerService(contextMap); -runner. -setProperty(HandleHttpRequest.HTTP_CONTEXT_MAP, http-context-map); +runner.setProperty(HandleHttpRequest.HTTP_CONTEXT_MAP, http-context-map); // trigger processor to stop but not shutdown. runner.run(1, false); @@ -61,8 +59,7 @@ public class TestHandleHttpRequest { @Override public void run() { try { -final int port = ((HandleHttpRequest) runner. -getProcessor()).getPort(); +final int port = ((HandleHttpRequest) runner.getProcessor()).getPort(); final HttpURLConnection connection = (HttpURLConnection) new URL(http://localhost:; + port + /my/path?query=truevalue1=value1value2=value3value4=apple=orange). openConnection(); connection.setDoOutput(false); @@ -73,8 +70,7 @@ public class TestHandleHttpRequest { connection.setConnectTimeout(3000); connection.setReadTimeout(3000); -StreamUtils. -copy(connection.getInputStream(), new NullOutputStream()); +StreamUtils.copy(connection.getInputStream(), new NullOutputStream()); } catch (final Throwable t) { t.printStackTrace(); Assert.fail(t.toString()); @@ -92,13 +88,10 @@ public class TestHandleHttpRequest { // process the request. runner.run(1, false); -runner. - assertAllFlowFilesTransferred(HandleHttpRequest.REL_SUCCESS, 1); + runner.assertAllFlowFilesTransferred(HandleHttpRequest.REL_SUCCESS, 1); assertEquals(1, contextMap.size()); -final MockFlowFile mff = runner. -getFlowFilesForRelationship(HandleHttpRequest.REL_SUCCESS). -get(0); +final MockFlowFile mff = runner.getFlowFilesForRelationship(HandleHttpRequest.REL_SUCCESS).get(0); mff.assertAttributeEquals(http.query.param.query, true); mff.assertAttributeEquals(http.query.param.value1, value1); mff.assertAttributeEquals(http.query.param.value2, ); http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d29a2d68/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestHandleHttpResponse.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestHandleHttpResponse.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestHandleHttpResponse.java index 40683ae..2bceda6 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestHandleHttpResponse.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestHandleHttpResponse.java @@ -51,14 +51,12 @@ public class TestHandleHttpResponse { @Test public void testEnsureCompleted() throws InitializationException { -final
[10/12] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d29a2d68/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java index 53ed961..46629fe 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java @@ -62,35 +62,35 @@ public class ScanAttribute extends AbstractProcessor { public static final String MATCH_CRITERIA_ALL = All Must Match; public static final String MATCH_CRITERIA_ANY = At Least 1 Must Match; -public static final PropertyDescriptor MATCHING_CRITERIA = new PropertyDescriptor.Builder(). -name(Match Criteria). -description(If set to All Must Match, then FlowFiles will be routed to 'matched' only if all specified +public static final PropertyDescriptor MATCHING_CRITERIA = new PropertyDescriptor.Builder() +.name(Match Criteria) +.description(If set to All Must Match, then FlowFiles will be routed to 'matched' only if all specified + attributes' values are found in the dictionary. If set to At Least 1 Must Match, FlowFiles will -+ be routed to 'matched' if any attribute specified is found in the dictionary). -required(true). -allowableValues(MATCH_CRITERIA_ANY, MATCH_CRITERIA_ALL). -defaultValue(MATCH_CRITERIA_ANY). -build(); -public static final PropertyDescriptor ATTRIBUTE_PATTERN = new PropertyDescriptor.Builder(). -name(Attribute Pattern). -description(Regular Expression that specifies the names of attributes whose values will be matched against the terms in the dictionary). -required(true). -addValidator(StandardValidators.REGULAR_EXPRESSION_VALIDATOR). -defaultValue(.*). -build(); -public static final PropertyDescriptor DICTIONARY_FILE = new PropertyDescriptor.Builder(). -name(Dictionary File). -description(A new-line-delimited text file that includes the terms that should trigger a match. Empty lines are ignored.). -required(true). -addValidator(StandardValidators.FILE_EXISTS_VALIDATOR). -build(); -public static final PropertyDescriptor DICTIONARY_FILTER = new PropertyDescriptor.Builder(). -name(Dictionary Filter Pattern). -description(A Regular Expression that will be applied to each line in the dictionary file. If the regular expression does not match the line, the line will not be included in the list of terms to search for. If a Matching Group is specified, only the portion of the term that matches that Matching Group will be used instead of the entire term. If not specified, all terms in the dictionary will be used and each term will consist of the text of the entire line in the file). -required(false). -addValidator(StandardValidators.createRegexValidator(0, 1, false)). -defaultValue(null). -build(); ++ be routed to 'matched' if any attribute specified is found in the dictionary) +.required(true) +.allowableValues(MATCH_CRITERIA_ANY, MATCH_CRITERIA_ALL) +.defaultValue(MATCH_CRITERIA_ANY) +.build(); +public static final PropertyDescriptor ATTRIBUTE_PATTERN = new PropertyDescriptor.Builder() +.name(Attribute Pattern) +.description(Regular Expression that specifies the names of attributes whose values will be matched against the terms in the dictionary) +.required(true) +.addValidator(StandardValidators.REGULAR_EXPRESSION_VALIDATOR) +.defaultValue(.*) +.build(); +public static final PropertyDescriptor DICTIONARY_FILE = new PropertyDescriptor.Builder() +.name(Dictionary File) +.description(A new-line-delimited text file that includes the terms that should trigger a match. Empty lines are ignored.) +.required(true) +.addValidator(StandardValidators.FILE_EXISTS_VALIDATOR) +.build(); +public static final PropertyDescriptor DICTIONARY_FILTER = new PropertyDescriptor.Builder() +.name(Dictionary Filter Pattern) +.description(A Regular Expression that will be applied to each line in the dictionary
[1/2] incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop 666de3d41 - 6a706458d http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/6a706458/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceText.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceText.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceText.java index acabe08..e47d58c 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceText.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceText.java @@ -49,7 +49,11 @@ import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.nio.charset.Charset; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -58,7 +62,8 @@ import java.util.regex.Pattern; @SideEffectFree @SupportsBatching @Tags({Text, Regular Expression, Update, Change, Replace, Modify, Regex}) -@CapabilityDescription(Updates the content of a FlowFile by evaluating a Regular Expression against it and replacing the section of the content that matches the Regular Expression with some alternate value.) +@CapabilityDescription(Updates the content of a FlowFile by evaluating a Regular Expression against it and replacing the section of ++ the content that matches the Regular Expression with some alternate value.) public class ReplaceText extends AbstractProcessor { //Constants @@ -77,7 +82,8 @@ public class ReplaceText extends AbstractProcessor { .build(); public static final PropertyDescriptor REPLACEMENT_VALUE = new PropertyDescriptor.Builder() .name(Replacement Value) -.description(The value to replace the regular expression with. Back-references to Regular Expression capturing groups are supported, but back-references that reference capturing groups that do not exist in the regular expression will be treated as literal value.) +.description(The value to replace the regular expression with. Back-references to Regular Expression capturing groups are supported, but ++ back-references that reference capturing groups that do not exist in the regular expression will be treated as literal value.) .required(true) .defaultValue($1) .addValidator(Validator.VALID) @@ -92,15 +98,20 @@ public class ReplaceText extends AbstractProcessor { .build(); public static final PropertyDescriptor MAX_BUFFER_SIZE = new PropertyDescriptor.Builder() .name(Maximum Buffer Size) -.description(Specifies the maximum amount of data to buffer (per file or per line, depending on the Evaluation Mode) in order to apply the regular expressions. If 'Entire Text' (in Evaluation Mode) is selected and the FlowFile is larger than this value, the FlowFile will be routed to 'failure'. -+ In 'Line-by-Line' Mode, if a single line is larger than this value, the FlowFile will be routed to 'failure'. A default value of 1 MB is provided, primarily for 'Entire Text' mode. In 'Line-by-Line' Mode, a value such as 8 KB or 16 KB is suggested. This value is ignored and the buffer is not used if 'Regular Expression' is set to '.*') +.description(Specifies the maximum amount of data to buffer (per file or per line, depending on the Evaluation Mode) in order to ++ apply the regular expressions. If 'Entire Text' (in Evaluation Mode) is selected and the FlowFile is larger than this value, ++ the FlowFile will be routed to 'failure'. ++ In 'Line-by-Line' Mode, if a single line is larger than this value, the FlowFile will be routed to 'failure'. A default value ++ of 1 MB is provided, primarily for 'Entire Text' mode. In 'Line-by-Line' Mode, a value such as 8 KB or 16 KB is suggested. ++ This value is ignored and the buffer is not used if 'Regular Expression' is set to '.*') .required(true) .addValidator(StandardValidators.DATA_SIZE_VALIDATOR) .defaultValue(1 MB) .build(); public static final PropertyDescriptor EVALUATION_MODE = new PropertyDescriptor.Builder() .name(Evaluation Mode) -.description(Evaluate the 'Regular Expression' against
incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop 9a3b6bed6 - 10860944d NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/10860944 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/10860944 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/10860944 Branch: refs/heads/develop Commit: 10860944d14cc4ddb0805b4085b401ae6dc195b2 Parents: 9a3b6be Author: joewitt joew...@apache.org Authored: Mon Apr 27 13:50:09 2015 -0400 Committer: joewitt joew...@apache.org Committed: Mon Apr 27 13:50:09 2015 -0400 -- .../nifi-hadoop-bundle/nifi-hadoop-nar/pom.xml | 28 - .../hadoop/AbstractHadoopProcessor.java | 7 +-- .../hadoop/CreateHadoopSequenceFile.java| 28 +++-- .../apache/nifi/processors/hadoop/GetHDFS.java | 60 ++-- .../processors/hadoop/GetHDFSSequenceFile.java | 18 ++ .../nifi/processors/hadoop/KeyValueReader.java | 6 +- .../nifi/processors/hadoop/ValueReader.java | 5 +- .../hadoop/util/ByteFilteringOutputStream.java | 24 +++- .../hadoop/util/InputStreamWritable.java| 6 +- .../hadoop/util/OutputStreamWritable.java | 3 +- .../hadoop/util/SequenceFileWriter.java | 12 ++-- 11 files changed, 81 insertions(+), 116 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/10860944/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hadoop-nar/pom.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hadoop-nar/pom.xml b/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hadoop-nar/pom.xml index 1eb29db..ca246b3 100644 --- a/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hadoop-nar/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hadoop-nar/pom.xml @@ -1,18 +1,18 @@ project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; -!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the License); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an AS IS BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --- +!-- + 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. +-- modelVersion4.0.0/modelVersion parent groupIdorg.apache.nifi/groupId http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/10860944/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java -- diff --git a/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java b/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java index 8d5749b..3294ead 100644 --- a/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java +++ b/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java @@ -45,16 +45,15 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.net.NetUtils
[1/2] incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop 6a706458d - 9a3b6bed6 http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a3b6bed/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html index ad98221..740abec 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html @@ -1,36 +1,36 @@ !DOCTYPE html html lang=en -!-- - 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. --- -head -meta charset=utf-8 / -titleDistributed Map Cache Client Service/title -link rel=stylesheet href=../../css/component-usage.css type=text/css / -/head +!-- + 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. +-- +head +meta charset=utf-8 / +titleDistributed Map Cache Client Service/title +link rel=stylesheet href=../../css/component-usage.css type=text/css / +/head -body - p - Below is an example of how to create a distributed map cache server for clients to connect to. - Note that the identifier in this example is codecache-server/code. If you are using this template - to create your own DistributedMapCache server, replace the values in this template with values that are - suitable for your system. Possible options for codePort/code, codeMaximum Cache Entries/code, - codeEviction Strategy/code, span style=font-style: italic;SSL Context Service/span, and - span style=font-style: italic;Persistence Directory/span - /p +body +p +Below is an example of how to create a distributed map cache server for clients to connect to. +Note that the identifier in this example is codecache-server/code. If you are using this template +to create your own DistributedMapCache server, replace the values in this template with values that are +suitable for your system. Possible options for codePort/code, codeMaximum Cache Entries/code, +codeEviction Strategy/code, span style=font-style: italic;SSL Context Service/span, and +span style=font-style: italic;Persistence Directory/span +/p - pre +pre lt;?xml version=1.0 encoding=UTF-8 ?gt; lt;servicesgt; lt;servicegt; @@ -41,6 +41,6 @@ lt;property name=Eviction Strategygt;Least Recently
[2/2] incubator-nifi git commit: NIFI-271
NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/9a3b6bed Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/9a3b6bed Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/9a3b6bed Branch: refs/heads/develop Commit: 9a3b6bed62e9962ff97f2c76055cd4d49705ff89 Parents: 6a70645 Author: joewitt joew...@apache.org Authored: Mon Apr 27 13:43:35 2015 -0400 Committer: joewitt joew...@apache.org Committed: Mon Apr 27 13:43:35 2015 -0400 -- .../distributed/cache/client/CommsSession.java | 16 +-- .../DistributedMapCacheClientService.java | 7 +- .../DistributedSetCacheClientService.java | 6 +- .../cache/client/SSLCommsSession.java | 25 ++-- .../cache/client/StandardCommsSession.java | 1 + .../additionalDetails.html | 60 +- .../cache/server/AbstractCacheServer.java | 25 ++-- .../distributed/cache/server/CacheRecord.java | 12 +- .../distributed/cache/server/CacheServer.java | 3 +- .../cache/server/DistributedCacheServer.java| 3 +- .../cache/server/DistributedSetCacheServer.java | 13 ++- .../cache/server/EvictionPolicy.java| 24 ++-- .../cache/server/SetCacheServer.java| 25 ++-- .../server/map/DistributedMapCacheServer.java | 12 +- .../distributed/cache/server/map/MapCache.java | 4 + .../cache/server/map/MapCacheRecord.java| 19 ++-- .../cache/server/map/MapCacheServer.java| 113 ++- .../cache/server/map/MapPutResult.java | 5 +- .../cache/server/map/PersistentMapCache.java| 51 - .../cache/server/map/SimpleMapCache.java| 47 .../cache/server/set/PersistentSetCache.java| 57 +- .../distributed/cache/server/set/SetCache.java | 5 +- .../cache/server/set/SetCacheRecord.java| 15 +-- .../cache/server/set/SetCacheResult.java| 11 +- .../cache/server/set/SimpleSetCache.java| 41 +++ .../additionalDetails.html | 62 +- .../cache/server/TestServerAndClient.java | 9 +- .../nifi-http-context-map-api/pom.xml | 34 +++--- .../org/apache/nifi/http/HttpContextMap.java| 45 .../nifi-http-context-map/pom.xml | 20 ++-- .../nifi/http/StandardHttpContextMap.java | 83 +++--- .../index.html | 36 +++--- .../nifi/ssl/StandardSSLContextService.java | 3 +- .../apache/nifi/ssl/SSLContextServiceTest.java | 4 +- 34 files changed, 461 insertions(+), 435 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a3b6bed/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/CommsSession.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/CommsSession.java b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/CommsSession.java index f838c2f..c035485 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/CommsSession.java +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/CommsSession.java @@ -27,20 +27,20 @@ import javax.net.ssl.SSLContext; public interface CommsSession extends Closeable { void setTimeout(final long value, final TimeUnit timeUnit); - + InputStream getInputStream() throws IOException; - + OutputStream getOutputStream() throws IOException; - + boolean isClosed(); - + void interrupt(); - + String getHostname(); - + int getPort(); - + long getTimeout(TimeUnit timeUnit); - + SSLContext getSSLContext(); } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a3b6bed/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java -- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache
[2/2] incubator-nifi git commit: NIFI-271
NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/6a706458 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/6a706458 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/6a706458 Branch: refs/heads/develop Commit: 6a706458d093af061e6b957d99de3ca1bc1f4c30 Parents: 666de3d Author: joewitt joew...@apache.org Authored: Mon Apr 27 13:25:44 2015 -0400 Committer: joewitt joew...@apache.org Committed: Mon Apr 27 13:25:44 2015 -0400 -- nifi-parent/pom.xml | 6 +- .../nifi/processors/standard/BinFiles.java | 15 +- .../processors/standard/CompressContent.java| 9 +- .../nifi/processors/standard/ControlRate.java | 11 +- .../standard/ConvertCharacterSet.java | 22 ++- .../processors/standard/DistributeLoad.java | 17 +- .../processors/standard/EvaluateJsonPath.java | 36 ++-- .../nifi/processors/standard/EvaluateXPath.java | 9 +- .../processors/standard/EvaluateXQuery.java | 6 +- .../processors/standard/ExecuteProcess.java | 9 +- .../standard/ExecuteStreamCommand.java | 21 +-- .../nifi/processors/standard/ExtractText.java | 3 +- .../processors/standard/GenerateFlowFile.java | 3 +- .../nifi/processors/standard/GetFile.java | 6 +- .../nifi/processors/standard/GetJMSTopic.java | 3 +- .../processors/standard/HandleHttpRequest.java | 17 +- .../processors/standard/HandleHttpResponse.java | 3 +- .../nifi/processors/standard/HashAttribute.java | 10 +- .../nifi/processors/standard/InvokeHTTP.java| 24 ++- .../nifi/processors/standard/JmsConsumer.java | 6 +- .../nifi/processors/standard/ListenUDP.java | 178 +-- .../nifi/processors/standard/MergeContent.java | 6 +- .../nifi/processors/standard/PostHTTP.java | 47 +++-- .../nifi/processors/standard/PutEmail.java | 6 +- .../apache/nifi/processors/standard/PutFTP.java | 9 +- .../processors/standard/PutFileTransfer.java| 11 +- .../apache/nifi/processors/standard/PutJMS.java | 3 +- .../nifi/processors/standard/PutSFTP.java | 6 +- .../nifi/processors/standard/ReplaceText.java | 28 ++- .../standard/ReplaceTextWithMapping.java| 13 +- .../processors/standard/RouteOnAttribute.java | 6 +- .../nifi/processors/standard/ScanAttribute.java | 5 +- .../nifi/processors/standard/SplitContent.java | 9 +- .../nifi/processors/standard/SplitText.java | 18 +- .../nifi/processors/standard/SplitXml.java | 3 +- .../nifi/processors/standard/TransformXml.java | 52 +++--- .../nifi/processors/standard/UnpackContent.java | 39 ++-- .../nifi/processors/standard/ValidateXml.java | 51 +++--- .../servlets/ContentAcknowledgmentServlet.java | 5 - .../standard/servlets/ListenHTTPServlet.java| 5 - .../nifi/processors/standard/util/Bin.java | 22 +-- .../processors/standard/util/BinManager.java| 2 +- .../standard/util/DocumentReaderCallback.java | 10 +- .../processors/standard/util/FTPTransfer.java | 3 +- .../nifi/processors/standard/util/FTPUtils.java | 2 +- .../processors/standard/util/FileTransfer.java | 29 ++- .../processors/standard/util/SFTPTransfer.java | 9 +- .../standard/util/XmlSplitterSaxParser.java | 11 +- .../processors/standard/TestDistributeLoad.java | 3 +- .../standard/TestHandleHttpRequest.java | 4 +- 50 files changed, 374 insertions(+), 457 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/6a706458/nifi-parent/pom.xml -- diff --git a/nifi-parent/pom.xml b/nifi-parent/pom.xml index 2e888c5..bdb94c8 100644 --- a/nifi-parent/pom.xml +++ b/nifi-parent/pom.xml @@ -253,7 +253,7 @@ module name=Checker property name=charset value=UTF-8 / property name=severity value=warning / -!-- Checks for whitespace -- +!-- Checks for whitespace -- !-- See http://checkstyle.sf.net/config_whitespace.html -- module name=FileTabCharacter property name=eachLine value=true / @@ -267,10 +267,6 @@ property name=format value=[@]see\s+[{][@]link / property name=message value=Javadoc @see does not need @link: pick one or the other. / /module -module name=RegexpSinglelineJava -property name=format value=jline
[1/3] incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop 384b2ac25 - 43b2f040b http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/21209b23/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/impl/HttpRequestReplicatorImpl.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/impl/HttpRequestReplicatorImpl.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/impl/HttpRequestReplicatorImpl.java index 81bb7a7..32181e3 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/impl/HttpRequestReplicatorImpl.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/impl/HttpRequestReplicatorImpl.java @@ -59,21 +59,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * An implementation of the codeHttpRequestReplicator/code interface. This - * implementation parallelizes the node HTTP requests using the given - * codeExecutorService/code instance. Individual requests may have - * connection and read timeouts set, which may be set during instance - * construction. Otherwise, the default is not to timeout. + * An implementation of the codeHttpRequestReplicator/code interface. This implementation parallelizes the node HTTP requests using the given codeExecutorService/code instance. Individual + * requests may have connection and read timeouts set, which may be set during instance construction. Otherwise, the default is not to timeout. * - * If a node protocol scheme is provided during construction, then all requests - * will be replicated using the given scheme. If null is provided as the scheme - * (the default), then the requests will be replicated using the scheme of the - * original URI. + * If a node protocol scheme is provided during construction, then all requests will be replicated using the given scheme. If null is provided as the scheme (the default), then the requests will be + * replicated using the scheme of the original URI. * - * Clients must call start() and stop() to initialize and shutdown the instance. - * The instance must be started before issuing any replication requests. + * Clients must call start() and stop() to initialize and shutdown the instance. The instance must be started before issuing any replication requests. * - * @author unattributed */ public class HttpRequestReplicatorImpl implements HttpRequestReplicator { @@ -97,11 +90,9 @@ public class HttpRequestReplicatorImpl implements HttpRequestReplicator { private String nodeProtocolScheme = null; /** - * Creates an instance. The connection timeout and read timeout will be - * infinite. + * Creates an instance. The connection timeout and read timeout will be infinite. * - * @param numThreads the number of threads to use when parallelizing - * requests + * @param numThreads the number of threads to use when parallelizing requests * @param client a client for making requests */ public HttpRequestReplicatorImpl(final int numThreads, final Client client) { @@ -111,12 +102,10 @@ public class HttpRequestReplicatorImpl implements HttpRequestReplicator { /** * Creates an instance. * - * @param numThreads the number of threads to use when parallelizing - * requests + * @param numThreads the number of threads to use when parallelizing requests * @param client a client for making requests - * @param connectionTimeoutMs the connection timeout specified in - * milliseconds - * @param readTimeoutMs the read timeout specified in milliseconds + * @param connectionTimeout the connection timeout specified in milliseconds + * @param readTimeout the read timeout specified in milliseconds */ public HttpRequestReplicatorImpl(final int numThreads, final Client client, final String connectionTimeout, final String readTimeout) { @@ -178,9 +167,7 @@ public class HttpRequestReplicatorImpl implements HttpRequestReplicator { /** * Sets the protocol scheme to use when issuing requests to nodes. * - * @param nodeProtocolScheme the scheme. Valid values are http, https, - * or null. If null is specified, then the scheme of the originating request - * is used when replicating that request. + * @param nodeProtocolScheme the scheme. Valid values are http, https, or null. If null is specified, then the scheme of the originating request is used when replicating that request. */ public synchronized void setNodeProtocolScheme(final String nodeProtocolScheme)
[2/3] incubator-nifi git commit: NIFI-271
NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/21209b23 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/21209b23 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/21209b23 Branch: refs/heads/develop Commit: 21209b2341533bfd16e751a98d0dc65da8eee45b Parents: 1086094 Author: joewitt joew...@apache.org Authored: Mon Apr 27 14:26:14 2015 -0400 Committer: joewitt joew...@apache.org Committed: Mon Apr 27 14:26:14 2015 -0400 -- .../org/apache/nifi/cluster/event/Event.java| 6 +- .../apache/nifi/cluster/event/EventManager.java | 8 +- .../cluster/event/impl/EventManagerImpl.java| 6 +- .../cluster/firewall/ClusterNodeFirewall.java | 6 +- .../impl/FileBasedClusterNodeFirewall.java | 16 +- .../apache/nifi/cluster/flow/DataFlowDao.java | 3 +- .../cluster/flow/DataFlowManagementService.java | 23 +- .../nifi/cluster/flow/StaleFlowException.java | 3 +- .../nifi/cluster/flow/impl/DataFlowDaoImpl.java | 30 +-- .../impl/DataFlowManagementServiceImpl.java | 19 +- .../nifi/cluster/manager/ClusterManager.java| 100 +++ .../cluster/manager/HttpClusterManager.java | 111 +++- .../cluster/manager/HttpRequestReplicator.java | 41 +-- .../cluster/manager/HttpResponseMapper.java | 3 +- .../nifi/cluster/manager/NodeResponse.java | 57 ++-- .../ConnectingNodeMutableRequestException.java | 3 +- ...DisconnectedNodeMutableRequestException.java | 3 +- .../exception/IllegalClusterStateException.java | 3 +- .../exception/IllegalNodeDeletionException.java | 3 +- .../IllegalNodeDisconnectionException.java | 4 +- .../IllegalNodeReconnectionException.java | 3 +- .../IneligiblePrimaryNodeException.java | 3 +- .../exception/MutableRequestException.java | 5 +- .../exception/NoConnectedNodesException.java| 3 +- .../exception/NoResponseFromNodesException.java | 5 +- .../exception/NodeDisconnectionException.java | 3 +- .../PrimaryRoleAssignmentException.java | 3 +- .../SafeModeMutableRequestException.java| 3 +- .../manager/exception/UnknownNodeException.java | 3 +- .../exception/UriConstructionException.java | 4 +- .../manager/impl/HttpRequestReplicatorImpl.java | 42 +-- .../manager/impl/HttpResponseMapperImpl.java| 9 +- .../cluster/manager/impl/WebClusterManager.java | 261 +++ .../java/org/apache/nifi/cluster/node/Node.java | 40 +-- ...anagerProtocolServiceLocatorFactoryBean.java | 8 +- .../spring/WebClusterManagerFactoryBean.java| 4 +- .../event/impl/EventManagerImplTest.java| 5 +- .../impl/FileBasedClusterNodeFirewallTest.java | 4 +- .../impl/HttpRequestReplicatorImplTest.java | 5 +- .../impl/HttpResponseMapperImplTest.java| 6 +- .../cluster/manager/testutils/HttpRequest.java | 7 +- .../cluster/manager/testutils/HttpResponse.java | 3 +- .../manager/testutils/HttpResponseAction.java | 4 +- .../cluster/manager/testutils/HttpServer.java | 3 +- .../ClusterManagerProtocolSenderImplTest.java | 6 +- .../impl/ClusterServiceLocatorTest.java | 6 +- .../impl/ClusterServicesBroadcasterTest.java| 3 +- .../impl/MulticastProtocolListenerTest.java | 2 +- .../impl/NodeProtocolSenderImplTest.java| 3 +- .../impl/SocketProtocolListenerTest.java| 3 +- 50 files changed, 318 insertions(+), 589 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/21209b23/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/event/Event.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/event/Event.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/event/Event.java index 6bc5d6c..aae93ef 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/event/Event.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/event/Event.java @@ -20,8 +20,7 @@ import java.util.Date; import org.apache.commons.lang3.StringUtils; /** - * Events describe the occurrence of something noteworthy. They record the - * event's source, a timestamp, a description, and a category. + * Events describe the occurrence of something noteworthy. They record the event's source, a timestamp, a description, and a category. * * @author unattributed * @@ -45,8 +44,7
[3/3] incubator-nifi git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/43b2f040 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/43b2f040 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/43b2f040 Branch: refs/heads/develop Commit: 43b2f040bcb181abc435e4f8f1c5da0591141254 Parents: 21209b2 384b2ac Author: joewitt joew...@apache.org Authored: Mon Apr 27 14:26:26 2015 -0400 Committer: joewitt joew...@apache.org Committed: Mon Apr 27 14:26:26 2015 -0400 -- .../nifi/provenance/IndexConfiguration.java | 12 +- .../PersistentProvenanceRepository.java | 612 +++--- .../provenance/RepositoryConfiguration.java | 106 +-- .../nifi/provenance/StandardRecordReader.java | 246 +++--- .../nifi/provenance/StandardRecordWriter.java | 138 ++-- .../provenance/expiration/ExpirationAction.java | 6 +- .../provenance/lucene/DeleteIndexAction.java| 12 +- .../nifi/provenance/lucene/DocsReader.java | 79 +- .../nifi/provenance/lucene/IndexManager.java| 820 +-- .../nifi/provenance/lucene/IndexSearch.java | 38 +- .../nifi/provenance/lucene/IndexingAction.java | 119 +-- .../nifi/provenance/lucene/LineageQuery.java| 6 +- .../nifi/provenance/lucene/LuceneUtil.java | 38 +- .../provenance/rollover/CompressionAction.java | 59 -- .../provenance/rollover/RolloverAction.java | 35 - .../provenance/serialization/RecordReader.java | 57 +- .../provenance/serialization/RecordReaders.java | 136 +-- .../provenance/serialization/RecordWriter.java | 23 +- .../provenance/serialization/RecordWriters.java | 8 +- .../nifi/provenance/toc/StandardTocReader.java | 44 +- .../nifi/provenance/toc/StandardTocWriter.java | 35 +- .../apache/nifi/provenance/toc/TocReader.java | 20 +- .../org/apache/nifi/provenance/toc/TocUtil.java | 27 +- .../apache/nifi/provenance/toc/TocWriter.java | 16 +- .../TestPersistentProvenanceRepository.java | 118 +-- .../TestStandardRecordReaderWriter.java | 162 ++-- .../org/apache/nifi/provenance/TestUtil.java| 2 +- .../provenance/toc/TestStandardTocReader.java | 20 +- .../provenance/toc/TestStandardTocWriter.java | 4 +- 29 files changed, 1391 insertions(+), 1607 deletions(-) --
[2/3] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e811929f/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileFlowFileRepository.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileFlowFileRepository.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileFlowFileRepository.java index 9e429d6..fe34fe0 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileFlowFileRepository.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileFlowFileRepository.java @@ -26,9 +26,7 @@ import org.apache.nifi.controller.repository.claim.ContentClaimManager; /** * p - * An in-memory implementation of the {@link FlowFileRepository}. Upon restart, - * all FlowFiles will be discarded, including those that have been swapped out - * by a {@link FlowFileSwapManager}. + * An in-memory implementation of the {@link FlowFileRepository}. Upon restart, all FlowFiles will be discarded, including those that have been swapped out by a {@link FlowFileSwapManager}. * /p */ public class VolatileFlowFileRepository implements FlowFileRepository { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e811929f/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java index 0779c4d..f2df821 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java @@ -62,21 +62,12 @@ import org.wali.WriteAheadRepository; * /p * * p - * We expose a property named codenifi.flowfile.repository.always.sync/code - * that is a boolean value indicating whether or not to force WALI to sync with - * disk on each update. By default, the value is codefalse/code. This is - * needed only in situations in which power loss is expected and not mitigated - * by Uninterruptable Power Sources (UPS) or when running in an unstable Virtual - * Machine for instance. Otherwise, we will flush the data that is written to - * the Operating System and the Operating System will be responsible to flush - * its buffers when appropriate. The Operating System can be configured to hold - * only a certain buffer size or not to buffer at all, as well. When using a - * UPS, this is generally not an issue, as the machine is typically notified - * before dying, in which case the Operating System will flush the data to disk. - * Additionally, most disks on enterprise servers also have battery backups that - * can power the disks long enough to flush their buffers. For this reason, we - * choose instead to not sync to disk for every write but instead sync only when - * we checkpoint. + * We expose a property named codenifi.flowfile.repository.always.sync/code that is a boolean value indicating whether or not to force WALI to sync with disk on each update. By default, the value + * is codefalse/code. This is needed only in situations in which power loss is expected and not mitigated by Uninterruptable Power Sources (UPS) or when running in an unstable Virtual Machine for + * instance. Otherwise, we will flush the data that is written to the Operating System and the Operating System will be responsible to flush its buffers when appropriate. The Operating System can be + * configured to hold only a certain buffer size or not to buffer at all, as well. When using a UPS, this is generally not an issue, as the machine is typically notified before dying, in which case + * the Operating System will flush the data to disk. Additionally, most disks on enterprise servers also have battery backups that can power the disks long enough to flush their buffers. For this + * reason, we choose instead to not sync to disk for every write but instead sync only when we checkpoint. * /p */ public class
[3/3] incubator-nifi git commit: NIFI-271
NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e811929f Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e811929f Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e811929f Branch: refs/heads/develop Commit: e811929f5913586b38f5f95d321623da2f07b64a Parents: 43b2f04 Author: joewitt joew...@apache.org Authored: Mon Apr 27 14:56:45 2015 -0400 Committer: joewitt joew...@apache.org Committed: Mon Apr 27 14:56:45 2015 -0400 -- .../apache/nifi/cluster/HeartbeatPayload.java | 3 +- .../org/apache/nifi/connectable/LocalPort.java | 5 +- .../nifi/connectable/StandardConnection.java| 10 +- .../nifi/controller/FileSystemSwapManager.java | 6 +- .../apache/nifi/controller/FlowController.java | 214 ++- .../controller/FlowSerializationException.java | 3 +- .../apache/nifi/controller/FlowSerializer.java | 3 +- .../FlowSynchronizationException.java | 3 +- .../nifi/controller/FlowSynchronizer.java | 25 +-- .../nifi/controller/FlowUnmarshaller.java | 4 +- .../controller/StandardFlowSynchronizer.java| 12 +- .../nifi/controller/StandardProcessorNode.java | 64 ++ .../apache/nifi/controller/TemplateManager.java | 19 +- .../controller/UninheritableFlowException.java | 3 +- .../repository/FileSystemRepository.java| 4 +- .../controller/repository/ProcessContext.java | 18 +- .../repository/ProvenanceEventEnricher.java | 3 +- .../repository/RepositoryPurgeException.java| 3 +- .../repository/StandardFlowFileRecord.java | 7 +- .../repository/StandardProcessSession.java | 34 +-- .../repository/StandardProvenanceReporter.java | 6 +- .../repository/StandardRepositoryRecord.java| 3 +- .../StandardRepositoryStatusReport.java | 12 +- .../repository/VolatileContentRepository.java | 30 +-- .../repository/VolatileFlowFileRepository.java | 4 +- .../WriteAheadFlowFileRepository.java | 25 +-- .../repository/claim/ContentDirection.java | 9 +- .../repository/claim/StandardContentClaim.java | 7 +- .../io/DisableOnCloseInputStream.java | 4 +- .../io/DisableOnCloseOutputStream.java | 4 +- .../io/FlowFileAccessInputStream.java | 11 +- .../io/FlowFileAccessOutputStream.java | 9 +- .../controller/repository/io/LongHolder.java| 6 +- .../scheduling/ConnectableProcessContext.java | 3 +- .../controller/scheduling/ScheduleState.java| 12 +- .../scheduling/StandardProcessScheduler.java| 18 +- .../StandardControllerServiceProvider.java | 6 +- .../status/history/StandardStatusSnapshot.java | 2 +- .../tasks/ContinuallyRunConnectableTask.java| 4 +- .../tasks/ContinuallyRunProcessorTask.java | 4 +- .../nifi/controller/tasks/ExpireFlowFiles.java | 4 +- .../apache/nifi/encrypt/StringEncryptor.java| 12 +- .../java/org/apache/nifi/engine/FlowEngine.java | 16 +- .../nifi/events/VolatileBulletinRepository.java | 5 +- .../nifi/fingerprint/FingerprintFactory.java| 17 +- .../nifi/groups/StandardProcessGroup.java | 13 +- .../org/apache/nifi/lifecycle/LifeCycle.java| 17 +- .../nifi/lifecycle/LifeCycleException.java | 3 +- .../nifi/lifecycle/LifeCycleStartException.java | 4 +- .../nifi/lifecycle/LifeCycleStopException.java | 3 +- .../nifi/persistence/FlowConfigurationDAO.java | 33 +-- .../nifi/processor/StandardProcessContext.java | 3 +- .../nifi/processor/StandardPropertyValue.java | 12 +- .../org/apache/nifi/remote/RemoteNiFiUtils.java | 11 +- .../nifi/remote/StandardRemoteProcessGroup.java | 49 ++--- .../org/apache/nifi/services/FlowService.java | 55 ++--- .../nifi/spring/FlowControllerFactoryBean.java | 4 +- .../spring/StandardFlowServiceFactoryBean.java | 4 +- .../apache/nifi/util/ComponentStatusReport.java | 4 +- .../org/apache/nifi/util/ReflectionUtils.java | 71 ++ .../java/org/apache/nifi/util/SnippetUtils.java | 6 +- 61 files changed, 305 insertions(+), 663 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e811929f/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/cluster/HeartbeatPayload.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/cluster/HeartbeatPayload.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/cluster/HeartbeatPayload.java index 093b238..668c5e0 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework
[1/3] incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop 43b2f040b - e811929f5 http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e811929f/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/util/ReflectionUtils.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/util/ReflectionUtils.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/util/ReflectionUtils.java index d7573c3..5140e31 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/util/ReflectionUtils.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/util/ReflectionUtils.java @@ -31,12 +31,9 @@ public class ReflectionUtils { private final static Logger LOG = LoggerFactory.getLogger(ReflectionUtils.class); /** - * Invokes all methods on the given instance that have been annotated with - * the given Annotation. If the signature of the method that is defined in - * codeinstance/code uses 1 or more parameters, those parameters must be - * specified by the codeargs/code parameter. However, if more arguments - * are supplied by the codeargs/code parameter than needed, the extra - * arguments will be ignored. + * Invokes all methods on the given instance that have been annotated with the given Annotation. If the signature of the method that is defined in codeinstance/code uses 1 or more parameters, + * those parameters must be specified by the codeargs/code parameter. However, if more arguments are supplied by the codeargs/code parameter than needed, the extra arguments will be + * ignored. * * @param annotation annotation * @param instance instance @@ -51,14 +48,9 @@ public class ReflectionUtils { } /** - * Invokes all methods on the given instance that have been annotated with - * the given preferredAnnotation and if no such method exists will invoke - * all methods on the given instance that have been annotated with the given - * alternateAnnotation, if any exists. If the signature of the method that - * is defined in codeinstance/code uses 1 or more parameters, those - * parameters must be specified by the codeargs/code parameter. However, - * if more arguments are supplied by the codeargs/code parameter than - * needed, the extra arguments will be ignored. + * Invokes all methods on the given instance that have been annotated with the given preferredAnnotation and if no such method exists will invoke all methods on the given instance that have been + * annotated with the given alternateAnnotation, if any exists. If the signature of the method that is defined in codeinstance/code uses 1 or more parameters, those parameters must be + * specified by the codeargs/code parameter. However, if more arguments are supplied by the codeargs/code parameter than needed, the extra arguments will be ignored. * * @param preferredAnnotation preferred * @param alternateAnnotation alternate @@ -134,67 +126,48 @@ public class ReflectionUtils { } /** - * Invokes all methods on the given instance that have been annotated with - * the given Annotation. If the signature of the method that is defined in - * codeinstance/code uses 1 or more parameters, those parameters must be - * specified by the codeargs/code parameter. However, if more arguments - * are supplied by the codeargs/code parameter than needed, the extra - * arguments will be ignored. + * Invokes all methods on the given instance that have been annotated with the given Annotation. If the signature of the method that is defined in codeinstance/code uses 1 or more parameters, + * those parameters must be specified by the codeargs/code parameter. However, if more arguments are supplied by the codeargs/code parameter than needed, the extra arguments will be + * ignored. * * @param annotation annotation * @param instance instance * @param args args - * @return codetrue/code if all appropriate methods were invoked and - * returned without throwing an Exception, codefalse/code if one of the - * methods threw an Exception or could not be invoked; if codefalse/code - * is returned, an error will have been logged. + * @return codetrue/code if all appropriate methods were invoked and returned without throwing an Exception, codefalse/code if one of the methods threw an Exception or could not be + * invoked; if codefalse/code is returned, an error will have been logged. */ public static boolean quietlyInvokeMethodsWithAnnotation(final Class?
incubator-nifi git commit: NIFI-271 findbugs is now available by activating the findbugs profile. Not making required because we need to work down a lot of warnings
Repository: incubator-nifi Updated Branches: refs/heads/develop e62748273 - 6c3256e00 NIFI-271 findbugs is now available by activating the findbugs profile. Not making required because we need to work down a lot of warnings Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/6c3256e0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/6c3256e0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/6c3256e0 Branch: refs/heads/develop Commit: 6c3256e00a2c10f6968aef65cfec90557f8cfab2 Parents: e627482 Author: joewitt joew...@apache.org Authored: Tue Apr 28 01:37:38 2015 -0400 Committer: joewitt joew...@apache.org Committed: Tue Apr 28 01:37:38 2015 -0400 -- nifi-nar-maven-plugin/pom.xml | 7 +++ nifi-parent/pom.xml | 34 -- 2 files changed, 39 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/6c3256e0/nifi-nar-maven-plugin/pom.xml -- diff --git a/nifi-nar-maven-plugin/pom.xml b/nifi-nar-maven-plugin/pom.xml index 46dd333..765cbdf 100644 --- a/nifi-nar-maven-plugin/pom.xml +++ b/nifi-nar-maven-plugin/pom.xml @@ -66,6 +66,13 @@ /execution /executions /plugin +plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-checkstyle-plugin/artifactId +configuration +excludes**/HelpMojo.java/excludes +/configuration +/plugin /plugins /build dependencies http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/6c3256e0/nifi-parent/pom.xml -- diff --git a/nifi-parent/pom.xml b/nifi-parent/pom.xml index dbc31df..6fcf364 100644 --- a/nifi-parent/pom.xml +++ b/nifi-parent/pom.xml @@ -205,7 +205,18 @@ version6.5/version /dependency /dependencies -/plugin +/plugin +plugin +groupIdorg.codehaus.mojo/groupId +artifactIdfindbugs-maven-plugin/artifactId +version3.0.1/version +configuration +xmlOutputtrue/xmlOutput +effortMax/effort +failOnErrortrue/failOnError +maxRank14/maxRank +/configuration +/plugin /plugins /pluginManagement plugins @@ -335,7 +346,6 @@ /checkstyleRules violationSeveritywarning/violationSeverity includeTestSourceDirectorytrue/includeTestSourceDirectory -excludes**/HelpMojo.java,**/generated-sources/excludes /configuration /plugin plugin @@ -387,5 +397,25 @@ /plugins /build /profile +profile +!-- Run findbugs. Activate with -Pfindbugs -- +idfindbugs/id +build +plugins +plugin +groupIdorg.codehaus.mojo/groupId +artifactIdfindbugs-maven-plugin/artifactId +executions +execution +idrun-findbugs/id +goals +goalcheck/goal +/goals +/execution +/executions +/plugin +/plugins +/build +/profile /profiles /project
incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop 953d9e59a - c14b2cebf NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/c14b2ceb Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/c14b2ceb Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/c14b2ceb Branch: refs/heads/develop Commit: c14b2cebf8e28d898c39acd661e5923f81c1e5e9 Parents: 953d9e5 Author: joewitt joew...@apache.org Authored: Sat Apr 25 08:27:24 2015 -0400 Committer: joewitt joew...@apache.org Committed: Sat Apr 25 08:27:24 2015 -0400 -- .../nifi-yandex-processors/pom.xml | 4 +- .../nifi/processors/yandex/YandexTranslate.java | 381 +-- .../processors/yandex/model/Translation.java| 55 +-- .../nifi/processors/yandex/util/Languages.java | 124 +++--- .../processors/yandex/TestYandexTranslate.java | 317 --- .../nifi-language-translation-bundle/pom.xml| 28 +- 6 files changed, 453 insertions(+), 456 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c14b2ceb/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/pom.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/pom.xml b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/pom.xml index a5f9f0e..03776ca 100644 --- a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/pom.xml @@ -36,8 +36,8 @@ /dependency dependency - groupIdcom.sun.jersey/groupId - artifactIdjersey-client/artifactId +groupIdcom.sun.jersey/groupId +artifactIdjersey-client/artifactId /dependency dependency groupIdcom.sun.jersey/groupId http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c14b2ceb/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/YandexTranslate.java -- diff --git a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/YandexTranslate.java b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/YandexTranslate.java index bd83a8a..8398152 100644 --- a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/YandexTranslate.java +++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/YandexTranslate.java @@ -73,76 +73,76 @@ import com.sun.jersey.core.util.MultivaluedMapImpl; @Tags({yandex, translate, translation, language}) @CapabilityDescription(Translates content and attributes from one language to another) @WritesAttributes({ - @WritesAttribute(attribute=yandex.translate.failure.reason, description=If the text cannot be translated, this attribute will be set indicating the reason for the failure), - @WritesAttribute(attribute=language, description=When the translation succeeds, if the content was translated, this attribute will be set indicating the new language of the content) +@WritesAttribute(attribute = yandex.translate.failure.reason, description = If the text cannot be translated, this attribute will be set indicating the reason for the failure), +@WritesAttribute(attribute = language, description = When the translation succeeds, if the content was translated, this attribute will be set indicating the new language of the content) }) -@DynamicProperty(name=The name of an attribute to set that will contain the translated text of the value, - value=The value to translate, - supportsExpressionLanguage=true, - description=User-defined properties are used to translate arbitrary text based on attributes.) +@DynamicProperty(name = The name of an attribute to set that will contain the translated text of the value, +value = The value to translate, +supportsExpressionLanguage = true, +description = User-defined properties are used to translate arbitrary text based on attributes.) public class YandexTranslate extends AbstractProcessor { - + public static final PropertyDescriptor KEY = new PropertyDescriptor.Builder() - .name(Yandex API Key) -.description(The API Key that is registered with Yandex) -.addValidator
incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop 90ae022e5 - 269e25e99 NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/269e25e9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/269e25e9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/269e25e9 Branch: refs/heads/develop Commit: 269e25e9934ca54277f016bdb5a1589bbe021a76 Parents: 90ae022 Author: joewitt joew...@apache.org Authored: Sat Apr 25 08:52:47 2015 -0400 Committer: joewitt joew...@apache.org Committed: Sat Apr 25 08:52:47 2015 -0400 -- .../nifi-twitter-processors/pom.xml | 10 +- .../nifi/processors/twitter/GetTwitter.java | 450 ++- 2 files changed, 232 insertions(+), 228 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/269e25e9/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/pom.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/pom.xml b/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/pom.xml index 45af0ce..4768dbc 100644 --- a/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/pom.xml @@ -35,11 +35,11 @@ artifactIdnifi-processor-utils/artifactId /dependency - dependency - groupIdcom.twitter/groupId - artifactIdhbc-twitter4j/artifactId - version2.2.0/version - /dependency +dependency +groupIdcom.twitter/groupId +artifactIdhbc-twitter4j/artifactId +version2.2.0/version +/dependency dependency groupIdorg.apache.nifi/groupId http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/269e25e9/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/java/org/apache/nifi/processors/twitter/GetTwitter.java -- diff --git a/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/java/org/apache/nifi/processors/twitter/GetTwitter.java b/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/java/org/apache/nifi/processors/twitter/GetTwitter.java index 45b1ae1..a056867 100644 --- a/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/java/org/apache/nifi/processors/twitter/GetTwitter.java +++ b/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/java/org/apache/nifi/processors/twitter/GetTwitter.java @@ -69,82 +69,84 @@ import com.twitter.hbc.httpclient.auth.OAuth1; @SupportsBatching @Tags({twitter, tweets, social media, status, json}) @CapabilityDescription(Pulls status changes from Twitter's streaming API) -@WritesAttribute(attribute=mime.type, description=Sets mime type to application/json) +@WritesAttribute(attribute = mime.type, description = Sets mime type to application/json) public class GetTwitter extends AbstractProcessor { - static final AllowableValue ENDPOINT_SAMPLE = new AllowableValue(Sample Endpoint, Sample Endpoint, The endpoint that provides public data, aka a 'garden hose'); - static final AllowableValue ENDPOINT_FIREHOSE = new AllowableValue(Firehose Endpoint, Firehose Endpoint, The endpoint that provides access to all tweets); - static final AllowableValue ENDPOINT_FILTER = new AllowableValue(Filter Endpoint, Filter Endpoint, Endpoint that allows the stream to be filtered by specific terms or User IDs); - - public static final PropertyDescriptor ENDPOINT = new PropertyDescriptor.Builder() - .name(Twitter Endpoint) - .description(Specifies which endpoint data should be pulled from) - .required(true) - .allowableValues(ENDPOINT_SAMPLE, ENDPOINT_FIREHOSE, ENDPOINT_FILTER) - .defaultValue(ENDPOINT_SAMPLE.getValue()) - .build(); +static final AllowableValue ENDPOINT_SAMPLE = new AllowableValue(Sample Endpoint, Sample Endpoint, The endpoint that provides public data, aka a 'garden hose'); +static final AllowableValue ENDPOINT_FIREHOSE = new AllowableValue(Firehose Endpoint, Firehose Endpoint, The endpoint that provides access to all tweets); +static final AllowableValue ENDPOINT_FILTER = new AllowableValue(Filter Endpoint, Filter Endpoint, Endpoint that allows the stream to be filtered by specific terms or User IDs); + +public static final PropertyDescriptor ENDPOINT = new
incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop 5a559e455 - 90ae022e5 NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/90ae022e Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/90ae022e Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/90ae022e Branch: refs/heads/develop Commit: 90ae022e54f23537c7d619ae404c467371e2a0d4 Parents: 5a559e4 Author: joewitt joew...@apache.org Authored: Sat Apr 25 08:43:19 2015 -0400 Committer: joewitt joew...@apache.org Committed: Sat Apr 25 08:43:19 2015 -0400 -- .../org/apache/nifi/processors/GeoEnrichIP.java | 38 - .../nifi/processors/maxmind/DatabaseReader.java | 44 ++-- 2 files changed, 42 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/90ae022e/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java -- diff --git a/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java index 03f40cf..be03243 100644 --- a/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java +++ b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java @@ -60,20 +60,20 @@ import com.maxmind.geoip2.record.Subdivision; @SupportsBatching @Tags({geo, enrich, ip, maxmind}) @CapabilityDescription(Looks up geolocation information for an IP address and adds the geo information to FlowFile attributes. The - + geo data is provided as a MaxMind database. The attribute that contains the IP address to lookup is provided by the - + 'IP Address Attribute' property. If the name of the attribute provided is 'X', then the the attributes added by enrichment - + will take the form X.geo.fieldName) ++ geo data is provided as a MaxMind database. The attribute that contains the IP address to lookup is provided by the ++ 'IP Address Attribute' property. If the name of the attribute provided is 'X', then the the attributes added by enrichment ++ will take the form X.geo.fieldName) @WritesAttributes({ - @WritesAttribute(attribute=X.geo.lookup.micros, description=The number of microseconds that the geo lookup took), - @WritesAttribute(attribute=X.geo.city, description=The city identified for the IP address), - @WritesAttribute(attribute=X.geo.latitude, description=The latitude identified for this IP address), - @WritesAttribute(attribute=X.geo.longitude, description=The longitude identified for this IP address), - @WritesAttribute(attribute=X.geo.subdivision.N, description=Each subdivision that is identified for this IP address is added with a one-up number appended to the attribute name, starting with 0), - @WritesAttribute(attribute=X.geo.subdivision.isocode.N, description=The ISO code for the subdivision that is identified by X.geo.subdivision.N), - @WritesAttribute(attribute=X.geo.country, description=The country identified for this IP address), - @WritesAttribute(attribute=X.geo.country.isocode, description=The ISO Code for the country identified), - @WritesAttribute(attribute=X.geo.postalcode, description=The postal code for the country identified), -}) +@WritesAttribute(attribute = X.geo.lookup.micros, description = The number of microseconds that the geo lookup took), +@WritesAttribute(attribute = X.geo.city, description = The city identified for the IP address), +@WritesAttribute(attribute = X.geo.latitude, description = The latitude identified for this IP address), +@WritesAttribute(attribute = X.geo.longitude, description = The longitude identified for this IP address), +@WritesAttribute(attribute = X.geo.subdivision.N, +description = Each subdivision that is identified for this IP address is added with a one-up number appended to the attribute name, starting with 0), +@WritesAttribute(attribute = X.geo.subdivision.isocode.N, description = The ISO code for the subdivision that is identified by X.geo.subdivision.N), +@WritesAttribute(attribute = X.geo.country, description = The country identified for this IP address), +@WritesAttribute(attribute = X.geo.country.isocode, description = The ISO Code for the country identified), +@WritesAttribute(attribute = X.geo.postalcode, description = The postal code for the country identified
incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop e93c82919 - b2a1f5217 NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/b2a1f521 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/b2a1f521 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/b2a1f521 Branch: refs/heads/develop Commit: b2a1f5217dd89e8133887d691e56483e9f0e4214 Parents: e93c829 Author: joewitt joew...@apache.org Authored: Sat Apr 25 09:15:36 2015 -0400 Committer: joewitt joew...@apache.org Committed: Sat Apr 25 09:15:36 2015 -0400 -- .../processors/kite/AbstractKiteProcessor.java | 10 +- .../apache/nifi/processors/kite/AvroUtil.java | 18 +- .../nifi/processors/kite/ConvertCSVToAvro.java | 348 +-- .../nifi/processors/kite/ConvertJSONToAvro.java | 2 +- .../processors/kite/StoreInKiteDataset.java | 208 +-- .../processors/kite/TestCSVToAvroProcessor.java | 181 +- .../kite/TestConfigurationProperty.java | 65 ++-- .../nifi/processors/kite/TestGetSchema.java | 117 --- .../kite/TestJSONToAvroProcessor.java | 58 ++-- .../kite/TestKiteProcessorsCluster.java | 125 --- .../kite/TestKiteStorageProcessor.java | 225 ++-- .../apache/nifi/processors/kite/TestUtil.java | 114 +++--- 12 files changed, 732 insertions(+), 739 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b2a1f521/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AbstractKiteProcessor.java -- diff --git a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AbstractKiteProcessor.java b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AbstractKiteProcessor.java index 56418f4..fec8239 100644 --- a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AbstractKiteProcessor.java +++ b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AbstractKiteProcessor.java @@ -81,7 +81,7 @@ abstract class AbstractKiteProcessor extends AbstractProcessor { public ValidationResult validate(String subject, String uri, ValidationContext context) { String message = not set; boolean isValid = true; - + if (uri.trim().isEmpty()) { isValid = false; } else { @@ -95,7 +95,7 @@ abstract class AbstractKiteProcessor extends AbstractProcessor { } } } - + return new ValidationResult.Builder() .subject(subject) .input(uri) @@ -163,14 +163,14 @@ abstract class AbstractKiteProcessor extends AbstractProcessor { public ValidationResult validate(String subject, String uri, ValidationContext context) { Configuration conf = getConfiguration(context.getProperty(CONF_XML_FILES).getValue()); String error = null; - + final boolean elPresent = context.isExpressionLanguageSupported(subject) context.isExpressionLanguagePresent(uri); if (!elPresent) { try { getSchema(uri, conf); - } catch (SchemaNotFoundException e) { +} catch (SchemaNotFoundException e) { error = e.getMessage(); - } +} } return new ValidationResult.Builder() .subject(subject) http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b2a1f521/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AvroUtil.java -- diff --git a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AvroUtil.java b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AvroUtil.java index 9ff0f73..53075c7 100644 --- a/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AvroUtil.java +++ b/nifi/nifi-nar-bundles/nifi-kite-bundle/nifi-kite-processors/src/main/java/org/apache/nifi/processors/kite/AvroUtil.java @@ -16,7 +16,6 @@ * specific language governing permissions and limitations * under the License. */ - package org.apache.nifi.processors.kite; import org.apache.avro.Schema; @@ -24,17 +23,16
incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop 269e25e99 - e93c82919 NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e93c8291 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e93c8291 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e93c8291 Branch: refs/heads/develop Commit: e93c82919135badd3ed1f5759c61f30c4883eb58 Parents: 269e25e Author: joewitt joew...@apache.org Authored: Sat Apr 25 09:13:45 2015 -0400 Committer: joewitt joew...@apache.org Committed: Sat Apr 25 09:13:45 2015 -0400 -- .../main/java/org/apache/nifi/processors/aws/sns/PutSNS.java| 5 +++-- .../main/java/org/apache/nifi/processors/aws/sqs/GetSQS.java| 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e93c8291/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sns/PutSNS.java -- diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sns/PutSNS.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sns/PutSNS.java index b1a604f..7d42703 100644 --- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sns/PutSNS.java +++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sns/PutSNS.java @@ -55,7 +55,9 @@ public class PutSNS extends AbstractSNSProcessor { .build(); public static final PropertyDescriptor USE_JSON_STRUCTURE = new PropertyDescriptor.Builder() .name(Use JSON Structure) -.description(If true, the contents of the FlowFile must be JSON with a top-level element named 'default'. Additional elements can be used to send different messages to different protocols. See the Amazon SNS Documentation for more information.) +.description(If true, the contents of the FlowFile must be JSON with a top-level element named 'default'. ++ Additional elements can be used to send different messages to different protocols. See the Amazon ++ SNS Documentation for more information.) .defaultValue(false) .allowableValues(true, false) .required(true) @@ -147,7 +149,6 @@ public class PutSNS extends AbstractSNSProcessor { } catch (final Exception e) { getLogger().error(Failed to publish Amazon SNS message for {} due to {}, new Object[]{flowFile, e}); session.transfer(flowFile, REL_FAILURE); -return; } } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e93c8291/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/GetSQS.java -- diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/GetSQS.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/GetSQS.java index 929a437..7c2dd2d 100644 --- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/GetSQS.java +++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/GetSQS.java @@ -195,7 +195,8 @@ public class GetSQS extends AbstractSQSProcessor { try { client.deleteMessageBatch(deleteRequest); } catch (final Exception e) { -getLogger().error(Received {} messages from Amazon SQS but failed to delete the messages; these messages may be duplicated. Reason for deletion failure: {}, new Object[]{messages.size(), e}); +getLogger().error(Received {} messages from Amazon SQS but failed to delete the messages; these messages ++ may be duplicated. Reason for deletion failure: {}, new Object[]{messages.size(), e}); } }
incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop 8f2502c4e - 87e829682 NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/87e82968 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/87e82968 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/87e82968 Branch: refs/heads/develop Commit: 87e829682fc5a62a2b56e83c98a8be114de9efdb Parents: 8f2502c Author: joewitt joew...@apache.org Authored: Sat Apr 25 09:37:02 2015 -0400 Committer: joewitt joew...@apache.org Committed: Sat Apr 25 09:37:02 2015 -0400 -- .../processors/attributes/UpdateAttribute.java | 59 ++-- .../update/attributes/api/RuleResource.java | 10 ++-- 2 files changed, 22 insertions(+), 47 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/87e82968/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/src/main/java/org/apache/nifi/processors/attributes/UpdateAttribute.java -- diff --git a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/src/main/java/org/apache/nifi/processors/attributes/UpdateAttribute.java b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/src/main/java/org/apache/nifi/processors/attributes/UpdateAttribute.java index b7471dd..c52eba5 100644 --- a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/src/main/java/org/apache/nifi/processors/attributes/UpdateAttribute.java +++ b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/src/main/java/org/apache/nifi/processors/attributes/UpdateAttribute.java @@ -114,8 +114,8 @@ import org.apache.nifi.annotation.behavior.WritesAttribute; @SideEffectFree @Tags({attributes, modification, update, Attribute Expression Language}) @CapabilityDescription(Updates the Attributes for a FlowFile by using the Attribute Expression Language) -@DynamicProperty(name=A FlowFile attribute to update, value=The value to set it to, supportsExpressionLanguage=true, description=Updates a + -FlowFile attribute specified by the Dynamic Property's key with the value specified by the Dynamic Property's value) +@DynamicProperty(name = A FlowFile attribute to update, value = The value to set it to, supportsExpressionLanguage = true, +description = Updates a FlowFile attribute specified by the Dynamic Property's key with the value specified by the Dynamic Property's value) @WritesAttribute(attribute = See additional details, description = This processor may write zero or more attributes as described in additional details) public class UpdateAttribute extends AbstractProcessor implements Searchable { @@ -190,7 +190,8 @@ public class UpdateAttribute extends AbstractProcessor implements Searchable { reasons.add(new ValidationResult.Builder().valid(false).explanation(String.format(No expression for a condition in rule '%s' was found., rule.getName())).build()); } else { final String expression = condition.getExpression().trim(); - reasons.add(StandardValidators.createAttributeExpressionLanguageValidator(AttributeExpression.ResultType.BOOLEAN, false).validate(String.format(Condition for rule '%s'., rule.getName()), expression, context)); + reasons.add(StandardValidators.createAttributeExpressionLanguageValidator(AttributeExpression.ResultType.BOOLEAN, false) +.validate(String.format(Condition for rule '%s'., rule.getName()), expression, context)); } } } @@ -204,9 +205,11 @@ public class UpdateAttribute extends AbstractProcessor implements Searchable { if (action.getAttribute() == null) { reasons.add(new ValidationResult.Builder().valid(false).explanation(String.format(An action in rule '%s' is missing the attribute name., rule.getName())).build()); } else if (action.getValue() == null) { -reasons.add(new ValidationResult.Builder().valid(false).explanation(String.format(No value for attribute '%s' in rule '%s' was found., action.getAttribute(), rule.getName())).build()); +reasons.add(new ValidationResult.Builder().valid(false) +.explanation(String.format(No value for attribute '%s' in rule '%s' was found., action.getAttribute(), rule.getName())).build
incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop c14b2cebf - 5a559e455 NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/5a559e45 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/5a559e45 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/5a559e45 Branch: refs/heads/develop Commit: 5a559e455761666fc3e1680a3dad934b58d687f2 Parents: c14b2ce Author: joewitt joew...@apache.org Authored: Sat Apr 25 08:38:28 2015 -0400 Committer: joewitt joew...@apache.org Committed: Sat Apr 25 08:38:28 2015 -0400 -- .../nifi-hl7-bundle/nifi-hl7-processors/pom.xml | 114 +++--- .../processors/hl7/ExtractHL7Attributes.java| 365 +-- .../apache/nifi/processors/hl7/RouteHL7.java| 300 +++ .../hl7/TestExtractHL7Attributes.java | 30 +- 4 files changed, 405 insertions(+), 404 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/5a559e45/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/pom.xml -- diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/pom.xml b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/pom.xml index 5f29cd8..f266835 100644 --- a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/pom.xml @@ -25,19 +25,19 @@ artifactIdnifi-hl7-processors/artifactId packagingjar/packaging - build - plugins - plugin - groupIdorg.apache.rat/groupId - artifactIdapache-rat-plugin/artifactId - configuration - excludes - excludesrc/test/resources/hypoglycemia.hl7/exclude - /excludes - /configuration - /plugin - /plugins - /build +build +plugins +plugin +groupIdorg.apache.rat/groupId +artifactIdapache-rat-plugin/artifactId +configuration +excludes +excludesrc/test/resources/hypoglycemia.hl7/exclude +/excludes +/configuration +/plugin +/plugins +/build dependencies dependency @@ -50,56 +50,56 @@ /dependency dependency - groupIdorg.apache.nifi/groupId - artifactIdnifi-hl7-query-language/artifactId - version0.1.0-incubating-SNAPSHOT/version +groupIdorg.apache.nifi/groupId +artifactIdnifi-hl7-query-language/artifactId +version0.1.0-incubating-SNAPSHOT/version /dependency - dependency - groupIdca.uhn.hapi/groupId - artifactIdhapi-base/artifactId - version2.2/version - /dependency dependency - groupIdca.uhn.hapi/groupId - artifactIdhapi-structures-v21/artifactId - version2.2/version - /dependency - dependency - groupIdca.uhn.hapi/groupId - artifactIdhapi-structures-v22/artifactId - version2.2/version - /dependency +groupIdca.uhn.hapi/groupId +artifactIdhapi-base/artifactId +version2.2/version +/dependency +dependency +groupIdca.uhn.hapi/groupId +artifactIdhapi-structures-v21/artifactId +version2.2/version +/dependency +dependency +groupIdca.uhn.hapi/groupId +artifactIdhapi-structures-v22/artifactId +version2.2/version +/dependency +dependency +groupIdca.uhn.hapi/groupId +artifactIdhapi-structures-v23/artifactId +version2.2/version +/dependency +dependency +groupIdca.uhn.hapi/groupId +artifactIdhapi-structures-v231/artifactId +version2.2/version +/dependency dependency - groupIdca.uhn.hapi/groupId - artifactIdhapi-structures-v23/artifactId - version2.2/version - /dependency - dependency - groupIdca.uhn.hapi/groupId - artifactIdhapi-structures-v231/artifactId - version2.2/version - /dependency +groupIdca.uhn.hapi/groupId
incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop b2a1f5217 - 8f2502c4e NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8f2502c4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8f2502c4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8f2502c4 Branch: refs/heads/develop Commit: 8f2502c4e476ba3ce00943d9d9f777b0637c1114 Parents: b2a1f52 Author: joewitt joew...@apache.org Authored: Sat Apr 25 09:20:35 2015 -0400 Committer: joewitt joew...@apache.org Committed: Sat Apr 25 09:20:35 2015 -0400 -- .../apache/nifi/processors/kafka/GetKafka.java | 438 ++- .../apache/nifi/processors/kafka/PutKafka.java | 285 ++-- .../additionalDetails.html | 28 +- .../additionalDetails.html | 30 +- .../nifi/processors/kafka/TestGetKafka.java | 58 ++- .../nifi/processors/kafka/TestPutKafka.java | 189 nifi/nifi-nar-bundles/nifi-kafka-bundle/pom.xml | 14 +- 7 files changed, 525 insertions(+), 517 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8f2502c4/nifi/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/GetKafka.java -- diff --git a/nifi/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/GetKafka.java b/nifi/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/GetKafka.java index 63a816e..1b63a46 100644 --- a/nifi/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/GetKafka.java +++ b/nifi/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/GetKafka.java @@ -61,97 +61,101 @@ import org.apache.nifi.processor.util.StandardValidators; @SupportsBatching @CapabilityDescription(Fetches messages from Apache Kafka) @Tags({Kafka, Apache, Get, Ingest, Ingress, Topic, PubSub}) -@WritesAttributes({ @WritesAttribute(attribute = kafka.topic, description = The name of the Kafka Topic from which the message was received), -@WritesAttribute(attribute = kafka.key, description = The key of the Kafka message, if it exists and batch size is 1. If the message does not have a key, or if the batch size is greater than 1, this attribute will not be added), -@WritesAttribute(attribute = kafka.partition, description = The partition of the Kafka Topic from which the message was received. This attribute is added only if the batch size is 1), -@WritesAttribute(attribute = kafka.offset, description = The offset of the message within the Kafka partition. This attribute is added only if the batch size is 1) }) +@WritesAttributes({ +@WritesAttribute(attribute = kafka.topic, description = The name of the Kafka Topic from which the message was received), +@WritesAttribute(attribute = kafka.key, description = The key of the Kafka message, if it exists and batch size is 1. If ++ the message does not have a key, or if the batch size is greater than 1, this attribute will not be added), +@WritesAttribute(attribute = kafka.partition, description = The partition of the Kafka Topic from which the message was received. This attribute is added only if the batch size is 1), +@WritesAttribute(attribute = kafka.offset, description = The offset of the message within the Kafka partition. This attribute is added only if the batch size is 1)}) public class GetKafka extends AbstractProcessor { + public static final PropertyDescriptor ZOOKEEPER_CONNECTION_STRING = new PropertyDescriptor.Builder() -.name(ZooKeeper Connection String) -.description(The Connection String to use in order to connect to ZooKeeper. This is often a comma-separated list of host:port combinations. For example, host1:2181,host2:2181,host3:2188) -.required(true) -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) -.expressionLanguageSupported(false) -.build(); +.name(ZooKeeper Connection String) +.description(The Connection String to use in order to connect to ZooKeeper. This is often a comma-separated list of host:port ++ combinations. For example, host1:2181,host2:2181,host3:2188) +.required(true) +.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) +.expressionLanguageSupported(false) +.build(); public static final PropertyDescriptor TOPIC = new PropertyDescriptor.Builder() -.name(Topic Name) -.description(The Kafka Topic to pull
incubator-nifi git commit: NIFI-271
Repository: incubator-nifi Updated Branches: refs/heads/develop dca93a507 - d68f71b12 NIFI-271 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/d68f71b1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/d68f71b1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/d68f71b1 Branch: refs/heads/develop Commit: d68f71b126c58112070d81f14e804497f9649e5b Parents: dca93a5 Author: joewitt joew...@apache.org Authored: Fri Apr 24 16:44:04 2015 -0400 Committer: joewitt joew...@apache.org Committed: Fri Apr 24 16:44:04 2015 -0400 -- nifi/nifi-external/nifi-spark-receiver/pom.xml | 22 +- .../org/apache/nifi/spark/NiFiDataPacket.java | 23 +- .../org/apache/nifi/spark/NiFiReceiver.java | 236 ++- 3 files changed, 145 insertions(+), 136 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d68f71b1/nifi/nifi-external/nifi-spark-receiver/pom.xml -- diff --git a/nifi/nifi-external/nifi-spark-receiver/pom.xml b/nifi/nifi-external/nifi-spark-receiver/pom.xml index 5c93f6b..a6d9378 100644 --- a/nifi/nifi-external/nifi-spark-receiver/pom.xml +++ b/nifi/nifi-external/nifi-spark-receiver/pom.xml @@ -23,15 +23,15 @@ groupIdorg.apache.nifi/groupId artifactIdnifi-spark-receiver/artifactId - dependencies - dependency - groupIdorg.apache.spark/groupId - artifactIdspark-streaming_2.10/artifactId - version1.2.0/version - /dependency - dependency - groupIdorg.apache.nifi/groupId - artifactIdnifi-site-to-site-client/artifactId - /dependency - /dependencies +dependencies +dependency +groupIdorg.apache.spark/groupId +artifactIdspark-streaming_2.10/artifactId +version1.2.0/version +/dependency +dependency +groupIdorg.apache.nifi/groupId +artifactIdnifi-site-to-site-client/artifactId +/dependency +/dependencies /project \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d68f71b1/nifi/nifi-external/nifi-spark-receiver/src/main/java/org/apache/nifi/spark/NiFiDataPacket.java -- diff --git a/nifi/nifi-external/nifi-spark-receiver/src/main/java/org/apache/nifi/spark/NiFiDataPacket.java b/nifi/nifi-external/nifi-spark-receiver/src/main/java/org/apache/nifi/spark/NiFiDataPacket.java index 2f08dc5..484c2a9 100644 --- a/nifi/nifi-external/nifi-spark-receiver/src/main/java/org/apache/nifi/spark/NiFiDataPacket.java +++ b/nifi/nifi-external/nifi-spark-receiver/src/main/java/org/apache/nifi/spark/NiFiDataPacket.java @@ -20,21 +20,20 @@ import java.util.Map; /** * p - * The NiFiDataPacket provides a packaging around a NiFi FlowFile. It wraps both a FlowFile's - * content and its attributes so that they can be processed by Spark + * The NiFiDataPacket provides a packaging around a NiFi FlowFile. It wraps both + * a FlowFile's content and its attributes so that they can be processed by + * Spark * /p */ public interface NiFiDataPacket { - /** -* Returns the contents of a NiFi FlowFile -* @return -*/ - byte[] getContent(); +/** + * @return the contents of a NiFi FlowFile + */ +byte[] getContent(); - /** -* Returns a Map of attributes that are associated with the NiFi FlowFile -* @return -*/ - MapString, String getAttributes(); +/** + * @return a Map of attributes that are associated with the NiFi FlowFile + */ +MapString, String getAttributes(); } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d68f71b1/nifi/nifi-external/nifi-spark-receiver/src/main/java/org/apache/nifi/spark/NiFiReceiver.java -- diff --git a/nifi/nifi-external/nifi-spark-receiver/src/main/java/org/apache/nifi/spark/NiFiReceiver.java b/nifi/nifi-external/nifi-spark-receiver/src/main/java/org/apache/nifi/spark/NiFiReceiver.java index 9f31062..8cbf60c 100644 --- a/nifi/nifi-external/nifi-spark-receiver/src/main/java/org/apache/nifi/spark/NiFiReceiver.java +++ b/nifi/nifi-external/nifi-spark-receiver/src/main/java/org/apache/nifi/spark/NiFiReceiver.java @@ -31,64 +31,67 @@ import org.apache.nifi.stream.io.StreamUtils; import org.apache.spark.storage.StorageLevel; import org.apache.spark.streaming.receiver.Receiver; - /** * p - * The codeNiFiReceiver/code is a Reliable Receiver that provides a way to pull data - * from
[05/11] incubator-nifi git commit: NIFI-271 checkpoint
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/888254b2/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java index 355e303..eb7ec83 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java @@ -23,9 +23,6 @@ import org.apache.nifi.annotation.behavior.TriggerSerially; import org.apache.nifi.annotation.behavior.TriggerWhenAnyDestinationAvailable; import org.apache.nifi.annotation.behavior.TriggerWhenEmpty; import org.apache.nifi.annotation.documentation.CapabilityDescription; -import org.apache.nifi.controller.ProcessScheduler; -import org.apache.nifi.controller.ValidationContextFactory; -import org.apache.nifi.controller.ProcessorNode; import static java.util.Objects.requireNonNull; @@ -157,9 +154,11 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable sideEffectFree = procClass.isAnnotationPresent(SideEffectFree.class) || procClass.isAnnotationPresent(org.apache.nifi.processor.annotation.SideEffectFree.class); batchSupported = procClass.isAnnotationPresent(SupportsBatching.class) || procClass.isAnnotationPresent(org.apache.nifi.processor.annotation.SupportsBatching.class); triggeredSerially = procClass.isAnnotationPresent(TriggerSerially.class) || procClass.isAnnotationPresent(org.apache.nifi.processor.annotation.TriggerSerially.class); -triggerWhenAnyDestinationAvailable = procClass.isAnnotationPresent(TriggerWhenAnyDestinationAvailable.class) || procClass.isAnnotationPresent(org.apache.nifi.processor.annotation.TriggerWhenAnyDestinationAvailable.class); +triggerWhenAnyDestinationAvailable = procClass.isAnnotationPresent(TriggerWhenAnyDestinationAvailable.class) +|| procClass.isAnnotationPresent(org.apache.nifi.processor.annotation.TriggerWhenAnyDestinationAvailable.class); this.validationContextFactory = validationContextFactory; -eventDrivenSupported = (procClass.isAnnotationPresent(EventDriven.class) || procClass.isAnnotationPresent(org.apache.nifi.processor.annotation.EventDriven.class) ) !triggeredSerially !triggerWhenEmpty; +eventDrivenSupported = (procClass.isAnnotationPresent(EventDriven.class) +|| procClass.isAnnotationPresent(org.apache.nifi.processor.annotation.EventDriven.class)) !triggeredSerially !triggerWhenEmpty; schedulingStrategy = SchedulingStrategy.TIMER_DRIVEN; } @@ -175,7 +174,7 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable * Provides and opportunity to retain information about this particular * processor instance * - * @param comments + * @param comments new comments */ @Override public void setComments(final String comments) { @@ -205,10 +204,12 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable this.position.set(position); } +@Override public MapString, String getStyle() { return style.get(); } +@Override public void setStyle(final MapString, String style) { if (style != null) { this.style.set(Collections.unmodifiableMap(new HashMap(style))); @@ -229,9 +230,7 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable return lossTolerant.get(); } -/** - * @return if true processor runs only on the primary node - */ +@Override public boolean isIsolated() { return isolated.get(); } @@ -249,6 +248,7 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable * @return true if the processor has the {@link SideEffectFree} annotation, * false otherwise. */ +@Override public boolean isSideEffectFree() { return sideEffectFree; } @@ -262,6 +262,7 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable * @return true if the processor has the * {@link TriggerWhenAnyDestinationAvailable} annotation, false otherwise. */ +@Override public boolean isTriggerWhenAnyDestinationAvailable() { return triggerWhenAnyDestinationAvailable; } @@ -270,7 +271,7 @@ public class StandardProcessorNode extends
[01/11] incubator-nifi git commit: NIFI-271 checkpoint
Repository: incubator-nifi Updated Branches: refs/heads/NIFI-271 b612b6bcd - 888254b2a http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/888254b2/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/repository/TestStandardProcessSession.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/repository/TestStandardProcessSession.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/repository/TestStandardProcessSession.java index ca68725..3486875 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/repository/TestStandardProcessSession.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/repository/TestStandardProcessSession.java @@ -257,7 +257,7 @@ public class TestStandardProcessSession { Assert.assertEquals(FlowFileAccessException.class, ex.getClass()); } } - + private void assertDisabled(final InputStream inputStream) { try { inputStream.read(); @@ -289,8 +289,8 @@ public class TestStandardProcessSession { } catch (final Exception ex) { Assert.assertEquals(FlowFileAccessException.class, ex.getClass()); } -} - +} + @Test public void testAppendAfterSessionClosesStream() throws IOException { final ContentClaim claim = contentRepo.create(false); @@ -355,7 +355,7 @@ public class TestStandardProcessSession { }); assertDisabled(inputStreamHolder.get()); assertDisabled(outputStreamHolder.get()); - } +} @Test public void testWriteAfterSessionClosesStream() throws IOException { @@ -426,7 +426,6 @@ public class TestStandardProcessSession { assertEquals(0, provenanceRepo.getEvents(0L, 10).size()); } - @Test public void testProvenanceEventsEmittedForForkIfNotRemoved() throws IOException { final FlowFileRecord flowFileRecord = new StandardFlowFileRecord.Builder() @@ -466,59 +465,59 @@ public class TestStandardProcessSession { @Test public void testUpdateAttributesThenJoin() throws IOException { final FlowFileRecord flowFileRecord1 = new StandardFlowFileRecord.Builder() -.id(1L) -.addAttribute(uuid, ----) -.entryDate(System.currentTimeMillis()) -.build(); - +.id(1L) +.addAttribute(uuid, ----) +.entryDate(System.currentTimeMillis()) +.build(); + final FlowFileRecord flowFileRecord2 = new StandardFlowFileRecord.Builder() -.id(2L) -.addAttribute(uuid, ----) -.entryDate(System.currentTimeMillis()) -.build(); - +.id(2L) +.addAttribute(uuid, ----) +.entryDate(System.currentTimeMillis()) +.build(); + flowFileQueue.put(flowFileRecord1); flowFileQueue.put(flowFileRecord2); - + FlowFile ff1 = session.get(); FlowFile ff2 = session.get(); ff1 = session.putAttribute(ff1, index, 1); ff2 = session.putAttribute(ff2, index, 2); - + final ListFlowFile parents = new ArrayList(2); parents.add(ff1); parents.add(ff2); - + final FlowFile child = session.create(parents); - + final Relationship rel = new Relationship.Builder().name(A).build(); - + session.transfer(ff1, rel); session.transfer(ff2, rel); session.transfer(child, rel); - + session.commit(); - + final ListProvenanceEventRecord events = provenanceRepo.getEvents(0L, 1000); // We should have a JOIN and 2 ATTRIBUTE_MODIFIED's assertEquals(3, events.size()); - + int joinCount = 0; int ff1UpdateCount = 0; int ff2UpdateCount = 0; - -for ( final ProvenanceEventRecord event : events ) { + +for (final ProvenanceEventRecord event : events) { switch (event.getEventType()) { case JOIN: assertEquals(child.getAttribute(uuid), event.getFlowFileUuid()); joinCount++; break; case ATTRIBUTES_MODIFIED: -if ( event.getFlowFileUuid().equals(ff1.getAttribute(uuid)) ) { +if
[10/11] incubator-nifi git commit: NIFI-271 checkpoint
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/888254b2/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/ConnectionResponse.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/ConnectionResponse.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/ConnectionResponse.java index 7a5ff2b..4e06926 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/ConnectionResponse.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/ConnectionResponse.java @@ -21,13 +21,12 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.apache.nifi.cluster.protocol.jaxb.message.ConnectionResponseAdapter; /** - * The cluster manager's response to a node's connection request. If the manager - * has a current copy of the data flow, then it is returned with a node identifier - * to the node. Otherwise, the manager will provide a try again in X seconds - * response to the node in hopes that a current data flow will be available upon - * subsequent requests. - * - * @author unattributed + * The cluster manager's response to a node's connection request. If the manager + * has a current copy of the data flow, then it is returned with a node + * identifier to the node. Otherwise, the manager will provide a try again in X + * seconds response to the node in hopes that a current data flow will be + * available upon subsequent requests. + * */ @XmlJavaTypeAdapter(ConnectionResponseAdapter.class) public class ConnectionResponse { @@ -40,14 +39,14 @@ public class ConnectionResponse { private final Integer managerRemoteInputPort; private final Boolean managerRemoteCommsSecure; private final String instanceId; - + private volatile String clusterManagerDN; - -public ConnectionResponse(final NodeIdentifier nodeIdentifier, final StandardDataFlow dataFlow, final boolean primary, -final Integer managerRemoteInputPort, final Boolean managerRemoteCommsSecure, final String instanceId) { -if(nodeIdentifier == null) { + +public ConnectionResponse(final NodeIdentifier nodeIdentifier, final StandardDataFlow dataFlow, final boolean primary, +final Integer managerRemoteInputPort, final Boolean managerRemoteCommsSecure, final String instanceId) { +if (nodeIdentifier == null) { throw new IllegalArgumentException(Node identifier may not be empty or null.); -} else if(dataFlow == null) { +} else if (dataFlow == null) { throw new IllegalArgumentException(DataFlow may not be null.); } this.nodeIdentifier = nodeIdentifier; @@ -59,9 +58,9 @@ public class ConnectionResponse { this.managerRemoteCommsSecure = managerRemoteCommsSecure; this.instanceId = instanceId; } - + public ConnectionResponse(final int tryLaterSeconds) { -if(tryLaterSeconds = 0) { +if (tryLaterSeconds = 0) { throw new IllegalArgumentException(Try-Later seconds may not be nonnegative: + tryLaterSeconds); } this.dataFlow = null; @@ -84,19 +83,19 @@ public class ConnectionResponse { this.managerRemoteCommsSecure = null; this.instanceId = null; } - + public static ConnectionResponse createBlockedByFirewallResponse() { return new ConnectionResponse(); } - + public boolean isPrimary() { return primary; } - + public boolean shouldTryLater() { return tryLaterSeconds 0; } - + public boolean isBlockedByFirewall() { return blockedByFirewall; } @@ -104,11 +103,11 @@ public class ConnectionResponse { public int getTryLaterSeconds() { return tryLaterSeconds; } - + public StandardDataFlow getDataFlow() { return dataFlow; } - + public NodeIdentifier getNodeIdentifier() { return nodeIdentifier; } @@ -116,23 +115,22 @@ public class ConnectionResponse { public Integer getManagerRemoteInputPort() { return managerRemoteInputPort; } - + public Boolean isManagerRemoteCommsSecure() { return managerRemoteCommsSecure; } - + public String getInstanceId() { return instanceId; } - + public void setClusterManagerDN(final String dn) { this.clusterManagerDN = dn; } - + /** - * Returns the DN of the NCM, if it is available or codenull/code
[11/11] incubator-nifi git commit: NIFI-271 checkpoint
NIFI-271 checkpoint Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/888254b2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/888254b2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/888254b2 Branch: refs/heads/NIFI-271 Commit: 888254b2a18174af29d1bd70bf2ce420f41739ba Parents: b612b6b Author: joewitt joew...@apache.org Authored: Wed Apr 22 11:46:26 2015 -0400 Committer: joewitt joew...@apache.org Committed: Wed Apr 22 11:46:26 2015 -0400 -- .../nifi-framework/nifi-administration/pom.xml | 8 + .../org/apache/nifi/admin/RepositoryUtils.java | 7 +- .../nifi/admin/UserDataSourceFactoryBean.java | 12 - .../org/apache/nifi/admin/dao/ActionDAO.java| 28 +- .../org/apache/nifi/admin/dao/AuthorityDAO.java | 19 +- .../java/org/apache/nifi/admin/dao/UserDAO.java | 52 +- .../nifi/admin/dao/impl/StandardActionDAO.java | 93 +--- .../apache/nifi/admin/service/AuditService.java | 28 +- .../apache/nifi/admin/service/UserService.java | 70 ++- .../service/action/AbstractUserAction.java | 18 +- .../service/action/AdministrationAction.java| 8 +- .../service/action/AuthorizeUserAction.java | 6 +- .../admin/service/action/DeleteUserAction.java | 2 +- .../service/action/FindUserByIdAction.java | 5 +- .../service/action/SeedUserAccountsAction.java | 4 +- .../service/impl/StandardAuditService.java | 11 - .../admin/service/impl/StandardUserService.java | 29 +- .../admin/service/transaction/Transaction.java | 6 +- .../AuthorityProviderFactoryBean.java | 47 +- .../org/apache/nifi/user/AccountStatus.java | 4 +- .../java/org/apache/nifi/user/NiFiUser.java | 2 +- .../service/action/AuthorizeUserActionTest.java | 22 +- .../service/action/CreateUserActionTest.java| 14 +- .../service/action/DisableUserActionTest.java | 11 +- .../action/InvalidateUserAccountActionTest.java | 9 +- .../action/RequestUserAccountActionTest.java| 6 +- .../action/SeedUserAccountsActionTest.java | 3 +- .../action/SetUserAuthoritiesActionTest.java| 6 +- .../protocol/ClusterManagerProtocolSender.java | 22 +- .../cluster/protocol/ConnectionRequest.java | 6 +- .../cluster/protocol/ConnectionResponse.java| 54 +- .../apache/nifi/cluster/protocol/Heartbeat.java | 19 +- .../nifi/cluster/protocol/NodeBulletins.java| 2 +- .../nifi/cluster/protocol/NodeIdentifier.java | 102 ++-- .../cluster/protocol/NodeProtocolSender.java| 43 +- .../nifi/cluster/protocol/ProtocolContext.java | 12 +- .../cluster/protocol/ProtocolException.java | 9 +- .../nifi/cluster/protocol/ProtocolHandler.java | 17 +- .../nifi/cluster/protocol/ProtocolListener.java | 31 +- .../protocol/ProtocolMessageMarshaller.java | 7 +- .../protocol/ProtocolMessageUnmarshaller.java | 13 +- .../nifi/cluster/protocol/StandardDataFlow.java | 34 +- .../UnknownServiceAddressException.java | 9 +- .../impl/ClusterManagerProtocolSenderImpl.java | 101 ++-- .../ClusterManagerProtocolSenderListener.java | 28 +- .../protocol/impl/ClusterServiceDiscovery.java | 5 +- .../protocol/impl/ClusterServiceLocator.java| 124 ++--- .../impl/ClusterServicesBroadcaster.java| 86 ++-- .../protocol/impl/CopyingInputStream.java | 25 +- .../impl/MulticastProtocolListener.java | 66 +-- .../protocol/impl/NodeProtocolSenderImpl.java | 61 ++- .../impl/NodeProtocolSenderListener.java| 16 +- .../protocol/impl/SocketProtocolListener.java | 52 +- .../protocol/jaxb/JaxbProtocolContext.java | 21 +- .../jaxb/message/AdaptedConnectionRequest.java | 7 +- .../jaxb/message/AdaptedConnectionResponse.java | 19 +- .../protocol/jaxb/message/AdaptedCounter.java | 11 +- .../protocol/jaxb/message/AdaptedDataFlow.java | 9 +- .../protocol/jaxb/message/AdaptedHeartbeat.java | 13 +- .../jaxb/message/AdaptedNodeBulletins.java | 11 +- .../jaxb/message/AdaptedNodeIdentifier.java | 13 +- .../jaxb/message/ConnectionRequestAdapter.java | 4 +- .../jaxb/message/ConnectionResponseAdapter.java | 12 +- .../protocol/jaxb/message/DataFlowAdapter.java | 10 +- .../protocol/jaxb/message/HeartbeatAdapter.java | 14 +- .../jaxb/message/JaxbProtocolUtils.java | 6 +- .../jaxb/message/NodeBulletinsAdapter.java | 10 +- .../jaxb/message/NodeIdentifierAdapter.java | 6 +- .../protocol/jaxb/message/ObjectFactory.java| 35 +- .../message/ConnectionRequestMessage.java | 11 +- .../message/ConnectionResponseMessage.java | 27 +- .../ControllerStartupFailureMessage.java| 7 +- .../protocol/message/DisconnectMessage.java | 8 +- .../protocol/message/ExceptionMessage.java | 9 +- .../protocol/message/FlowRequestMessage.java| 6
[08/11] incubator-nifi git commit: NIFI-271 checkpoint
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/888254b2/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java index 59837c1..ab10b01 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java @@ -16,8 +16,6 @@ */ package org.apache.nifi.cluster.protocol.impl; -import org.apache.nifi.cluster.protocol.impl.SocketProtocolListener; -import org.apache.nifi.cluster.protocol.impl.ClusterManagerProtocolSenderImpl; import java.io.IOException; import java.net.InetAddress; import org.apache.nifi.cluster.protocol.NodeIdentifier; @@ -33,11 +31,13 @@ import org.apache.nifi.cluster.protocol.message.ProtocolMessage; import org.apache.nifi.io.socket.ServerSocketConfiguration; import org.apache.nifi.io.socket.SocketConfiguration; import org.junit.After; -import static org.junit.Assert.*; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; import org.junit.Before; import org.junit.Test; import static org.mockito.Matchers.any; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -45,48 +45,48 @@ import org.mockito.stubbing.Answer; * @author unattributed */ public class ClusterManagerProtocolSenderImplTest { - + private InetAddress address; - + private int port; - + private SocketProtocolListener listener; - + private ClusterManagerProtocolSenderImpl sender; - + private ProtocolHandler mockHandler; - + @Before public void setup() throws IOException { - + address = InetAddress.getLocalHost(); ServerSocketConfiguration serverSocketConfiguration = new ServerSocketConfiguration(); serverSocketConfiguration.setSocketTimeout(2000); mockHandler = mock(ProtocolHandler.class); - + ProtocolContext protocolContext = new JaxbProtocolContext(JaxbProtocolUtils.JAXB_CONTEXT); - + listener = new SocketProtocolListener(5, 0, serverSocketConfiguration, protocolContext); listener.addHandler(mockHandler); listener.start(); - + port = listener.getPort(); - + SocketConfiguration socketConfiguration = new SocketConfiguration(); sender = new ClusterManagerProtocolSenderImpl(socketConfiguration, protocolContext); } - + @After public void teardown() throws IOException { -if(listener.isRunning()) { +if (listener.isRunning()) { listener.stop(); } } - + @Test public void testRequestFlow() throws Exception { - + when(mockHandler.canHandle(any(ProtocolMessage.class))).thenReturn(Boolean.TRUE); when(mockHandler.handle(any(ProtocolMessage.class))).thenReturn(new FlowResponseMessage()); FlowRequestMessage request = new FlowRequestMessage(); @@ -94,10 +94,10 @@ public class ClusterManagerProtocolSenderImplTest { FlowResponseMessage response = sender.requestFlow(request); assertNotNull(response); } - + @Test public void testRequestFlowWithBadResponseMessage() throws Exception { - + when(mockHandler.canHandle(any(ProtocolMessage.class))).thenReturn(Boolean.TRUE); when(mockHandler.handle(any(ProtocolMessage.class))).thenReturn(new PingMessage()); FlowRequestMessage request = new FlowRequestMessage(); @@ -105,16 +105,17 @@ public class ClusterManagerProtocolSenderImplTest { try { sender.requestFlow(request); fail(failed to throw exception); -} catch(ProtocolException pe) {} - +} catch (ProtocolException pe) { +} + } - + @Test public void testRequestFlowDelayedResponse() throws Exception { - + final int time = 250; sender.getSocketConfiguration().setSocketTimeout(time); - +
[06/11] incubator-nifi git commit: NIFI-271 checkpoint
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/888254b2/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java index ec25ab1..07e754e 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java @@ -457,11 +457,12 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R rootGroup.setName(DEFAULT_ROOT_GROUP_NAME); instanceId = UUID.randomUUID().toString(); -if (remoteInputSocketPort == null){ +if (remoteInputSocketPort == null) { LOG.info(Not enabling Site-to-Site functionality because nifi.remote.input.socket.port is not set); externalSiteListener = 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.); +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 @@ -530,7 +531,7 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R } }; } - + public void initializeFlow() throws IOException { writeLock.lock(); try { @@ -584,17 +585,19 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R * Causes any processors that were added to the flow with a 'delayStart' * flag of true to now start * /p + * + * @param startDelayedComponents true if start */ public void onFlowInitialized(final boolean startDelayedComponents) { writeLock.lock(); try { -if ( startDelayedComponents ) { +if (startDelayedComponents) { LOG.info(Starting {} processors/ports/funnels, (startConnectablesAfterInitialization.size() + startRemoteGroupPortsAfterInitialization.size())); for (final Connectable connectable : startConnectablesAfterInitialization) { if (connectable.getScheduledState() == ScheduledState.DISABLED) { continue; } - + try { if (connectable instanceof ProcessorNode) { connectable.getProcessGroup().startProcessor((ProcessorNode) connectable); @@ -603,14 +606,14 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R } } catch (final Throwable t) { LOG.error(Unable to start {} due to {}, new Object[]{connectable, t.toString()}); -if ( LOG.isDebugEnabled() ) { +if (LOG.isDebugEnabled()) { LOG.error(, t); } } } - + startConnectablesAfterInitialization.clear(); - + int startedTransmitting = 0; for (final RemoteGroupPort remoteGroupPort : startRemoteGroupPortsAfterInitialization) { try { @@ -620,7 +623,7 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R LOG.error(Unable to start transmitting with {} due to {}, new Object[]{remoteGroupPort, t}); } } - + LOG.info(Started {} Remote Group Ports transmitting, startedTransmitting); startRemoteGroupPortsAfterInitialization.clear(); } else { @@ -635,7 +638,7 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R LOG.error(Unable to start {} due to {}, new Object[]{connectable, t}); } } - + startConnectablesAfterInitialization.clear();
[04/11] incubator-nifi git commit: NIFI-271 checkpoint
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/888254b2/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileContentRepository.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileContentRepository.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileContentRepository.java index 8deda3c..65756f4 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileContentRepository.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileContentRepository.java @@ -103,7 +103,7 @@ public class VolatileContentRepository implements ContentRepository { private final ConcurrentMapContentClaim, ContentClaim backupRepoClaimMap = new ConcurrentHashMap(256); private final AtomicReferenceContentRepository backupRepositoryRef = new AtomicReference(null); -private ContentClaimManager claimManager; // effectively final +private ContentClaimManager claimManager; // effectively final public VolatileContentRepository() { this(NiFiProperties.getInstance()); @@ -137,7 +137,7 @@ public class VolatileContentRepository implements ContentRepository { public void initialize(final ContentClaimManager claimManager) { this.claimManager = claimManager; } - + @Override public void shutdown() { executor.shutdown(); @@ -147,7 +147,7 @@ public class VolatileContentRepository implements ContentRepository { * Specifies a Backup Repository where data should be written if this * Repository fills up * - * @param backup + * @param backup repo backup */ public void setBackupRepository(final ContentRepository backup) { final boolean updated = backupRepositoryRef.compareAndSet(null, backup); http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/888254b2/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileFlowFileRepository.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileFlowFileRepository.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileFlowFileRepository.java index a7020a6..9e429d6 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileFlowFileRepository.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/VolatileFlowFileRepository.java @@ -34,7 +34,7 @@ import org.apache.nifi.controller.repository.claim.ContentClaimManager; public class VolatileFlowFileRepository implements FlowFileRepository { private final AtomicLong idGenerator = new AtomicLong(0L); -private ContentClaimManager claimManager; // effectively final +private ContentClaimManager claimManager; // effectively final @Override public void initialize(final ContentClaimManager claimManager) { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/888254b2/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java index 292c258..0779c4d 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java @@ -102,7 +102,7 @@ public class WriteAheadFlowFileRepository implements FlowFileRepository, SyncLis // synced with disk. // // This is required due to the following scenario, which could exist if we did not do this: -// +
[02/11] incubator-nifi git commit: NIFI-271 checkpoint
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/888254b2/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java -- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java index 9a8ad28..27eca37 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java @@ -82,14 +82,13 @@ import org.xml.sax.SAXException; * the processor settings or comments tabs, position information, flow * controller settings, and counters. * - * @author unattributed */ public final class FingerprintFactory { /* * Developer Note: This class should be changed with care and coordinated - * with all classes that use fingerprinting. Improper coordination may - * lead to orphaning flow files, especially when flows are reloaded in a + * with all classes that use fingerprinting. Improper coordination may + * lead to orphaning flow files, especially when flows are reloaded in a * clustered environment. */ // no fingerprint value @@ -130,7 +129,7 @@ public final class FingerprintFactory { * the flow does not influence the fingerprint generation. * * @param flowBytes the flow represented as bytes - * @param controller + * @param controller the controller * * @return a generated fingerprint * @@ -161,8 +160,8 @@ public final class FingerprintFactory { * * @return the fingerprint * - * @throws NoSuchAlgorithmException - * @throws UnsupportedEncodingException + * @throws NoSuchAlgorithmException ex + * @throws UnsupportedEncodingException ex */ private String createFingerprint(final Document flowDoc, final FlowController controller) throws NoSuchAlgorithmException { if (flowDoc == null) { @@ -188,7 +187,7 @@ public final class FingerprintFactory { * templates does not influence the fingerprint generation. * * - * @param templates + * @param templates collection of templates * @return a generated fingerprint * * @throws FingerprintException if the fingerprint failed to be generated @@ -253,22 +252,21 @@ public final class FingerprintFactory { // root group final Element rootGroupElem = (Element) DomUtils.getChildNodesByTagName(flowControllerElem, rootGroup).item(0); addProcessGroupFingerprint(builder, rootGroupElem, controller); - + final Element controllerServicesElem = DomUtils.getChild(flowControllerElem, controllerServices); -if ( controllerServicesElem != null ) { - for ( final Element serviceElem : DomUtils.getChildElementsByTagName(controllerServicesElem, controllerService) ) { - addControllerServiceFingerprint(builder, serviceElem); - } +if (controllerServicesElem != null) { +for (final Element serviceElem : DomUtils.getChildElementsByTagName(controllerServicesElem, controllerService)) { +addControllerServiceFingerprint(builder, serviceElem); +} } - + final Element reportingTasksElem = DomUtils.getChild(flowControllerElem, reportingTasks); -if ( reportingTasksElem != null ) { - for ( final Element taskElem : DomUtils.getChildElementsByTagName(reportingTasksElem, reportingTask) ) { - addReportingTaskFingerprint(builder, taskElem); - } +if (reportingTasksElem != null) { +for (final Element taskElem : DomUtils.getChildElementsByTagName(reportingTasksElem, reportingTask)) { +addReportingTaskFingerprint(builder, taskElem); +} } - - + return builder; } @@ -851,21 +849,21 @@ public final class FingerprintFactory { builder.append(funnel.getId()); return builder; } - + private void addControllerServiceFingerprint(final StringBuilder builder, final Element controllerServiceElem) { - final ControllerServiceDTO dto = FlowFromDOMFactory.getControllerService(controllerServiceElem, encryptor); - addControllerServiceFingerprint(builder, dto); +final ControllerServiceDTO dto = FlowFromDOMFactory.getControllerService(controllerServiceElem, encryptor); +addControllerServiceFingerprint(builder, dto); } - +