You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jo...@apache.org on 2015/04/20 05:12:38 UTC

[01/50] [abbrv] incubator-nifi git commit: Merge branch 'develop' of http://git-wip-us.apache.org/repos/asf/incubator-nifi into develop

Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-271 3c3306b71 -> 8a296aacc


Merge branch 'develop' of http://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/39735c30
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/39735c30
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/39735c30

Branch: refs/heads/NIFI-271
Commit: 39735c30bcf2dccb090dd8c60a8668c27d9c7517
Parents: c974ea9 7369730
Author: Mark Payne <ma...@hotmail.com>
Authored: Tue Apr 7 12:46:48 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Tue Apr 7 12:46:48 2015 -0400

----------------------------------------------------------------------
 .../service/StandardControllerServiceNode.java      |  2 +-
 .../js/jquery/propertytable/jquery.propertytable.js | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[13/50] [abbrv] incubator-nifi git commit: NIFI-506: Initial import of HL7 work

Posted by jo...@apache.org.
NIFI-506: Initial import of HL7 work


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/45416dc6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/45416dc6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/45416dc6

Branch: refs/heads/NIFI-271
Commit: 45416dc66bc212bacf5a8429e4ae2ae880c0672c
Parents: e8fde85
Author: Mark Payne <ma...@hotmail.com>
Authored: Thu Apr 9 17:54:33 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Thu Apr 9 17:54:33 2015 -0400

----------------------------------------------------------------------
 .../nifi-hl7-query-language/.gitignore          |   3 +
 .../nifi-hl7-query-language/pom.xml             | 115 ++++++
 .../apache/nifi/hl7/query/antlr/HL7QueryLexer.g | 156 +++++++
 .../nifi/hl7/query/antlr/HL7QueryParser.g       |  91 ++++
 .../org/apache/nifi/hl7/hapi/EmptyField.java    |  37 ++
 .../org/apache/nifi/hl7/hapi/HapiField.java     |  83 ++++
 .../org/apache/nifi/hl7/hapi/HapiMessage.java   |  94 +++++
 .../org/apache/nifi/hl7/hapi/HapiSegment.java   |  69 ++++
 .../apache/nifi/hl7/hapi/SingleValueField.java  |  42 ++
 .../java/org/apache/nifi/hl7/io/HL7Reader.java  |  27 ++
 .../hl7/io/exception/InvalidHL7Exception.java   |  40 ++
 .../org/apache/nifi/hl7/model/HL7Component.java |  24 ++
 .../org/apache/nifi/hl7/model/HL7Field.java     |  21 +
 .../org/apache/nifi/hl7/model/HL7Message.java   |  27 ++
 .../org/apache/nifi/hl7/model/HL7Segment.java   |  27 ++
 .../org/apache/nifi/hl7/query/Declaration.java  |  29 ++
 .../org/apache/nifi/hl7/query/HL7Query.java     | 412 +++++++++++++++++++
 .../org/apache/nifi/hl7/query/QueryResult.java  |  29 ++
 .../org/apache/nifi/hl7/query/ResultHit.java    |  25 ++
 .../org/apache/nifi/hl7/query/Selection.java    |  37 ++
 .../hl7/query/evaluator/BooleanEvaluator.java   |  24 ++
 .../nifi/hl7/query/evaluator/Evaluator.java     |  27 ++
 .../hl7/query/evaluator/IntegerEvaluator.java   |  26 ++
 .../hl7/query/evaluator/StringEvaluator.java    |  25 ++
 .../comparison/AbstractComparisonEvaluator.java | 106 +++++
 .../comparison/AbstractNumericComparison.java   |  67 +++
 .../evaluator/comparison/EqualsEvaluator.java   |  32 ++
 .../comparison/GreaterThanEvaluator.java        |  34 ++
 .../comparison/GreaterThanOrEqualEvaluator.java |  34 ++
 .../evaluator/comparison/IsNullEvaluator.java   |  69 ++++
 .../evaluator/comparison/LessThanEvaluator.java |  31 ++
 .../comparison/LessThanOrEqualEvaluator.java    |  31 ++
 .../comparison/NotEqualsEvaluator.java          |  32 ++
 .../evaluator/comparison/NotEvaluator.java      |  36 ++
 .../evaluator/comparison/NotNullEvaluator.java  |  65 +++
 .../literal/IntegerLiteralEvaluator.java        |  36 ++
 .../literal/StringLiteralEvaluator.java         |  35 ++
 .../hl7/query/evaluator/logic/AndEvaluator.java |  43 ++
 .../hl7/query/evaluator/logic/OrEvaluator.java  |  43 ++
 .../message/DeclaredReferenceEvaluator.java     |  42 ++
 .../query/evaluator/message/DotEvaluator.java   |  88 ++++
 .../query/evaluator/message/FieldEvaluator.java |  67 +++
 .../evaluator/message/MessageEvaluator.java     |  34 ++
 .../evaluator/message/SegmentEvaluator.java     |  51 +++
 .../exception/HL7QueryParsingException.java     |  37 ++
 .../nifi/hl7/query/result/MissedResult.java     |  56 +++
 .../hl7/query/result/StandardQueryResult.java   |  69 ++++
 .../hl7/query/result/StandardResultHit.java     |  41 ++
 .../org/apache/nifi/hl7/query/TestHL7Query.java | 352 ++++++++++++++++
 .../src/test/resources/hyperglycemia            |   5 +
 .../src/test/resources/hypoglycemia             |   5 +
 .../src/test/resources/metabolic-panel          |  23 ++
 .../resources/unsolicited-vaccine-update-long   |  16 +
 .../resources/unsolicited-vaccine-update-short  |   4 +
 .../src/test/resources/vaccine-query            |   3 +
 .../src/test/resources/vaers-message-long       |  60 +++
 .../nifi-hl7-bundle/nifi-hl7-nar/pom.xml        |  36 ++
 .../nifi-hl7-processors/.gitignore              |   1 +
 .../nifi-hl7-bundle/nifi-hl7-processors/pom.xml | 106 +++++
 .../processors/hl7/ExtractHL7Attributes.java    | 247 +++++++++++
 .../apache/nifi/processors/hl7/RouteHL7.java    | 217 ++++++++++
 .../org.apache.nifi.processor.Processor         |  16 +
 .../hl7/TestExtractHL7Attributes.java           |  48 +++
 .../src/test/resources/1.hl7                    |  16 +
 .../src/test/resources/hypoglycemia.hl7         |   5 +
 nifi/nifi-nar-bundles/nifi-hl7-bundle/pom.xml   |  33 ++
 66 files changed, 3862 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/.gitignore
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/.gitignore b/nifi/nifi-commons/nifi-hl7-query-language/.gitignore
new file mode 100644
index 0000000..e91d5c4
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/.gitignore
@@ -0,0 +1,3 @@
+/target/
+/target/
+/target/

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/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
new file mode 100644
index 0000000..447a88b
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/pom.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	
+	<parent>
+		<groupId>org.apache.nifi</groupId>
+		<artifactId>nifi-commons</artifactId>
+		<version>0.1.0-incubating-SNAPSHOT</version>
+	</parent>
+	
+	<artifactId>nifi-hl7-query-language</artifactId>
+	<packaging>jar</packaging>
+
+	<name>NiFi Health Level 7 (HL7) Query Language</name>
+
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.7</source>
+					<target>1.7</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.antlr</groupId>
+				<artifactId>antlr3-maven-plugin</artifactId>
+				<executions>
+					<execution>
+						<goals>
+							<goal>antlr</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.antlr</groupId>
+			<artifactId>antlr-runtime</artifactId>
+			<version>3.5.2</version>
+		</dependency>
+		
+		<!-- HAPI to parse v2 messages -->
+		<dependency>
+			<groupId>ca.uhn.hapi</groupId>
+			<artifactId>hapi-base</artifactId>
+			<version>2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>ca.uhn.hapi</groupId>
+			<artifactId>hapi-structures-v21</artifactId>
+			<version>2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>ca.uhn.hapi</groupId>
+			<artifactId>hapi-structures-v22</artifactId>
+			<version>2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>ca.uhn.hapi</groupId>
+			<artifactId>hapi-structures-v23</artifactId>
+			<version>2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>ca.uhn.hapi</groupId>
+			<artifactId>hapi-structures-v231</artifactId>
+			<version>2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>ca.uhn.hapi</groupId>
+			<artifactId>hapi-structures-v24</artifactId>
+			<version>2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>ca.uhn.hapi</groupId>
+			<artifactId>hapi-structures-v25</artifactId>
+			<version>2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>ca.uhn.hapi</groupId>
+			<artifactId>hapi-structures-v251</artifactId>
+			<version>2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>ca.uhn.hapi</groupId>
+			<artifactId>hapi-structures-v26</artifactId>
+			<version>2.2</version>
+		</dependency>
+
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryLexer.g
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryLexer.g b/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryLexer.g
new file mode 100644
index 0000000..7fe3386
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryLexer.g
@@ -0,0 +1,156 @@
+lexer grammar HL7QueryLexer;
+
+@header {
+	package org.apache.nifi.hl7.query.antlr;
+	import org.apache.nifi.hl7.query.exception.HL7QueryParsingException;
+}
+
+@rulecatch {
+  catch(final Exception e) {
+    throw new HL7QueryParsingException(e);
+  }
+}
+
+@members {
+  public void displayRecognitionError(String[] tokenNames, RecognitionException e) {
+    final StringBuilder sb = new StringBuilder();
+    if ( e.token == null ) {
+    	sb.append("Unrecognized token ");
+    } else {
+    	sb.append("Unexpected token '").append(e.token.getText()).append("' ");
+    }
+    sb.append("at line ").append(e.line);
+    if ( e.approximateLineInfo ) {
+    	sb.append(" (approximately)");
+    }
+    sb.append(", column ").append(e.charPositionInLine);
+    sb.append(". Query: ").append(e.input.toString());
+    
+    throw new HL7QueryParsingException(sb.toString());
+  }
+
+  public void recover(RecognitionException e) {
+  	final StringBuilder sb = new StringBuilder();
+    if ( e.token == null ) {
+    	sb.append("Unrecognized token ");
+    } else {
+    	sb.append("Unexpected token '").append(e.token.getText()).append("' ");
+    }
+    sb.append("at line ").append(e.line);
+    if ( e.approximateLineInfo ) {
+    	sb.append(" (approximately)");
+    }
+    sb.append(", column ").append(e.charPositionInLine);
+    sb.append(". Query: ").append(e.input.toString());
+    
+    throw new HL7QueryParsingException(sb.toString());
+  } 
+}
+
+
+// PUNCTUATION & SPECIAL CHARACTERS
+WHITESPACE : (' '|'\t'|'\n'|'\r')+ { $channel = HIDDEN; };
+COMMENT : '#' ( ~('\n') )* '\n' { $channel = HIDDEN; };
+
+LPAREN	: '(';
+RPAREN	: ')';
+LBRACE  : '{';
+RBRACE  : '}';
+COLON	: ':';
+COMMA	: ',';
+DOT		: '.';
+SEMICOLON : ';';
+
+
+
+// OPERATORS
+EQUALS		: '=';
+NOT_EQUALS	: '!=';
+GT			: '>';
+GE			: '>=';
+LT			: '<';
+LE			: '<=';
+REGEX		: 'MATCHES REGEX';
+LIKE		: 'LIKE';
+IS_NULL		: 'IS NULL';
+NOT_NULL	: 'NOT NULL';
+
+
+// KEYWORDS
+AND			: 'AND';
+OR			: 'OR';
+NOT			: 'NOT';
+
+TRUE	: 'true';
+FALSE	: 'false';
+
+SELECT		: 'select' | 'SELECT';
+DECLARE		: 'declare' | 'DECLARE';
+OPTIONAL	: 'optional' | 'OPTIONAL';
+REQUIRED	: 'required' | 'REQUIRED';
+AS			: 'as' | 'AS';
+WHERE		: 'where' | 'WHERE';
+
+MESSAGE 	: 'MESSAGE' | 'message';
+SEGMENT 	: 'SEGMENT' | 'segment';
+
+
+SEGMENT_NAME : LETTER ALPHA_NUMERIC ALPHA_NUMERIC;
+
+
+NUMBER	: ('0'..'9')+;
+fragment LETTER : 'A'..'Z';
+fragment ALPHA_NUMERIC : 'A'..'Z' | '0'..'9';
+
+
+// STRINGS
+STRING_LITERAL
+@init{StringBuilder lBuf = new StringBuilder();}
+	:
+		(
+			'"'
+				(
+					escaped=ESC {lBuf.append(getText());} |
+				  	normal = ~( '"' | '\\' | '\n' | '\r' | '\t' ) { lBuf.appendCodePoint(normal);} 
+				)*
+			'"'
+		)
+		{
+			setText(lBuf.toString());
+		}
+		|
+		(
+			'\''
+				(
+					escaped=ESC {lBuf.append(getText());} |
+				  	normal = ~( '\'' | '\\' | '\n' | '\r' | '\t' ) { lBuf.appendCodePoint(normal);} 
+				)*
+			'\''
+		)
+		{
+			setText(lBuf.toString());
+		}
+		;
+
+
+fragment
+ESC
+	:	'\\'
+		(
+				'"'		{ setText("\""); }
+			|	'\''	{ setText("\'"); }
+			|	'r'		{ setText("\r"); }
+			|	'n'		{ setText("\n"); }
+			|	't'		{ setText("\t"); }
+			|	'\\'	{ setText("\\\\"); }
+			|	nextChar = ~('"' | '\'' | 'r' | 'n' | 't' | '\\')		
+				{
+					StringBuilder lBuf = new StringBuilder(); lBuf.append("\\\\").appendCodePoint(nextChar); setText(lBuf.toString());
+				}
+		)
+	;
+
+IDENTIFIER : (
+				  ~('$' | '{' | '}' | '(' | ')' | '[' | ']' | ',' | ':' | ';' | '/' | '*' | '\'' | ' ' | '\t' | '\r' | '\n' | '0'..'9' | '.')
+				  ~('$' | '{' | '}' | '(' | ')' | '[' | ']' | ',' | ':' | ';' | '/' | '*' | '\'' | ' ' | '\t' | '\r' | '\n' | '.')*
+				 );

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryParser.g
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryParser.g b/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryParser.g
new file mode 100644
index 0000000..4d8d13c
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryParser.g
@@ -0,0 +1,91 @@
+parser grammar HL7QueryParser;
+
+options {
+	output=AST;
+	tokenVocab=HL7QueryLexer;
+}
+
+tokens {
+	QUERY;
+	DECLARATION;
+}
+
+@header {
+	package org.apache.nifi.hl7.query.antlr;
+	import org.apache.nifi.hl7.query.exception.HL7QueryParsingException;
+}
+
+@members {
+  public void displayRecognitionError(String[] tokenNames, RecognitionException e) {
+  	final StringBuilder sb = new StringBuilder();
+    if ( e.token == null ) {
+    	sb.append("Unrecognized token ");
+    } else {
+    	sb.append("Unexpected token '").append(e.token.getText()).append("' ");
+    }
+    sb.append("at line ").append(e.line);
+    if ( e.approximateLineInfo ) {
+    	sb.append(" (approximately)");
+    }
+    sb.append(", column ").append(e.charPositionInLine);
+    sb.append(". Query: ").append(e.input.toString());
+    
+    throw new HL7QueryParsingException(sb.toString());
+  }
+
+  public void recover(final RecognitionException e) {
+  	final StringBuilder sb = new StringBuilder();
+    if ( e.token == null ) {
+    	sb.append("Unrecognized token ");
+    } else {
+    	sb.append("Unexpected token '").append(e.token.getText()).append("' ");
+    }
+    sb.append("at line ").append(e.line);
+    if ( e.approximateLineInfo ) {
+    	sb.append(" (approximately)");
+    }
+    sb.append(", column ").append(e.charPositionInLine);
+    sb.append(". Query: ").append(e.input.toString());
+    
+    throw new HL7QueryParsingException(sb.toString());
+  } 
+}
+
+
+declareClause : DECLARE^ declaration (COMMA! declaration)*;
+
+requiredOrOptional : REQUIRED | OPTIONAL;
+declaration : IDENTIFIER AS requiredOrOptional SEGMENT_NAME ->
+	^(DECLARATION IDENTIFIER requiredOrOptional SEGMENT_NAME);
+
+
+selectClause : SELECT^ selectableClause;
+selectableClause : selectable (COMMA! selectable)*;
+selectable : (MESSAGE | ref | field)^ (AS! IDENTIFIER^)?;
+
+
+whereClause : WHERE^ conditions;
+
+conditions : condition ((AND^ | OR^) condition)*;
+
+condition : NOT^ condition | LPAREN! conditions RPAREN! | evaluation;
+
+evaluation : expression
+			 (
+			 	unaryOperator^
+			 	| (binaryOperator^ expression)
+			 );
+
+expression : (LPAREN! expr RPAREN!) | expr;
+expr : ref | field | STRING_LITERAL | NUMBER;
+
+unaryOperator : IS_NULL | NOT_NULL;
+binaryOperator : EQUALS | NOT_EQUALS | LT | GT | LE | GE;
+
+ref : (SEGMENT_NAME | IDENTIFIER);
+field : ref DOT^ NUMBER 
+	(DOT^ NUMBER (DOT^ NUMBER (DOT^ NUMBER)?)?)?;
+
+
+query : declareClause? selectClause whereClause? EOF ->
+	^(QUERY declareClause? selectClause whereClause?);

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/EmptyField.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/EmptyField.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/EmptyField.java
new file mode 100644
index 0000000..be645e5
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/EmptyField.java
@@ -0,0 +1,37 @@
+/*
+ * 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.hl7.hapi;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.nifi.hl7.model.HL7Component;
+import org.apache.nifi.hl7.model.HL7Field;
+
+public class EmptyField implements HL7Field {
+
+	@Override
+	public String getValue() {
+		return null;
+	}
+
+	@Override
+	public List<HL7Component> getComponents() {
+		return Collections.emptyList();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/HapiField.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/HapiField.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/HapiField.java
new file mode 100644
index 0000000..056b6b6
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/HapiField.java
@@ -0,0 +1,83 @@
+/*
+ * 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.hl7.hapi;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.nifi.hl7.model.HL7Component;
+import org.apache.nifi.hl7.model.HL7Field;
+
+import ca.uhn.hl7v2.model.Composite;
+import ca.uhn.hl7v2.model.ExtraComponents;
+import ca.uhn.hl7v2.model.Primitive;
+import ca.uhn.hl7v2.model.Type;
+import ca.uhn.hl7v2.model.Varies;
+import ca.uhn.hl7v2.parser.EncodingCharacters;
+import ca.uhn.hl7v2.parser.PipeParser;
+
+public class HapiField implements HL7Field, HL7Component {
+	private final String value;
+	private final List<HL7Component> components;
+	
+	public HapiField(final Type type) {
+		this.value = PipeParser.encode(type, EncodingCharacters.defaultInstance());
+		
+		final List<HL7Component> componentList = new ArrayList<>();
+		if ( type instanceof Composite ) {
+			final Composite composite = (Composite) type;
+			
+			for ( final Type component : composite.getComponents() ) {
+				componentList.add(new HapiField(component));
+			}
+		}
+		
+		final ExtraComponents extra = type.getExtraComponents();
+		if ( extra != null && extra.numComponents() > 0 ) {
+			final String singleFieldValue;
+			if ( type instanceof Primitive ) {
+				singleFieldValue = ((Primitive) type).getValue();
+			} else {
+				singleFieldValue = this.value;
+			}
+			componentList.add(new SingleValueField(singleFieldValue));
+			
+			for (int i=0; i < extra.numComponents(); i++) {
+				final Varies varies = extra.getComponent(i);
+				componentList.add(new HapiField(varies));
+			}
+		}
+		
+		this.components = Collections.unmodifiableList(componentList);
+	}
+	
+	@Override
+	public String getValue() {
+		return value;
+	}
+
+	@Override
+	public List<HL7Component> getComponents() {
+		return components;
+	}
+	
+	@Override
+	public String toString() {
+		return value;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/HapiMessage.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/HapiMessage.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/HapiMessage.java
new file mode 100644
index 0000000..ddd28b2
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/HapiMessage.java
@@ -0,0 +1,94 @@
+/*
+ * 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.hl7.hapi;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.nifi.hl7.model.HL7Message;
+import org.apache.nifi.hl7.model.HL7Segment;
+
+import ca.uhn.hl7v2.HL7Exception;
+import ca.uhn.hl7v2.model.Group;
+import ca.uhn.hl7v2.model.Message;
+import ca.uhn.hl7v2.model.Segment;
+import ca.uhn.hl7v2.model.Structure;
+
+public class HapiMessage implements HL7Message {
+	private final Message message;
+	private final List<HL7Segment> allSegments;
+	private final Map<String, List<HL7Segment>> segmentMap;
+	
+	public HapiMessage(final Message message) throws HL7Exception {
+		this.message = message;
+		
+		allSegments = new ArrayList<>();
+		populateSegments(message, allSegments);
+		
+		segmentMap = new HashMap<>();
+		for ( final HL7Segment segment : allSegments ) {
+			final String segmentName = segment.getName();
+			List<HL7Segment> segmentList = segmentMap.get(segmentName);
+			if ( segmentList == null ) {
+				segmentList = new ArrayList<>();
+				segmentMap.put(segmentName, segmentList);
+			}
+			
+			segmentList.add(segment);
+		}
+	}
+	
+	private void populateSegments(final Group group, final List<HL7Segment> segments) throws HL7Exception {
+		for ( final String structureName : group.getNames() ) {
+			final Structure[] structures = group.getAll(structureName);
+			if ( group.isGroup(structureName) ) {
+				for ( final Structure structure : structures ) {
+					populateSegments((Group) structure, segments);
+				}
+			} else {
+				for ( final Structure structure : structures ) {
+					final Segment segment = (Segment) structure;
+					final HapiSegment hapiSegment = new HapiSegment(segment);
+					segments.add(hapiSegment);
+				}
+			}
+		}
+	}
+	
+	@Override
+	public List<HL7Segment> getSegments() {
+		return Collections.unmodifiableList(allSegments);
+	}
+
+	@Override
+	public List<HL7Segment> getSegments(final String segmentType) {
+		final List<HL7Segment> segments = segmentMap.get(segmentType);
+		if ( segments == null ) {
+			return Collections.emptyList();
+		}
+		
+		return Collections.unmodifiableList(segments);
+	}
+
+	@Override
+	public String toString() {
+		return message.toString();
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/HapiSegment.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/HapiSegment.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/HapiSegment.java
new file mode 100644
index 0000000..d50afdb
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/HapiSegment.java
@@ -0,0 +1,69 @@
+/*
+ * 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.hl7.hapi;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.nifi.hl7.model.HL7Field;
+import org.apache.nifi.hl7.model.HL7Segment;
+
+import ca.uhn.hl7v2.HL7Exception;
+import ca.uhn.hl7v2.model.Segment;
+import ca.uhn.hl7v2.model.Type;
+
+public class HapiSegment implements HL7Segment {
+	private final Segment segment;
+	private final List<HL7Field> fields;
+	
+	public HapiSegment(final Segment segment) throws HL7Exception {
+		this.segment = segment;
+		
+		final List<HL7Field> fieldList = new ArrayList<>();
+		for (int i=1; i <= segment.numFields(); i++) {
+			final Type[] types = segment.getField(i);
+
+			if ( types == null || types.length == 0 ) {
+				fieldList.add(new EmptyField());
+				continue;
+			}
+			
+			for ( final Type type : types ) {
+				fieldList.add(new HapiField(type));
+			}
+		}
+		
+		this.fields = Collections.unmodifiableList(fieldList);
+	}
+	
+	
+	@Override
+	public String getName() {
+		return segment.getName();
+	}
+
+	@Override
+	public List<HL7Field> getFields() {
+		return fields;
+	}
+
+	@Override
+	public String toString() {
+		return segment.toString();
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/SingleValueField.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/SingleValueField.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/SingleValueField.java
new file mode 100644
index 0000000..ed99077
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/hapi/SingleValueField.java
@@ -0,0 +1,42 @@
+/*
+ * 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.hl7.hapi;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.nifi.hl7.model.HL7Component;
+import org.apache.nifi.hl7.model.HL7Field;
+
+public class SingleValueField implements HL7Field {
+	private final String value;
+	
+	public SingleValueField(final String value) {
+		this.value = value;
+	}
+	
+	@Override
+	public String getValue() {
+		return value;
+	}
+
+	@Override
+	public List<HL7Component> getComponents() {
+		return Collections.emptyList();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/io/HL7Reader.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/io/HL7Reader.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/io/HL7Reader.java
new file mode 100644
index 0000000..e7b31a4
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/io/HL7Reader.java
@@ -0,0 +1,27 @@
+/*
+ * 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.hl7.io;
+
+import java.io.IOException;
+
+import org.apache.nifi.hl7.model.HL7Message;
+
+public interface HL7Reader {
+
+	HL7Message nextMessage() throws IOException;
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/io/exception/InvalidHL7Exception.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/io/exception/InvalidHL7Exception.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/io/exception/InvalidHL7Exception.java
new file mode 100644
index 0000000..669f40c
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/io/exception/InvalidHL7Exception.java
@@ -0,0 +1,40 @@
+/*
+ * 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.hl7.io.exception;
+
+import java.io.IOException;
+
+public class InvalidHL7Exception extends IOException {
+	private static final long serialVersionUID = -5675416667224562441L;
+
+	public InvalidHL7Exception() {
+		super();
+	}
+
+	public InvalidHL7Exception(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public InvalidHL7Exception(String message) {
+		super(message);
+	}
+
+	public InvalidHL7Exception(Throwable cause) {
+		super(cause);
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Component.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Component.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Component.java
new file mode 100644
index 0000000..cf35504
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Component.java
@@ -0,0 +1,24 @@
+/*
+ * 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.hl7.model;
+
+import java.util.List;
+
+public interface HL7Component {
+	String getValue();
+	List<HL7Component> getComponents();
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Field.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Field.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Field.java
new file mode 100644
index 0000000..4086e58
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Field.java
@@ -0,0 +1,21 @@
+/*
+ * 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.hl7.model;
+
+
+public interface HL7Field extends HL7Component {
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Message.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Message.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Message.java
new file mode 100644
index 0000000..dd9c2a9
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Message.java
@@ -0,0 +1,27 @@
+/*
+ * 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.hl7.model;
+
+import java.util.List;
+
+public interface HL7Message {
+
+	List<HL7Segment> getSegments();
+	
+	List<HL7Segment> getSegments(String segmentType);
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Segment.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Segment.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Segment.java
new file mode 100644
index 0000000..de5aaa1
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/model/HL7Segment.java
@@ -0,0 +1,27 @@
+/*
+ * 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.hl7.model;
+
+import java.util.List;
+
+public interface HL7Segment {
+
+	String getName();
+	
+	List<HL7Field> getFields();
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/Declaration.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/Declaration.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/Declaration.java
new file mode 100644
index 0000000..0903cc8
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/Declaration.java
@@ -0,0 +1,29 @@
+/*
+ * 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.hl7.query;
+
+import org.apache.nifi.hl7.model.HL7Message;
+
+public interface Declaration {
+
+	String getAlias();
+	
+	boolean isRequired();
+	
+	Object getDeclaredValue(HL7Message message);
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/HL7Query.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/HL7Query.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/HL7Query.java
new file mode 100644
index 0000000..a036106
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/HL7Query.java
@@ -0,0 +1,412 @@
+/*
+ * 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.hl7.query;
+
+import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.*;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.antlr.runtime.ANTLRStringStream;
+import org.antlr.runtime.CharStream;
+import org.antlr.runtime.CommonTokenStream;
+import org.antlr.runtime.tree.Tree;
+import org.apache.nifi.hl7.model.HL7Message;
+import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+import org.apache.nifi.hl7.query.evaluator.IntegerEvaluator;
+import org.apache.nifi.hl7.query.evaluator.comparison.EqualsEvaluator;
+import org.apache.nifi.hl7.query.evaluator.comparison.GreaterThanEvaluator;
+import org.apache.nifi.hl7.query.evaluator.comparison.GreaterThanOrEqualEvaluator;
+import org.apache.nifi.hl7.query.evaluator.comparison.IsNullEvaluator;
+import org.apache.nifi.hl7.query.evaluator.comparison.LessThanEvaluator;
+import org.apache.nifi.hl7.query.evaluator.comparison.LessThanOrEqualEvaluator;
+import org.apache.nifi.hl7.query.evaluator.comparison.NotEqualsEvaluator;
+import org.apache.nifi.hl7.query.evaluator.comparison.NotEvaluator;
+import org.apache.nifi.hl7.query.evaluator.comparison.NotNullEvaluator;
+import org.apache.nifi.hl7.query.evaluator.literal.IntegerLiteralEvaluator;
+import org.apache.nifi.hl7.query.evaluator.literal.StringLiteralEvaluator;
+import org.apache.nifi.hl7.query.evaluator.logic.AndEvaluator;
+import org.apache.nifi.hl7.query.evaluator.logic.OrEvaluator;
+import org.apache.nifi.hl7.query.evaluator.message.DeclaredReferenceEvaluator;
+import org.apache.nifi.hl7.query.evaluator.message.DotEvaluator;
+import org.apache.nifi.hl7.query.evaluator.message.MessageEvaluator;
+import org.apache.nifi.hl7.query.evaluator.message.SegmentEvaluator;
+import org.apache.nifi.hl7.query.exception.HL7QueryParsingException;
+import org.apache.nifi.hl7.query.result.MissedResult;
+import org.apache.nifi.hl7.query.result.StandardQueryResult;
+
+import org.apache.nifi.hl7.query.antlr.HL7QueryLexer;
+import org.apache.nifi.hl7.query.antlr.HL7QueryParser;
+
+
+public class HL7Query {
+	private final Tree tree;
+	private final String query;
+	private final Set<Declaration> declarations = new HashSet<>();
+	
+	private final List<Selection> selections;
+	private final BooleanEvaluator whereEvaluator;
+	
+	private HL7Query(final Tree tree, final String query) {
+		this.tree = tree;
+		this.query = query;
+
+		List<Selection> select = null;
+		BooleanEvaluator where = null;
+		for (int i=0; i < tree.getChildCount(); i++) {
+			final Tree child = tree.getChild(i);
+			
+			switch (child.getType()) {
+				case DECLARE:
+					processDeclare(child);
+					break;
+				case SELECT:
+					select = processSelect(child);
+					break;
+				case WHERE:
+					where = processWhere(child);
+					break;
+				default:
+					throw new HL7QueryParsingException("Found unexpected clause at root level: " + tree.getText());
+			}
+		}
+		
+		this.whereEvaluator = where;
+		this.selections = select;
+	}
+	
+	private void processDeclare(final Tree declare) {
+		for (int i=0; i < declare.getChildCount(); i++) {
+			final Tree declarationTree = declare.getChild(i);
+			
+			final String identifier = declarationTree.getChild(0).getText();
+			final Tree requiredOrOptionalTree = declarationTree.getChild(1);
+			final boolean required = requiredOrOptionalTree.getType() == REQUIRED;
+			
+			final String segmentName = declarationTree.getChild(2).getText();
+			
+			final Declaration declaration = new Declaration() {
+				@Override
+				public String getAlias() {
+					return identifier;
+				}
+
+				@Override
+				public boolean isRequired() {
+					return required;
+				}
+
+				@Override
+				public Object getDeclaredValue(final HL7Message message) {
+					if ( message == null ) {
+						return null;
+					}
+					
+					return message.getSegments(segmentName);
+				}
+			};
+			
+			declarations.add(declaration);
+		}
+	}
+
+	private List<Selection> processSelect(final Tree select) {
+		final List<Selection> selections = new ArrayList<>();
+
+		for (int i=0; i < select.getChildCount(); i++) {
+			final Tree selectable = select.getChild(i);
+			
+			final String alias = getSelectedName(selectable);
+			final Evaluator<?> selectionEvaluator = buildReferenceEvaluator(selectable);
+			final Selection selection = new Selection(selectionEvaluator, alias);
+			selections.add(selection);
+		}
+		
+		return selections;
+	}
+	
+	
+	private String getSelectedName(final Tree selectable) {
+		if ( selectable.getChildCount() == 0 ) {
+			return selectable.getText();
+		} else if (selectable.getType() == DOT ) {
+			return getSelectedName(selectable.getChild(0)) + "." + getSelectedName(selectable.getChild(1));
+		} else {
+			return selectable.getChild(selectable.getChildCount() - 1).getText();
+		}
+	}
+	
+
+	private BooleanEvaluator processWhere(final Tree where) {
+		return buildBooleanEvaluator(where.getChild(0));
+	}
+	
+
+	private Evaluator<?> buildReferenceEvaluator(final Tree tree) {
+		switch (tree.getType()) {
+			case MESSAGE:
+				return new MessageEvaluator();
+			case SEGMENT_NAME:
+				return new SegmentEvaluator(new StringLiteralEvaluator(tree.getText()));
+			case IDENTIFIER:
+				return new DeclaredReferenceEvaluator(new StringLiteralEvaluator(tree.getText()));
+			case DOT:
+				final Tree firstChild = tree.getChild(0);
+				final Tree secondChild = tree.getChild(1);
+				return new DotEvaluator(buildReferenceEvaluator(firstChild), buildIntegerEvaluator(secondChild));
+			case STRING_LITERAL:
+				return new StringLiteralEvaluator(tree.getText());
+			case NUMBER:
+				return new IntegerLiteralEvaluator(Integer.parseInt(tree.getText()));
+			default:
+				throw new HL7QueryParsingException("Failed to build evaluator for " + tree.getText());
+		}
+	}
+	
+	
+	private IntegerEvaluator buildIntegerEvaluator(final Tree tree) {
+		switch (tree.getType()) {
+			case NUMBER:
+				return new IntegerLiteralEvaluator(Integer.parseInt(tree.getText()));
+			default:
+				throw new HL7QueryParsingException("Failed to build Integer Evaluator for " + tree.getText());
+		}
+	}
+	
+	
+	private BooleanEvaluator buildBooleanEvaluator(final Tree tree) {
+		// TODO: add Date comparisons
+		// LT/GT/GE/GE should allow for dates based on Field's Type
+		// BETWEEN
+		// DATE('2015/01/01')
+		// DATE('2015/01/01 12:00:00')
+		// DATE('24 HOURS AGO')
+		// DATE('YESTERDAY')
+		
+		switch (tree.getType()) {
+			case EQUALS:
+				return new EqualsEvaluator(buildReferenceEvaluator(tree.getChild(0)), buildReferenceEvaluator(tree.getChild(1)));
+			case NOT_EQUALS:
+				return new NotEqualsEvaluator(buildReferenceEvaluator(tree.getChild(0)), buildReferenceEvaluator(tree.getChild(1)));
+			case GT:
+				return new GreaterThanEvaluator(buildReferenceEvaluator(tree.getChild(0)), buildReferenceEvaluator(tree.getChild(1)));
+			case LT:
+				return new LessThanEvaluator(buildReferenceEvaluator(tree.getChild(0)), buildReferenceEvaluator(tree.getChild(1)));
+			case GE:
+				return new GreaterThanOrEqualEvaluator(buildReferenceEvaluator(tree.getChild(0)), buildReferenceEvaluator(tree.getChild(1)));
+			case LE:
+				return new LessThanOrEqualEvaluator(buildReferenceEvaluator(tree.getChild(0)), buildReferenceEvaluator(tree.getChild(1)));
+			case NOT:
+				return new NotEvaluator(buildBooleanEvaluator(tree.getChild(0)));
+			case AND:
+				return new AndEvaluator(buildBooleanEvaluator(tree.getChild(0)), buildBooleanEvaluator(tree.getChild(1)));
+			case OR:
+				return new OrEvaluator(buildBooleanEvaluator(tree.getChild(0)), buildBooleanEvaluator(tree.getChild(1)));
+			case IS_NULL:
+				return new IsNullEvaluator(buildReferenceEvaluator(tree.getChild(0)));
+			case NOT_NULL:
+				return new NotNullEvaluator(buildReferenceEvaluator(tree.getChild(0)));
+			default:
+				throw new HL7QueryParsingException("Cannot build boolean evaluator for '" + tree.getText() + "'");
+		}
+	}
+	
+	
+	Tree getTree() {
+		return tree;
+	}
+	
+	public String getQuery() {
+		return query;
+	}
+	
+	@Override
+	public String toString() {
+		return "HL7Query[" + query + "]";
+	}
+	
+	public static HL7Query compile(final String query) {
+		try {
+            final CommonTokenStream lexerTokenStream = createTokenStream(query);
+            final HL7QueryParser parser = new HL7QueryParser(lexerTokenStream);
+            final Tree tree = (Tree) parser.query().getTree();
+
+            return new HL7Query(tree, query);
+        } catch (final HL7QueryParsingException e) {
+            throw e;
+        } catch (final Exception e) {
+            throw new HL7QueryParsingException(e);
+        }
+	}
+	
+	private static CommonTokenStream createTokenStream(final String expression) throws HL7QueryParsingException {
+        final CharStream input = new ANTLRStringStream(expression);
+        final HL7QueryLexer lexer = new HL7QueryLexer(input);
+        return new CommonTokenStream(lexer);
+    }
+	
+	public List<Class<?>> getReturnTypes() {
+		final List<Class<?>> returnTypes = new ArrayList<>();
+		
+		for ( final Selection selection : selections ) {
+			returnTypes.add( selection.getEvaluator().getType() );
+		}
+		
+		return returnTypes;
+	}
+	
+	@SuppressWarnings("unchecked")
+	public QueryResult evaluate(final HL7Message message) {
+		
+		int totalIterations = 1;
+		final LinkedHashMap<String, List<Object>> possibleValueMap = new LinkedHashMap<>();
+		for ( final Declaration declaration : declarations ) {
+			final Object value = declaration.getDeclaredValue(message);
+			if ( value == null && declaration.isRequired() ) {
+				return new MissedResult(selections);
+			}
+
+			final List<Object> possibleValues;
+			if ( value instanceof List ) {
+				possibleValues = (List<Object>) value;
+			} else if ( value instanceof Collection ) {
+				possibleValues = new ArrayList<Object>((Collection<Object>) value);
+			} else {
+				possibleValues = new ArrayList<>(1);
+				possibleValues.add(value);
+			}
+			
+			if ( possibleValues.isEmpty() ) {
+				return new MissedResult(selections);
+			}
+			
+			possibleValueMap.put(declaration.getAlias(), possibleValues);
+			totalIterations *= possibleValues.size();
+		}
+
+		final Set<Map<String, Object>> resultSet = new HashSet<>();
+		for (int i=0; i < totalIterations; i++) {
+			final Map<String, Object> aliasValues = assignAliases(possibleValueMap, i);
+
+			aliasValues.put(Evaluator.MESSAGE_KEY, message);
+			if (whereEvaluator == null || Boolean.TRUE.equals(whereEvaluator.evaluate(aliasValues))) {
+				final Map<String, Object> resultMap = new HashMap<>();
+
+				for ( final Selection selection : selections ) {
+					final Object value = selection.getEvaluator().evaluate(aliasValues);
+					resultMap.put(selection.getName(), value);
+				}
+				
+				resultSet.add(resultMap);
+			}
+		}
+		
+//		for ( final Declaration declaration : declarations ) {
+//			final Object value = declaration.getDeclaredValue(message);
+//			if ( value == null && declaration.isRequired() ) {
+//				return new MissedResult(selections);
+//			}
+//			objectMap.put(declaration.getAlias(), value);
+//		}
+//		
+//		if (whereEvaluator == null || Boolean.TRUE.equals(whereEvaluator.evaluate(objectMap))) {
+//			for ( final Selection selection : selections ) {
+//				final Object value = selection.getEvaluator().evaluate(objectMap);
+//				resultMap.put(selection.getName(), value);
+//			}
+//		} else {
+//			return new MissedResult(selections);
+//		}
+		
+		return new StandardQueryResult(selections, resultSet);
+	}
+	
+	
+	// assigns one of the possible values to each alias, based on which iteration this is.
+	// require LinkedHashMap just to be very clear and explicit that the order of the Map MUST be guaranteed
+	// between multiple invocations of this method.
+	// package protected for testing visibility
+//	static Map<String, Object> assignAliases(final LinkedHashMap<String, List<Object>> possibleValues, final int iteration) {
+//		final Map<String, Object> aliasMap = new HashMap<>();
+//		
+//		int aliasIndex = possibleValues.size() - 1;
+//		for ( final Map.Entry<String, List<Object>> entry : possibleValues.entrySet() ) {
+//			final String alias = entry.getKey();
+//			final List<Object> validValues = entry.getValue();
+//
+//			final int validValueIndex;
+//			if (aliasIndex > 0) {
+//				validValueIndex = iteration / aliasIndex;
+//			} else {
+//				validValueIndex = iteration;
+//			}
+//			
+//			final Object obj = validValues.get(validValueIndex % validValues.size());
+//			aliasMap.put(alias, obj);
+//			
+//			aliasIndex--;
+//		}
+//		
+//		return aliasMap;
+//	}
+//	
+	
+	static Map<String, Object> assignAliases(final LinkedHashMap<String, List<Object>> possibleValues, final int iteration) {
+		final Map<String, Object> aliasMap = new HashMap<>();
+		
+		int divisor = 1;
+		for ( final Map.Entry<String, List<Object>> entry : possibleValues.entrySet() ) {
+			final String alias = entry.getKey();
+			final List<Object> validValues = entry.getValue();
+
+			final int idx = (iteration / divisor) % validValues.size();
+			final Object obj = validValues.get(idx);
+			aliasMap.put(alias, obj);
+			
+			divisor *= validValues.size();
+		}
+		
+		return aliasMap;
+	}
+	
+	public String toTreeString() {
+		final StringBuilder sb = new StringBuilder();
+		toTreeString(tree, sb, 0);
+		return sb.toString();
+	}
+	
+	private void toTreeString(final Tree tree, final StringBuilder sb, final int indentLevel) {
+		final String nodeName = tree.getText();
+		for (int i=0; i < indentLevel; i++) {
+			sb.append(" ");
+		}
+		sb.append(nodeName);
+		sb.append("\n");
+		
+		for (int i=0; i < tree.getChildCount(); i++) {
+			final Tree child = tree.getChild(i);
+			toTreeString(child, sb, indentLevel + 2);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/QueryResult.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/QueryResult.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/QueryResult.java
new file mode 100644
index 0000000..b198bc7
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/QueryResult.java
@@ -0,0 +1,29 @@
+/*
+ * 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.hl7.query;
+
+import java.util.List;
+
+public interface QueryResult {
+	boolean isMatch();
+	
+	List<String> getLabels();
+	
+	int getHitCount();
+	
+	ResultHit nextHit();
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/ResultHit.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/ResultHit.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/ResultHit.java
new file mode 100644
index 0000000..ee97e5d
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/ResultHit.java
@@ -0,0 +1,25 @@
+/*
+ * 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.hl7.query;
+
+import java.util.Map;
+
+public interface ResultHit {
+	Object getValue(String label);
+	
+	Map<String, Object> getSelectedValues();
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/Selection.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/Selection.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/Selection.java
new file mode 100644
index 0000000..36a181f
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/Selection.java
@@ -0,0 +1,37 @@
+/*
+ * 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.hl7.query;
+
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+
+public class Selection {
+	private final Evaluator<?> evaluator;
+	private final String name;
+	
+	public Selection(final Evaluator<?> evaluator, final String name) {
+		this.evaluator = evaluator;
+		this.name = name;
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	public Evaluator<?> getEvaluator() {
+		return evaluator;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/BooleanEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/BooleanEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/BooleanEvaluator.java
new file mode 100644
index 0000000..fdd807e
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/BooleanEvaluator.java
@@ -0,0 +1,24 @@
+/*
+ * 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.hl7.query.evaluator;
+
+public abstract class BooleanEvaluator implements Evaluator<Boolean> {
+
+	public Class<? extends Boolean> getType() {
+		return Boolean.class;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/Evaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/Evaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/Evaluator.java
new file mode 100644
index 0000000..d86c30e
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/Evaluator.java
@@ -0,0 +1,27 @@
+/*
+ * 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.hl7.query.evaluator;
+
+import java.util.Map;
+
+public interface Evaluator<T> {
+	public static final String MESSAGE_KEY = "message";
+	
+	T evaluate(Map<String, Object> objectMap);
+	
+	Class<? extends T> getType();
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/IntegerEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/IntegerEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/IntegerEvaluator.java
new file mode 100644
index 0000000..6afa9ed
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/IntegerEvaluator.java
@@ -0,0 +1,26 @@
+/*
+ * 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.hl7.query.evaluator;
+
+
+public abstract class IntegerEvaluator implements Evaluator<Integer> {
+
+	public Class<? extends Integer> getType() {
+		return Integer.class;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/StringEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/StringEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/StringEvaluator.java
new file mode 100644
index 0000000..5f73649
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/StringEvaluator.java
@@ -0,0 +1,25 @@
+/*
+ * 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.hl7.query.evaluator;
+
+public abstract class StringEvaluator implements Evaluator<String> {
+
+	public Class<? extends String> getType() {
+		return String.class;
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/AbstractComparisonEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/AbstractComparisonEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/AbstractComparisonEvaluator.java
new file mode 100644
index 0000000..a7fa1b7
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/AbstractComparisonEvaluator.java
@@ -0,0 +1,106 @@
+/*
+ * 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.hl7.query.evaluator.comparison;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.nifi.hl7.model.HL7Field;
+import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+
+public abstract class AbstractComparisonEvaluator extends BooleanEvaluator {
+	private final Evaluator<?> lhs;
+	private final Evaluator<?> rhs;
+	
+	public AbstractComparisonEvaluator(final Evaluator<?> lhs, final Evaluator<?> rhs) {
+		this.lhs = lhs;
+		this.rhs = rhs;
+	}
+	
+	public final Boolean evaluate(final Map<String, Object> objectMap) {
+		final Object lhsValue = lhs.evaluate(objectMap);
+		if ( lhsValue == null ) {
+			return false;
+		}
+		
+		final Object rhsValue = rhs.evaluate(objectMap);
+		if ( rhsValue == null ) {
+			return false;
+		}
+		
+		return compareRaw(lhsValue, rhsValue);
+	}
+	
+	
+	private Boolean compareRaw(Object lhsValue, Object rhsValue) {
+		if ( lhsValue == null || rhsValue == null ) {
+			return false;
+		}
+
+		if ( lhsValue instanceof HL7Field ) {
+			lhsValue = ((HL7Field) lhsValue).getValue();
+		}
+		
+		if ( rhsValue instanceof HL7Field ) {
+			rhsValue = ((HL7Field) rhsValue).getValue();
+		}
+
+		if ( lhsValue == null || rhsValue == null ) {
+			return false;
+		}
+		
+		// both are collections, and compare(lhsValue, rhsValue) is false.
+		// this would be the case, for instance, if we compared field 1 of one segment to 
+		// a field in another segment, and both fields had components.
+		if ( lhsValue instanceof Collection && rhsValue instanceof Collection ) {
+			return false;
+		}
+		
+		// if one side is a collection but the other is not, check if any element in that
+		// collection compares to the other element in a way that satisfies the condition.
+		// this would happen, for instance, if we check Segment1.Field5 = 'X' and field 5 repeats
+		// with a value "A~B~C~X~Y~Z"; in this case we do want to consider Field 5 = X as true.
+		if ( lhsValue instanceof Collection ) {
+			for ( final Object lhsObject : (Collection<?>) lhsValue ) {
+				if ( compareRaw(lhsObject, rhsValue) ) {
+					return true;
+				}
+			}
+			
+			return false;
+		}
+		
+		if ( rhsValue instanceof Collection ) {
+			for ( final Object rhsObject : (Collection<?>) rhsValue ) {
+				if ( compareRaw(rhsObject, lhsValue) ) {
+					return true;
+				}
+			}
+			
+			return false;
+		}
+		
+		if ( lhsValue != null && rhsValue != null && compare(lhsValue, rhsValue) ) {
+			return true;
+		}
+		
+		return false;
+	}
+	
+	protected abstract boolean compare(Object lhs, Object rhs);
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/AbstractNumericComparison.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/AbstractNumericComparison.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/AbstractNumericComparison.java
new file mode 100644
index 0000000..2529c49
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/AbstractNumericComparison.java
@@ -0,0 +1,67 @@
+/*
+ * 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.hl7.query.evaluator.comparison;
+
+import java.util.regex.Pattern;
+
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+
+public abstract class AbstractNumericComparison extends AbstractComparisonEvaluator {
+	private static final Pattern NUMERIC_PATTERN = Pattern.compile("\\d+(\\.\\d+)?");
+	
+	public AbstractNumericComparison(final Evaluator<?> lhs, final Evaluator<?> rhs) {
+		super(lhs, rhs);
+	}
+	
+	@Override
+	protected final boolean compare(final Object lhs, final Object rhs) {
+		final Double lhsDouble = toDouble(lhs);
+		if ( lhsDouble == null ) {
+			return false;
+		}
+		
+		final Double rhsDouble = toDouble(rhs);
+		if ( rhsDouble == null ) {
+			return false;
+		}
+		
+		return compareNumbers(lhsDouble, rhsDouble);
+	}
+
+	private Double toDouble(final Object value) {
+		if ( value == null ) {
+			return null;
+		}
+		
+		if ( value instanceof Double ) {
+			return (Double) value;
+		}
+		if ( value instanceof Number ) {
+			return ((Number) value).doubleValue();
+		}
+		
+		if ( value instanceof String ) {
+			if ( NUMERIC_PATTERN.matcher((String) value).matches() ) {
+				return Double.parseDouble((String) value);
+			}
+		}
+		
+		return null;
+	}
+	
+	protected abstract boolean compareNumbers(final Double lhs, final Double rhs);
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/EqualsEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/EqualsEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/EqualsEvaluator.java
new file mode 100644
index 0000000..7ee2f87
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/EqualsEvaluator.java
@@ -0,0 +1,32 @@
+/*
+ * 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.hl7.query.evaluator.comparison;
+
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+
+public class EqualsEvaluator extends AbstractComparisonEvaluator {
+
+	public EqualsEvaluator(final Evaluator<?> lhs, final Evaluator<?> rhs) {
+		super(lhs, rhs);
+	}
+	
+	@Override
+	protected boolean compare(final Object lhs, final Object rhs) {
+		return lhs != null && rhs != null && ((lhs == rhs) || (lhs.equals(rhs)) || lhs.toString().equals(rhs.toString()));
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/GreaterThanEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/GreaterThanEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/GreaterThanEvaluator.java
new file mode 100644
index 0000000..bf8596e
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/GreaterThanEvaluator.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.hl7.query.evaluator.comparison;
+
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+
+
+public class GreaterThanEvaluator extends AbstractNumericComparison {
+
+	public GreaterThanEvaluator(final Evaluator<?> lhs, final Evaluator<?> rhs) {
+		super(lhs, rhs);
+	}
+
+	@Override
+	protected boolean compareNumbers(final Double lhs, final Double rhs) {
+		return lhs > rhs;
+	}
+
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/GreaterThanOrEqualEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/GreaterThanOrEqualEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/GreaterThanOrEqualEvaluator.java
new file mode 100644
index 0000000..69115a3
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/GreaterThanOrEqualEvaluator.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.hl7.query.evaluator.comparison;
+
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+
+
+public class GreaterThanOrEqualEvaluator extends AbstractNumericComparison {
+
+	public GreaterThanOrEqualEvaluator(final Evaluator<?> lhs, final Evaluator<?> rhs) {
+		super(lhs, rhs);
+	}
+
+	@Override
+	protected boolean compareNumbers(final Double lhs, final Double rhs) {
+		return lhs >= rhs;
+	}
+
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/IsNullEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/IsNullEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/IsNullEvaluator.java
new file mode 100644
index 0000000..69d481e
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/IsNullEvaluator.java
@@ -0,0 +1,69 @@
+/*
+ * 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.hl7.query.evaluator.comparison;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.nifi.hl7.model.HL7Component;
+import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+
+public class IsNullEvaluator extends BooleanEvaluator {
+	private final Evaluator<?> subjectEvaluator;
+	
+	public IsNullEvaluator(final Evaluator<?> subjectEvaluator) {
+		this.subjectEvaluator = subjectEvaluator;
+	}
+	
+	@Override
+	public Boolean evaluate(final Map<String, Object> objectMap) {
+		Object subjectValue = subjectEvaluator.evaluate(objectMap);
+		if ( subjectValue == null ) {
+			return true;
+		}
+		
+		return isNull(subjectValue);
+	}
+
+	private boolean isNull(Object subjectValue) {
+		if ( subjectValue == null ) {
+			return true;
+		}
+		
+		if ( subjectValue instanceof HL7Component ) {
+			subjectValue = ((HL7Component) subjectValue).getValue();
+		}
+		
+		if ( subjectValue instanceof Collection ) {
+			final Collection<?> collection = (Collection<?>) subjectValue;
+			if ( collection.isEmpty() ) {
+				return true;
+			}
+			
+			for ( final Object obj : collection ) {
+				if ( !isNull(obj) ) {
+					return false;
+				}
+			}
+			
+			return true;
+		}
+		
+		return subjectValue == null;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/LessThanEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/LessThanEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/LessThanEvaluator.java
new file mode 100644
index 0000000..891d5e4
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/LessThanEvaluator.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.hl7.query.evaluator.comparison;
+
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+
+public class LessThanEvaluator extends AbstractNumericComparison {
+	public LessThanEvaluator(final Evaluator<?> lhs, final Evaluator<?> rhs) {
+		super(lhs, rhs);
+	}
+
+	@Override
+	protected boolean compareNumbers(final Double lhs, final Double rhs) {
+		return lhs < rhs;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/LessThanOrEqualEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/LessThanOrEqualEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/LessThanOrEqualEvaluator.java
new file mode 100644
index 0000000..c6fb097
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/LessThanOrEqualEvaluator.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.hl7.query.evaluator.comparison;
+
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+
+public class LessThanOrEqualEvaluator extends AbstractNumericComparison {
+	public LessThanOrEqualEvaluator(final Evaluator<?> lhs, final Evaluator<?> rhs) {
+		super(lhs, rhs);
+	}
+
+	@Override
+	protected boolean compareNumbers(final Double lhs, final Double rhs) {
+		return lhs <= rhs;
+	}
+
+}


[50/50] [abbrv] incubator-nifi git commit: NIFI-271 Merged with latest develop. Rebase seemed to dangerous in this case. Does not build yet.

Posted by jo...@apache.org.
NIFI-271 Merged with latest develop.  Rebase seemed to dangerous in this case.  Does not build yet.


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8a296aac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8a296aac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8a296aac

Branch: refs/heads/NIFI-271
Commit: 8a296aacc956cf967406626e9ce0ae296b71c4e2
Parents: 3c3306b 53b6ac3
Author: joewitt <jo...@apache.org>
Authored: Sun Apr 19 23:12:22 2015 -0400
Committer: joewitt <jo...@apache.org>
Committed: Sun Apr 19 23:12:22 2015 -0400

----------------------------------------------------------------------
 nifi-nar-maven-plugin/pom.xml                   |    2 +-
 nifi-parent/pom.xml                             |    2 +-
 .../nifi/annotation/lifecycle/OnAdded.java      |   13 +-
 .../nifi/annotation/lifecycle/OnDisabled.java   |   29 +-
 .../nifi/annotation/lifecycle/OnEnabled.java    |   34 +-
 .../nifi/annotation/lifecycle/OnRemoved.java    |   14 +-
 .../nifi/annotation/lifecycle/OnShutdown.java   |   13 +-
 .../nifi/annotation/lifecycle/OnStopped.java    |    9 +
 .../annotation/lifecycle/OnUnscheduled.java     |    2 -
 .../AbstractConfigurableComponent.java          |    5 +-
 .../nifi/components/PropertyDescriptor.java     |   14 +-
 .../nifi/components/ValidationContext.java      |   28 +
 .../controller/AbstractControllerService.java   |   13 +-
 .../ControllerServiceInitializationContext.java |   10 +
 .../controller/ControllerServiceLookup.java     |   19 +
 .../org/apache/nifi/logging/ComponentLog.java   |  100 +
 .../org/apache/nifi/logging/ProcessorLog.java   |   61 +-
 .../nifi/reporting/AbstractReportingTask.java   |   10 +
 .../ReportingInitializationContext.java         |   10 +
 .../nifi/web/ClusterRequestException.java       |    1 +
 .../org/apache/nifi/web/ComponentDetails.java   |  157 ++
 .../apache/nifi/web/ConfigurationAction.java    |  137 ++
 .../nifi/web/NiFiWebConfigurationContext.java   |  102 +
 .../web/NiFiWebConfigurationRequestContext.java |   31 +
 .../org/apache/nifi/web/NiFiWebContext.java     |    1 +
 .../apache/nifi/web/NiFiWebContextConfig.java   |    1 +
 .../apache/nifi/web/NiFiWebRequestContext.java  |   58 +
 .../nifi/web/ProcessorConfigurationAction.java  |    1 +
 .../java/org/apache/nifi/web/ProcessorInfo.java |    1 +
 .../main/java/org/apache/nifi/web/Revision.java |   32 +-
 .../org/apache/nifi/web/UiExtensionType.java    |   31 +
 .../org/apache/nifi/web/ViewableContent.java    |   74 +
 nifi/nifi-assembly/NOTICE                       |   65 +
 nifi/nifi-assembly/pom.xml                      |  928 +++++-----
 .../nifi-hl7-query-language/.gitignore          |    3 +
 .../nifi-hl7-query-language/pom.xml             |  122 ++
 .../apache/nifi/hl7/query/antlr/HL7QueryLexer.g |  173 ++
 .../nifi/hl7/query/antlr/HL7QueryParser.g       |  108 ++
 .../org/apache/nifi/hl7/hapi/EmptyField.java    |   37 +
 .../org/apache/nifi/hl7/hapi/HapiField.java     |   83 +
 .../org/apache/nifi/hl7/hapi/HapiMessage.java   |   94 +
 .../org/apache/nifi/hl7/hapi/HapiSegment.java   |   69 +
 .../apache/nifi/hl7/hapi/SingleValueField.java  |   42 +
 .../java/org/apache/nifi/hl7/io/HL7Reader.java  |   27 +
 .../hl7/io/exception/InvalidHL7Exception.java   |   40 +
 .../org/apache/nifi/hl7/model/HL7Component.java |   24 +
 .../org/apache/nifi/hl7/model/HL7Field.java     |   21 +
 .../org/apache/nifi/hl7/model/HL7Message.java   |   27 +
 .../org/apache/nifi/hl7/model/HL7Segment.java   |   27 +
 .../org/apache/nifi/hl7/query/Declaration.java  |   29 +
 .../org/apache/nifi/hl7/query/HL7Query.java     |  412 +++++
 .../org/apache/nifi/hl7/query/QueryResult.java  |   29 +
 .../org/apache/nifi/hl7/query/ResultHit.java    |   25 +
 .../org/apache/nifi/hl7/query/Selection.java    |   37 +
 .../hl7/query/evaluator/BooleanEvaluator.java   |   24 +
 .../nifi/hl7/query/evaluator/Evaluator.java     |   27 +
 .../hl7/query/evaluator/IntegerEvaluator.java   |   26 +
 .../hl7/query/evaluator/StringEvaluator.java    |   25 +
 .../comparison/AbstractComparisonEvaluator.java |  106 ++
 .../comparison/AbstractNumericComparison.java   |   67 +
 .../evaluator/comparison/EqualsEvaluator.java   |   32 +
 .../comparison/GreaterThanEvaluator.java        |   34 +
 .../comparison/GreaterThanOrEqualEvaluator.java |   34 +
 .../evaluator/comparison/IsNullEvaluator.java   |   69 +
 .../evaluator/comparison/LessThanEvaluator.java |   31 +
 .../comparison/LessThanOrEqualEvaluator.java    |   31 +
 .../comparison/NotEqualsEvaluator.java          |   32 +
 .../evaluator/comparison/NotEvaluator.java      |   36 +
 .../evaluator/comparison/NotNullEvaluator.java  |   65 +
 .../literal/IntegerLiteralEvaluator.java        |   36 +
 .../literal/StringLiteralEvaluator.java         |   35 +
 .../hl7/query/evaluator/logic/AndEvaluator.java |   43 +
 .../hl7/query/evaluator/logic/OrEvaluator.java  |   43 +
 .../message/DeclaredReferenceEvaluator.java     |   42 +
 .../query/evaluator/message/DotEvaluator.java   |   88 +
 .../query/evaluator/message/FieldEvaluator.java |   67 +
 .../evaluator/message/MessageEvaluator.java     |   34 +
 .../evaluator/message/SegmentEvaluator.java     |   51 +
 .../exception/HL7QueryParsingException.java     |   37 +
 .../nifi/hl7/query/result/MissedResult.java     |   56 +
 .../hl7/query/result/StandardQueryResult.java   |   69 +
 .../hl7/query/result/StandardResultHit.java     |   41 +
 .../org/apache/nifi/hl7/query/TestHL7Query.java |  310 ++++
 .../src/test/resources/hyperglycemia            |    5 +
 .../src/test/resources/hypoglycemia             |    5 +
 .../nifi/processor/util/StandardValidators.java |   94 +-
 .../processor/util/TestStandardValidators.java  |   34 +-
 .../org/apache/nifi/util/NiFiProperties.java    |    2 -
 .../client/socket/EndpointConnectionPool.java   |   59 +-
 .../nifi/remote/client/socket/SocketClient.java |    9 +-
 .../protocol/socket/SocketClientProtocol.java   |    8 +-
 .../socket/SocketClientTransaction.java         |   25 +-
 .../socket/TestEndpointConnectionStatePool.java |    4 +-
 .../java/org/apache/nifi/util/EscapeUtils.java  |   42 +
 nifi/nifi-commons/pom.xml                       |    1 +
 .../src/main/asciidoc/administration-guide.adoc |   21 +-
 .../images/add-controller-service-window.png    |  Bin 0 -> 155417 bytes
 .../configure-controller-service-properties.png |  Bin 0 -> 107830 bytes
 .../configure-controller-service-settings.png   |  Bin 0 -> 79718 bytes
 .../configure-reporting-task-properties.png     |  Bin 0 -> 58292 bytes
 .../configure-reporting-task-settings.png       |  Bin 0 -> 80213 bytes
 .../images/controller-services-edit-buttons.png |  Bin 0 -> 5049 bytes
 .../asciidoc/images/controller-services-tab.png |  Bin 0 -> 166310 bytes
 .../images/controller-settings-button.png       |  Bin 0 -> 32341 bytes
 .../images/create-service-ssl-context.png       |  Bin 0 -> 142764 bytes
 .../images/reporting-tasks-edit-buttons.png     |  Bin 0 -> 5049 bytes
 .../asciidoc/images/reporting-tasks-tab.png     |  Bin 0 -> 158876 bytes
 .../asciidoc/images/settings-general-tab.png    |  Bin 0 -> 129148 bytes
 .../nifi-docs/src/main/asciidoc/user-guide.adoc |   98 +-
 .../META-INF/maven/archetype-metadata.xml       |    2 +-
 .../src/main/java/MyProcessor.java              |    8 +
 .../docs/__package__.MyProcessor/index.html     |   96 -
 ...kControllerServiceInitializationContext.java |   17 +
 .../nifi/util/MockControllerServiceLookup.java  |   11 +
 .../MockProcessorInitializationContext.java     |   10 +
 .../org/apache/nifi/util/MockProcessorLog.java  |   34 +-
 .../MockReportingInitializationContext.java     |   10 +-
 .../apache/nifi/util/MockValidationContext.java |   42 +
 .../nifi/util/StandardProcessorTestRunner.java  |    9 +-
 .../nifi-aws-bundle/nifi-aws-nar/pom.xml        |   36 +
 .../nifi-aws-bundle/nifi-aws-processors/pom.xml |   58 +
 .../processors/aws/AbstractAWSProcessor.java    |  195 ++
 .../processors/aws/s3/AbstractS3Processor.java  |  171 ++
 .../nifi/processors/aws/s3/FetchS3Object.java   |  157 ++
 .../nifi/processors/aws/s3/PutS3Object.java     |  181 ++
 .../aws/sns/AbstractSNSProcessor.java           |   60 +
 .../apache/nifi/processors/aws/sns/PutSNS.java  |  155 ++
 .../aws/sqs/AbstractSQSProcessor.java           |   51 +
 .../nifi/processors/aws/sqs/DeleteSQS.java      |   95 +
 .../apache/nifi/processors/aws/sqs/GetSQS.java  |  204 ++
 .../apache/nifi/processors/aws/sqs/PutSQS.java  |  147 ++
 .../org.apache.nifi.processor.Processor         |   20 +
 .../processors/aws/s3/TestFetchS3Object.java    |   44 +
 .../nifi/processors/aws/s3/TestPutS3Object.java |   87 +
 .../nifi/processors/aws/sns/TestPutSNS.java     |   34 +
 .../nifi/processors/aws/sqs/TestGetSQS.java     |   32 +
 .../nifi/processors/aws/sqs/TestPutSQS.java     |   35 +
 .../src/test/resources/hello.txt                |    1 +
 nifi/nifi-nar-bundles/nifi-aws-bundle/pom.xml   |   43 +
 .../org/apache/nifi/admin/dao/ActionDAO.java    |    6 +-
 .../nifi/admin/dao/impl/StandardActionDAO.java  |   60 +-
 .../apache/nifi/admin/service/AuditService.java |    6 +-
 .../admin/service/action/GetPreviousValues.java |    8 +-
 .../service/impl/StandardAuditService.java      |    4 +-
 .../nifi/web/api/dto/ComponentHistoryDTO.java   |   56 +
 .../web/api/dto/ControllerConfigurationDTO.java |   18 +
 .../nifi/web/api/dto/ControllerServiceDTO.java  |  190 ++
 ...ontrollerServiceReferencingComponentDTO.java |  207 +++
 .../nifi/web/api/dto/DocumentedTypeDTO.java     |    6 +-
 .../apache/nifi/web/api/dto/FlowSnippetDTO.java |   15 +-
 .../nifi/web/api/dto/NiFiComponentDTO.java      |    4 +-
 .../nifi/web/api/dto/ProcessorConfigDTO.java    |  218 +--
 .../nifi/web/api/dto/ProcessorHistoryDTO.java   |   56 -
 .../nifi/web/api/dto/PropertyDescriptorDTO.java |  244 +++
 .../nifi/web/api/dto/ReportingTaskDTO.java      |  228 +++
 .../apache/nifi/web/api/dto/RevisionDTO.java    |   15 +
 .../component/details/ComponentDetailsDTO.java  |    2 +-
 .../component/details/ExtensionDetailsDTO.java  |   41 +
 .../component/details/ProcessorDetailsDTO.java  |   41 -
 .../web/api/entity/ComponentHistoryEntity.java  |   45 +
 .../web/api/entity/ControllerServiceEntity.java |   45 +
 ...ollerServiceReferencingComponentsEntity.java |   46 +
 .../entity/ControllerServiceTypesEntity.java    |   46 +
 .../api/entity/ControllerServicesEntity.java    |   46 +
 .../web/api/entity/ProcessorHistoryEntity.java  |   45 -
 .../api/entity/PropertyDescriptorEntity.java    |   46 +
 .../web/api/entity/ReportingTaskEntity.java     |   45 +
 .../api/entity/ReportingTaskTypesEntity.java    |   46 +
 .../web/api/entity/ReportingTasksEntity.java    |   46 +
 .../nifi-framework/nifi-documentation/pom.xml   |    8 -
 .../html/HtmlDocumentationWriter.java           |   49 +-
 .../html/HtmlProcessorDocumentationWriter.java  |   20 +-
 ...kControllerServiceInitializationContext.java |    6 +
 .../mock/MockControllerServiceLookup.java       |   10 +
 .../MockReportingInitializationContext.java     |    8 +-
 .../html/HtmlDocumentationWriterTest.java       |    8 +
 .../nifi-framework-cluster-web/pom.xml          |    4 -
 .../context/ClusterContextThreadLocal.java      |    7 +-
 .../ClusterAwareOptimisticLockingManager.java   |   96 -
 .../nifi-framework-cluster/pom.xml              |    4 +
 .../nifi/cluster/flow/ClusterDataFlow.java      |   15 +-
 .../cluster/flow/DataFlowManagementService.java |   17 +
 .../nifi/cluster/flow/impl/DataFlowDaoImpl.java |   43 +-
 .../impl/DataFlowManagementServiceImpl.java     |   65 +-
 .../nifi/cluster/manager/NodeResponse.java      |   14 +
 .../cluster/manager/impl/WebClusterManager.java |  929 ++++++++--
 .../spring/WebClusterManagerFactoryBean.java    |   23 +-
 .../resources/nifi-cluster-manager-context.xml  |    4 +
 .../nifi-framework-core-api/.gitignore          |    1 +
 .../controller/AbstractConfiguredComponent.java |   18 +-
 .../apache/nifi/controller/Availability.java    |   24 -
 .../nifi/controller/ProcessScheduler.java       |   27 +-
 .../apache/nifi/controller/ProcessorNode.java   |   16 +
 .../nifi/controller/ReportingTaskNode.java      |   26 +-
 .../controller/ValidationContextFactory.java    |    4 +
 .../exception/ComponentLifeCycleException.java  |   30 +
 ...ControllerServiceInstantiationException.java |   51 +
 .../ControllerServiceNotFoundException.java     |   51 -
 .../exception/ProcessorLifeCycleException.java  |   30 -
 .../reporting/ReportingTaskProvider.java        |  103 ++
 .../service/ControllerServiceNode.java          |   39 +-
 .../service/ControllerServiceProvider.java      |   83 +-
 .../service/ControllerServiceReference.java     |    7 +-
 .../service/ControllerServiceState.java         |   45 +
 .../apache/nifi/controller/FlowController.java  |  211 ++-
 .../nifi/controller/FlowFromDOMFactory.java     |   60 +-
 .../nifi/controller/StandardFlowSerializer.java |   68 +-
 .../nifi/controller/StandardFlowService.java    |    9 +-
 .../controller/StandardFlowSynchronizer.java    |  236 ++-
 .../nifi/controller/StandardProcessorNode.java  |   47 +-
 .../apache/nifi/controller/TemplateManager.java |   33 +-
 .../reporting/AbstractReportingTaskNode.java    |   76 +-
 .../reporting/StandardReportingContext.java     |   11 +
 .../StandardReportingInitializationContext.java |   23 +-
 .../repository/FileSystemRepository.java        |   78 +-
 .../repository/StandardRepositoryRecord.java    |   15 +-
 .../scheduling/StandardProcessScheduler.java    |  210 ++-
 .../service/ControllerServiceLoader.java        |  149 +-
 ...dControllerServiceInitializationContext.java |   20 +-
 .../service/StandardControllerServiceNode.java  |  128 +-
 .../StandardControllerServiceProvider.java      |  460 ++++-
 .../StandardControllerServiceReference.java     |   19 +-
 .../tasks/ContinuallyRunConnectableTask.java    |   17 +-
 .../controller/tasks/ReportingTaskWrapper.java  |   29 +-
 .../nifi/fingerprint/FingerprintFactory.java    |   79 +
 .../nifi/groups/StandardProcessGroup.java       |   32 +-
 .../nifi/persistence/FlowConfigurationDAO.java  |   25 -
 .../StandardXMLFlowConfigurationDAO.java        |  191 +-
 .../nifi/processor/SimpleProcessLogger.java     |   38 +-
 .../nifi/processor/StandardProcessContext.java  |   10 +
 .../processor/StandardSchedulingContext.java    |    5 +-
 .../processor/StandardValidationContext.java    |   37 +-
 .../StandardValidationContextFactory.java       |    5 +
 .../java/org/apache/nifi/util/DomUtils.java     |   10 +
 .../ControllerServiceConfiguration.xsd          |   61 -
 .../src/main/resources/FlowConfiguration.xsd    |   49 +-
 .../resources/ReportingTaskConfiguration.xsd    |   87 -
 .../StandardControllerServiceProviderTest.java  |   71 +
 .../TestStandardControllerServiceProvider.java  |  385 ++++
 .../controller/service/mock/DummyProcessor.java |   49 +
 .../nifi/controller/service/mock/ServiceA.java  |   49 +
 .../nifi/controller/service/mock/ServiceB.java  |   23 +
 .../service/util/TestControllerService.java     |   61 +
 .../processor/TestStandardPropertyValue.java    |   11 +-
 ...org.apache.nifi.controller.ControllerService |   15 +
 .../nifi-framework/nifi-nar-utils/.gitignore    |    1 +
 .../main/resources/conf/controller-services.xml |   18 -
 .../src/main/resources/conf/nifi.properties     |    2 -
 .../src/main/resources/conf/reporting-tasks.xml |   49 -
 .../nifi/remote/StandardRemoteGroupPort.java    |    6 +-
 .../nifi/remote/StandardRootGroupPort.java      |   11 +-
 .../java/org/apache/nifi/action/Component.java  |    4 +-
 .../component/details/ExtensionDetails.java     |   34 +
 .../component/details/ProcessorDetails.java     |   34 -
 .../HttpServletConfigurationRequestContext.java |   56 +
 .../nifi/web/HttpServletRequestContext.java     |  100 +
 .../web/HttpServletRequestContextConfig.java    |    1 +
 .../nifi-framework/nifi-web/nifi-jetty/pom.xml  |   15 +
 .../org/apache/nifi/web/server/JettyServer.java |  282 ++-
 .../nifi-web/nifi-ui-extension/pom.xml          |   21 +
 .../apache/nifi/ui/extension/UiExtension.java   |   52 +
 .../nifi/ui/extension/UiExtensionMapping.java   |   52 +
 .../nifi-web/nifi-web-api/pom.xml               |   10 +
 .../nifi/audit/ControllerServiceAuditor.java    |  475 +++++
 .../org/apache/nifi/audit/FunnelAuditor.java    |    8 +-
 .../java/org/apache/nifi/audit/NiFiAuditor.java |   11 +-
 .../java/org/apache/nifi/audit/PortAuditor.java |   17 +-
 .../apache/nifi/audit/ProcessGroupAuditor.java  |   18 +-
 .../org/apache/nifi/audit/ProcessorAuditor.java |   20 +-
 .../apache/nifi/audit/RelationshipAuditor.java  |   18 +-
 .../nifi/audit/RemoteProcessGroupAuditor.java   |   22 +-
 .../apache/nifi/audit/ReportingTaskAuditor.java |  353 ++++
 .../org/apache/nifi/audit/SnippetAuditor.java   |   13 +-
 .../org/apache/nifi/web/NiFiServiceFacade.java  |  208 ++-
 .../nifi/web/StandardNiFiContentAccess.java     |  147 ++
 .../nifi/web/StandardNiFiServiceFacade.java     | 1374 ++++++++------
 .../StandardNiFiWebConfigurationContext.java    |  736 ++++++++
 .../apache/nifi/web/StandardNiFiWebContext.java |   30 +-
 .../nifi/web/api/ApplicationResource.java       |   76 +-
 .../apache/nifi/web/api/ClusterResource.java    |    2 +-
 .../apache/nifi/web/api/ConnectionResource.java |    6 +-
 .../apache/nifi/web/api/ControllerResource.java |  102 +-
 .../nifi/web/api/ControllerServiceResource.java |  803 ++++++++
 .../org/apache/nifi/web/api/FunnelResource.java |    6 +-
 .../apache/nifi/web/api/HistoryResource.java    |   70 +-
 .../apache/nifi/web/api/InputPortResource.java  |    6 +-
 .../org/apache/nifi/web/api/LabelResource.java  |    6 +-
 .../apache/nifi/web/api/OutputPortResource.java |    6 +-
 .../nifi/web/api/ProcessGroupResource.java      |   16 +-
 .../apache/nifi/web/api/ProcessorResource.java  |   72 +-
 .../apache/nifi/web/api/ProvenanceResource.java |    2 +-
 .../web/api/RemoteProcessGroupResource.java     |   10 +-
 .../nifi/web/api/ReportingTaskResource.java     |  663 +++++++
 .../apache/nifi/web/api/SnippetResource.java    |    6 +-
 .../config/AdministrationExceptionMapper.java   |    6 +-
 .../web/api/config/ClusterExceptionMapper.java  |    6 +-
 .../web/api/config/NotFoundExceptionMapper.java |   48 +
 .../nifi/web/api/config/ThrowableMapper.java    |    6 +-
 .../org/apache/nifi/web/api/dto/DtoFactory.java |  303 ++-
 .../nifi/web/controller/ControllerFacade.java   |  114 +-
 .../nifi/web/dao/ControllerServiceDAO.java      |  110 ++
 .../apache/nifi/web/dao/ReportingTaskDAO.java   |   88 +
 .../dao/impl/StandardControllerServiceDAO.java  |  320 ++++
 .../nifi/web/dao/impl/StandardProcessorDAO.java |   13 +-
 .../web/dao/impl/StandardReportingTaskDAO.java  |  365 ++++
 .../nifi/web/dao/impl/StandardSnippetDAO.java   |   36 +-
 .../ControllerServiceProviderFactoryBean.java   |   68 +
 .../OptimisticLockingManagerFactoryBean.java    |   67 +
 .../ReportingTaskProviderFactoryBean.java       |   69 +
 .../org/apache/nifi/web/util/Availability.java  |   34 +
 .../nifi/web/util/DownloadableContent.java      |   47 -
 .../org/apache/nifi/web/util/SnippetUtils.java  |  181 +-
 .../src/main/resources/nifi-web-api-context.xml |   68 +-
 .../nifi/integration/util/NiFiTestServer.java   |    5 +
 .../nifi-web/nifi-web-content-access/pom.xml    |   25 +
 .../java/org/apache/nifi/web/ContentAccess.java |   33 +
 .../apache/nifi/web/ContentRequestContext.java  |   51 +
 .../apache/nifi/web/DownloadableContent.java    |   62 +
 .../nifi-web/nifi-web-content-viewer/.gitignore |    1 +
 .../nifi-web/nifi-web-content-viewer/pom.xml    |   91 +
 .../nifi/web/ContentViewerController.java       |  290 +++
 .../src/main/resources/META-INF/NOTICE          |   19 +
 .../src/main/webapp/WEB-INF/jsp/footer.jsp      |   20 +
 .../src/main/webapp/WEB-INF/jsp/header.jsp      |   96 +
 .../src/main/webapp/WEB-INF/jsp/hexview.jsp     |   32 +
 .../src/main/webapp/WEB-INF/jsp/no-viewer.jsp   |   20 +
 .../src/main/webapp/WEB-INF/web.xml             |   26 +
 .../src/main/webapp/css/main.css                |  113 ++
 .../src/main/webapp/js/hexview/LICENSE          |   32 +
 .../main/webapp/js/hexview/hexview.default.css  |   10 +
 .../src/main/webapp/js/hexview/hexview.js       |  199 ++
 .../nifi-web/nifi-web-docs/pom.xml              |    6 +
 .../nifi/web/docs/DocumentationController.java  |    5 +-
 .../main/webapp/WEB-INF/jsp/documentation.jsp   |   20 +-
 .../src/main/webapp/css/component-usage.css     |    4 +
 .../src/main/webapp/js/application.js           |    7 +-
 .../nifi-web-optimistic-locking/pom.xml         |   12 +
 .../apache/nifi/web/ConfigurationRequest.java   |   34 +
 .../apache/nifi/web/ConfigurationSnapshot.java  |   22 +-
 .../org/apache/nifi/web/FlowModification.java   |   57 +
 .../nifi/web/OptimisticLockingManager.java      |   76 +-
 .../web/StandardOptimisticLockingManager.java   |  150 +-
 .../org/apache/nifi/web/UpdateRevision.java     |   31 +
 .../nifi/web/security/user/NiFiUserUtils.java   |   10 +
 .../nifi-framework/nifi-web/nifi-web-ui/pom.xml |   18 +-
 .../main/resources/filters/canvas.properties    |    8 +-
 .../src/main/webapp/WEB-INF/pages/canvas.jsp    |   11 +-
 .../main/webapp/WEB-INF/pages/message-page.jsp  |    6 +-
 .../src/main/webapp/WEB-INF/pages/summary.jsp   |    2 +
 .../WEB-INF/partials/canvas/canvas-header.jsp   |    2 +-
 .../canvas/controller-service-configuration.jsp |   90 +
 .../disable-controller-service-dialog.jsp       |   71 +
 .../canvas/enable-controller-service-dialog.jsp |   70 +
 .../canvas/new-controller-service-dialog.jsp    |   53 +
 .../partials/canvas/new-processor-dialog.jsp    |    6 +-
 .../canvas/new-processor-property-dialog.jsp    |   34 -
 .../canvas/new-reporting-task-dialog.jsp        |   53 +
 .../partials/canvas/processor-configuration.jsp |   21 +-
 .../WEB-INF/partials/canvas/registration.jsp    |    2 +-
 .../canvas/reporting-task-configuration.jsp     |  107 ++
 .../partials/canvas/settings-content.jsp        |   98 +-
 .../WEB-INF/partials/processor-details.jsp      |    4 -
 .../nifi-web-ui/src/main/webapp/WEB-INF/web.xml |   11 +
 .../nifi-web-ui/src/main/webapp/css/about.css   |    1 -
 .../nifi-web-ui/src/main/webapp/css/canvas.css  |    4 +
 .../webapp/css/connection-configuration.css     |    1 -
 .../src/main/webapp/css/connection-details.css  |    1 -
 .../src/main/webapp/css/controller-service.css  |  269 +++
 .../nifi-web-ui/src/main/webapp/css/dialog.css  |   25 +-
 .../src/main/webapp/css/label-configuration.css |    1 -
 .../nifi-web-ui/src/main/webapp/css/main.css    |   42 +-
 .../css/new-controller-service-dialog.css       |  152 ++
 .../main/webapp/css/new-processor-dialog.css    |   53 +-
 .../webapp/css/new-reporting-task-dialog.css    |  152 ++
 .../src/main/webapp/css/port-configuration.css  |    2 -
 .../src/main/webapp/css/port-details.css        |    2 -
 .../webapp/css/process-group-configuration.css  |    1 -
 .../main/webapp/css/process-group-details.css   |    1 -
 .../main/webapp/css/processor-configuration.css |  153 --
 .../src/main/webapp/css/processor-details.css   |   27 -
 .../src/main/webapp/css/registration.css        |    8 -
 .../css/remote-process-group-configuration.css  |    3 -
 .../src/main/webapp/css/reporting-task.css      |  116 ++
 .../src/main/webapp/css/settings.css            |  123 +-
 .../nifi-web-ui/src/main/webapp/css/shell.css   |    2 +-
 .../src/main/webapp/css/status-history.css      |    1 -
 .../main/webapp/images/buttonNewProperty.png    |  Bin 590 -> 0 bytes
 .../src/main/webapp/images/iconEnable.png       |  Bin 0 -> 472 bytes
 .../src/main/webapp/images/iconUndo.png         |  Bin 642 -> 0 bytes
 .../js/codemirror/addon/fold/foldgutter.css     |   20 +
 .../js/codemirror/lib/codemirror-compressed.js  |   14 +-
 .../webapp/js/jquery/combo/jquery.combo.css     |    8 +
 .../src/main/webapp/js/jquery/jquery.each.js    |    2 +-
 .../webapp/js/jquery/modal/jquery.modal.css     |   12 +-
 .../main/webapp/js/jquery/modal/jquery.modal.js |  117 +-
 .../js/jquery/nfeditor/jquery.nfeditor.js       |    5 +-
 .../jquery/propertytable/buttonNewProperty.png  |  Bin 0 -> 590 bytes
 .../propertytable/jquery.propertytable.css      |  216 +++
 .../propertytable/jquery.propertytable.js       | 1630 ++++++++++++++++
 .../main/webapp/js/jquery/tabbs/jquery.tabbs.js |    2 +
 .../js/jquery/tagcloud/jquery.tagcloud.css      |   62 +
 .../js/jquery/tagcloud/jquery.tagcloud.js       |  226 +++
 .../js/nf/bulletin-board/nf-bulletin-board.js   |    3 +
 .../src/main/webapp/js/nf/canvas/nf-actions.js  |   17 +-
 .../src/main/webapp/js/nf/canvas/nf-birdseye.js |    3 +
 .../webapp/js/nf/canvas/nf-canvas-header.js     |   64 +-
 .../webapp/js/nf/canvas/nf-canvas-toolbar.js    |    3 +
 .../webapp/js/nf/canvas/nf-canvas-toolbox.js    |  164 +-
 .../main/webapp/js/nf/canvas/nf-canvas-utils.js |   10 +-
 .../src/main/webapp/js/nf/canvas/nf-canvas.js   |  113 +-
 .../main/webapp/js/nf/canvas/nf-clipboard.js    |    3 +
 .../main/webapp/js/nf/canvas/nf-connectable.js  |    3 +
 .../js/nf/canvas/nf-connection-configuration.js |    3 +
 .../main/webapp/js/nf/canvas/nf-connection.js   |    3 +
 .../main/webapp/js/nf/canvas/nf-context-menu.js |    3 +
 .../js/nf/canvas/nf-controller-service.js       | 1743 ++++++++++++++++++
 .../js/nf/canvas/nf-custom-processor-ui.js      |   43 -
 .../main/webapp/js/nf/canvas/nf-custom-ui.js    |   47 +
 .../main/webapp/js/nf/canvas/nf-draggable.js    |    3 +
 .../src/main/webapp/js/nf/canvas/nf-funnel.js   |    3 +
 .../src/main/webapp/js/nf/canvas/nf-go-to.js    |    3 +
 .../webapp/js/nf/canvas/nf-graph-control.js     |    3 +
 .../src/main/webapp/js/nf/canvas/nf-graph.js    |    3 +
 .../js/nf/canvas/nf-label-configuration.js      |    3 +
 .../src/main/webapp/js/nf/canvas/nf-label.js    |    3 +
 .../js/nf/canvas/nf-port-configuration.js       |    3 +
 .../main/webapp/js/nf/canvas/nf-port-details.js |    3 +
 .../src/main/webapp/js/nf/canvas/nf-port.js     |    3 +
 .../nf/canvas/nf-process-group-configuration.js |    3 +
 .../js/nf/canvas/nf-process-group-details.js    |    3 +
 .../webapp/js/nf/canvas/nf-process-group.js     |    3 +
 .../js/nf/canvas/nf-processor-configuration.js  |  500 ++---
 .../nf-processor-property-combo-editor.js       |  177 --
 .../canvas/nf-processor-property-nfel-editor.js |  207 ---
 .../js/nf/canvas/nf-processor-property-table.js |  567 ------
 .../canvas/nf-processor-property-text-editor.js |  212 ---
 .../main/webapp/js/nf/canvas/nf-processor.js    |    3 +
 .../main/webapp/js/nf/canvas/nf-registration.js |    7 +-
 .../nf-remote-process-group-configuration.js    |    3 +
 .../canvas/nf-remote-process-group-details.js   |    3 +
 .../nf/canvas/nf-remote-process-group-ports.js  |    3 +
 .../js/nf/canvas/nf-remote-process-group.js     |    3 +
 .../webapp/js/nf/canvas/nf-reporting-task.js    |  732 ++++++++
 .../js/nf/canvas/nf-secure-port-details.js      |    3 +
 .../main/webapp/js/nf/canvas/nf-selectable.js   |    3 +
 .../src/main/webapp/js/nf/canvas/nf-settings.js | 1526 ++++++++++++++-
 .../src/main/webapp/js/nf/canvas/nf-snippet.js  |    3 +
 .../src/main/webapp/js/nf/canvas/nf-storage.js  |    3 +
 .../webapp/js/nf/canvas/nf-toolbar-action.js    |    3 +
 .../webapp/js/nf/cluster/nf-cluster-table.js    |    3 +
 .../src/main/webapp/js/nf/cluster/nf-cluster.js |    3 +
 .../webapp/js/nf/counters/nf-counters-table.js  |    3 +
 .../main/webapp/js/nf/counters/nf-counters.js   |    3 +
 .../webapp/js/nf/history/nf-history-model.js    |    3 +
 .../webapp/js/nf/history/nf-history-table.js    |    7 +-
 .../src/main/webapp/js/nf/history/nf-history.js |    3 +
 .../src/main/webapp/js/nf/nf-client.js          |    3 +
 .../src/main/webapp/js/nf/nf-common.js          |   83 +-
 .../main/webapp/js/nf/nf-connection-details.js  |    3 +
 .../src/main/webapp/js/nf/nf-dialog.js          |   18 +-
 .../main/webapp/js/nf/nf-processor-details.js   |  358 +---
 .../src/main/webapp/js/nf/nf-shell.js           |    3 +
 .../src/main/webapp/js/nf/nf-status-history.js  |    3 +
 .../js/nf/provenance/nf-provenance-lineage.js   |    3 +
 .../js/nf/provenance/nf-provenance-table.js     |    3 +
 .../webapp/js/nf/provenance/nf-provenance.js    |    3 +
 .../webapp/js/nf/summary/nf-summary-table.js    |    2 +
 .../src/main/webapp/js/nf/summary/nf-summary.js |    3 +
 .../js/nf/templates/nf-templates-table.js       |    3 +
 .../main/webapp/js/nf/templates/nf-templates.js |    3 +
 .../main/webapp/js/nf/users/nf-users-table.js   |    3 +
 .../nifi-framework/nifi-web/pom.xml             |   12 +-
 .../nifi-framework-bundle/pom.xml               |    5 +
 .../nifi-geo-bundle/nifi-geo-nar/pom.xml        |   33 +
 .../nifi-geo-processors/.gitignore              |    1 +
 .../nifi-geo-bundle/nifi-geo-processors/pom.xml |   43 +
 .../org/apache/nifi/processors/GeoEnrichIP.java |  208 +++
 .../nifi/processors/maxmind/DatabaseReader.java |  286 +++
 .../org.apache.nifi.processor.Processor         |   16 +
 nifi/nifi-nar-bundles/nifi-geo-bundle/pom.xml   |   42 +
 .../nifi-hl7-bundle/nifi-hl7-nar/pom.xml        |   36 +
 .../nifi-hl7-processors/.gitignore              |    1 +
 .../nifi-hl7-bundle/nifi-hl7-processors/pom.xml |  120 ++
 .../processors/hl7/ExtractHL7Attributes.java    |  247 +++
 .../apache/nifi/processors/hl7/RouteHL7.java    |  217 +++
 .../org.apache.nifi.processor.Processor         |   16 +
 .../hl7/TestExtractHL7Attributes.java           |   48 +
 .../src/test/resources/hypoglycemia.hl7         |    5 +
 nifi/nifi-nar-bundles/nifi-hl7-bundle/pom.xml   |   33 +
 .../processors/kite/AbstractKiteProcessor.java  |   43 +-
 .../nifi/processors/kite/ConvertCSVToAvro.java  |    4 +-
 .../nifi/processors/kite/ConvertJSONToAvro.java |    3 +-
 .../processors/kite/StoreInKiteDataset.java     |    3 +-
 .../nifi-language-translation-nar/pom.xml       |   36 +
 .../nifi-yandex-processors/.gitignore           |    1 +
 .../nifi-yandex-processors/pom.xml              |   63 +
 .../nifi/processors/yandex/YandexTranslate.java |  333 ++++
 .../processors/yandex/model/Translation.java    |   52 +
 .../nifi/processors/yandex/util/Languages.java  |   86 +
 .../yandex/util/ObjectMapperResolver.java       |   48 +
 .../org.apache.nifi.processor.Processor         |   16 +
 .../processors/yandex/TestYandexTranslate.java  |  226 +++
 .../nifi-language-translation-bundle/pom.xml    |   48 +
 .../nifi/provenance/lucene/DocsReader.java      |   20 +-
 .../provenance/serialization/RecordReaders.java |   41 +-
 .../nifi-social-media-nar/pom.xml               |   36 +
 .../nifi-twitter-processors/.gitignore          |    1 +
 .../nifi-twitter-processors/pom.xml             |   60 +
 .../nifi/processors/twitter/GetTwitter.java     |  360 ++++
 .../org.apache.nifi.processor.Processor         |   16 +
 .../nifi-social-media-bundle/pom.xml            |   33 +
 .../nifi-standard-content-viewer/pom.xml        |   76 +
 .../web/StandardContentViewerController.java    |  103 ++
 .../src/main/resources/META-INF/NOTICE          |   19 +
 .../main/webapp/META-INF/nifi-content-viewer    |    3 +
 .../src/main/webapp/WEB-INF/jsp/codemirror.jsp  |   50 +
 .../src/main/webapp/WEB-INF/web.xml             |   29 +
 .../src/main/webapp/css/main.css                |   20 +
 .../nifi-standard-nar/pom.xml                   |    5 +
 .../standard/AbstractJsonPathProcessor.java     |   25 +-
 .../nifi/processors/standard/ControlRate.java   |    2 +-
 .../processors/standard/EvaluateJsonPath.java   |   32 +-
 .../processors/standard/HandleHttpResponse.java |    2 +-
 .../nifi/processors/standard/InvokeHTTP.java    |   31 +-
 .../nifi/processors/standard/PostHTTP.java      |    1 +
 .../nifi/processors/standard/PutEmail.java      |  165 +-
 .../nifi/processors/standard/SplitContent.java  |   93 +-
 .../nifi/processors/standard/SplitJson.java     |    5 +-
 .../standard/TestDetectDuplicate.java           |    5 +-
 .../standard/TestEvaluateJsonPath.java          |   86 +
 .../nifi/processors/standard/TestPutEmail.java  |   40 +-
 .../processors/standard/TestSplitContent.java   |  123 ++
 .../nifi/processors/standard/TestSplitJson.java |   88 +
 .../nifi-standard-bundle/pom.xml                |   10 +-
 .../DistributedMapCacheClientService.java       |   21 +-
 .../DistributedSetCacheClientService.java       |   16 +-
 .../cache/protocol/ProtocolHandshake.java       |    2 +-
 .../cache/server/AbstractCacheServer.java       |    2 +-
 .../cache/server/DistributedCacheServer.java    |   13 +-
 .../nifi/http/StandardHttpContextMap.java       |    9 +
 .../nifi/ssl/StandardSSLContextService.java     |   39 +-
 .../nifi-update-attribute-ui/pom.xml            |    5 +
 .../update/attributes/api/RuleResource.java     |  131 +-
 .../src/main/webapp/META-INF/nifi-processor     |   15 -
 .../META-INF/nifi-processor-configuration       |   15 +
 .../src/main/webapp/WEB-INF/jsp/worksheet.jsp   |   10 +-
 .../src/main/webapp/WEB-INF/web.xml             |    4 +-
 .../src/main/webapp/js/application.js           |   25 +-
 nifi/nifi-nar-bundles/pom.xml                   |    8 +-
 nifi/pom.xml                                    |   33 +-
 550 files changed, 32816 insertions(+), 6301 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8a296aac/nifi-nar-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --cc nifi-nar-maven-plugin/pom.xml
index 361c6fa,7ba2d7c..46dd333
--- a/nifi-nar-maven-plugin/pom.xml
+++ b/nifi-nar-maven-plugin/pom.xml
@@@ -15,12 -15,14 +15,12 @@@
  -->
  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
 -
      <parent>
 -        <groupId>org.apache</groupId>
 -        <artifactId>apache</artifactId>
 -        <version>16</version>
 +        <groupId>org.apache.nifi</groupId>
 +        <artifactId>nifi-parent</artifactId>
-         <version>1-incubating-SNAPSHOT</version>
++        <version>1.0.0-incubating-SNAPSHOT</version>
          <relativePath />
      </parent>
 -    <groupId>org.apache.nifi</groupId>
      <artifactId>nifi-nar-maven-plugin</artifactId>
      <version>1.0.1-incubating-SNAPSHOT</version>
      <packaging>maven-plugin</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8a296aac/nifi-parent/pom.xml
----------------------------------------------------------------------
diff --cc nifi-parent/pom.xml
index 4a07bed,0000000..fc1a19d
mode 100644,000000..100644
--- a/nifi-parent/pom.xml
+++ b/nifi-parent/pom.xml
@@@ -1,387 -1,0 +1,387 @@@
 +<?xml version="1.0" encoding="UTF-8"?>
 +<!--
 +  Licensed to the Apache Software Foundation (ASF) under one or more
 +  contributor license agreements.  See the NOTICE file distributed with
 +  this work for additional information regarding copyright ownership.
 +  The ASF licenses this file to You under the Apache License, Version 2.0
 +  (the "License"); you may not use this file except in compliance with
 +  the License.  You may obtain a copy of the License at
 +      http://www.apache.org/licenses/LICENSE-2.0
 +  Unless required by applicable law or agreed to in writing, software
 +  distributed under the License is distributed on an "AS IS" BASIS,
 +  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +  See the License for the specific language governing permissions and
 +  limitations under the License.
 +-->
 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 +    <modelVersion>4.0.0</modelVersion>
 +    <parent>
 +        <groupId>org.apache</groupId>
 +        <artifactId>apache</artifactId>
 +        <version>16</version>
 +        <relativePath />
 +    </parent>
 +    <groupId>org.apache.nifi</groupId>
 +    <artifactId>nifi-parent</artifactId>
-     <version>1-incubating-SNAPSHOT</version>
++    <version>1.0.0-incubating-SNAPSHOT</version>
 +    <packaging>pom</packaging>
 +    <description>The nifi-parent enables each apache nifi project to ensure consistent approaches and DRY</description>
 +    <url>http://nifi.incubator.apache.org</url>
 +    <organization>
 +        <name>Apache NiFi(incubating) Project</name>
 +        <url>http://nifi.incubator.apache.org/</url>
 +    </organization>
 +    <licenses>
 +        <license>
 +            <name>Apache License, Version 2.0</name>
 +            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
 +        </license>
 +    </licenses>
 +    <mailingLists>
 +        <mailingList>
 +            <name>Dev</name>
 +            <subscribe>dev-subscribe@nifi.incubator.apache.org</subscribe>
 +            <unsubscribe>dev-unsubscribe@nifi.incubator.apache.org</unsubscribe>
 +            <post>dev@nifi.incubator.apache.org</post>
 +            <archive>http://mail-archives.apache.org/mod_mbox/incubator-nifi-dev</archive>
 +        </mailingList>
 +        <mailingList>
 +            <name>Commits</name>
 +            <subscribe>commits-subscribe@nifi.incubator.apache.org</subscribe>
 +            <unsubscribe>commits-unsubscribe@nifi.incubator.apache.org</unsubscribe>
 +            <post>commits@nifi.incubator.apache.org</post>
 +            <archive>http://mail-archives.apache.org/mod_mbox/incubator-nifi-commits</archive>
 +        </mailingList>
 +    </mailingLists>
 +    <prerequisites>
 +        <maven>${maven.min-version}</maven>
 +    </prerequisites>
 +    <scm>
 +        <connection>scm:git:git://git.apache.org/incubator-nifi.git</connection>
 +        <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-nifi.git</developerConnection>
 +        <url>https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git</url>
 +        <tag>HEAD</tag>
 +    </scm>
 +    <issueManagement>
 +        <system>JIRA</system>
 +        <url>https://issues.apache.org/jira/browse/NIFI</url>
 +    </issueManagement>
 +    <properties>
 +        <maven.compiler.source>1.7</maven.compiler.source>
 +        <maven.compiler.target>1.7</maven.compiler.target>
 +        <maven.min-version>3.0.5</maven.min-version>
 +        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 +        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 +        <inceptionYear>2014</inceptionYear>
 +    </properties>
 +    <build>
 +        <pluginManagement>
 +            <plugins>
 +                <plugin>
 +                    <groupId>org.apache.maven.plugins</groupId>
 +                    <artifactId>maven-compiler-plugin</artifactId>
 +                    <version>3.2</version>
 +                    <configuration>
 +                        <fork>true</fork>
 +                        <optimize>true</optimize>
 +                        <showDeprecation>true</showDeprecation>
 +                        <showWarnings>true</showWarnings>
 +                    </configuration>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.apache.maven.plugins</groupId>
 +                    <artifactId>maven-war-plugin</artifactId>
 +                    <version>2.5</version>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.apache.maven.plugins</groupId>
 +                    <artifactId>maven-dependency-plugin</artifactId>
 +                    <version>2.9</version>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.apache.maven.plugins</groupId>
 +                    <artifactId>maven-resources-plugin</artifactId>
 +                    <version>2.7</version>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.apache.maven.plugins</groupId>
 +                    <artifactId>maven-surefire-plugin</artifactId>
 +                    <version>2.18</version>
 +                    <configuration>
 +                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
 +                        <argLine>-Xmx1G</argLine>
 +                    </configuration>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.apache.maven.plugins</groupId>
 +                    <artifactId>maven-assembly-plugin</artifactId>
 +                    <version>2.5.2</version>
 +                    <configuration>
 +                        <tarLongFileMode>gnu</tarLongFileMode>
 +                    </configuration>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.codehaus.mojo</groupId>
 +                    <artifactId>jaxb2-maven-plugin</artifactId>
 +                    <version>1.6</version>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.apache.maven.plugins</groupId>
 +                    <artifactId>maven-source-plugin</artifactId>
 +                    <version>2.4</version>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.apache.maven.plugins</groupId>
 +                    <artifactId>maven-site-plugin</artifactId>
 +                    <version>3.4</version>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.codehaus.mojo</groupId>
 +                    <artifactId>exec-maven-plugin</artifactId>
 +                    <version>1.3.2</version>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.apache.maven.plugins</groupId>
 +                    <artifactId>maven-jar-plugin</artifactId>
 +                    <version>2.5</version>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.apache.maven.plugins</groupId>
 +                    <artifactId>maven-javadoc-plugin</artifactId>
 +                    <version>2.10.1</version>
 +                    <configuration>
 +                        <failOnError>false</failOnError>
 +                        <quiet>true</quiet>
 +                        <show>private</show>
 +                        <encoding>UTF-8</encoding>
 +                        <quiet>true</quiet>
 +                        <javadocVersion>1.7</javadocVersion>
 +                        <additionalJOption>-J-Xmx512m</additionalJOption>
 +                    </configuration>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.apache.maven.plugins</groupId>
 +                    <artifactId>maven-release-plugin</artifactId>
 +                    <version>2.5.1</version>
 +                    <configuration>
 +                        <useReleaseProfile>true</useReleaseProfile>
 +                        <releaseProfiles>apache-release</releaseProfiles>
 +                        <autoVersionSubmodules>true</autoVersionSubmodules>
 +                        <goals>deploy</goals>
 +                        <tagNameFormat>@{project.artifactId}-@{project.version}</tagNameFormat>
 +                        <pushChanges>false</pushChanges>
 +                        <localCheckout>true</localCheckout>
 +                    </configuration>
 +                    <executions>
 +                        <execution>
 +                            <id>default</id>
 +                            <goals>
 +                                <goal>perform</goal>
 +                            </goals>
 +                            <configuration>
 +                                <pomFileName>nifi-parent/pom.xml</pomFileName>
 +                            </configuration>
 +                        </execution>
 +                    </executions>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.codehaus.mojo</groupId>
 +                    <artifactId>rpm-maven-plugin</artifactId>
 +                    <version>2.1.1</version>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.antlr</groupId>
 +                    <artifactId>antlr3-maven-plugin</artifactId>
 +                    <version>3.5.2</version>
 +                </plugin>
 +                <plugin>
 +                    <groupId>org.apache.maven.plugins</groupId>
 +                    <artifactId>maven-checkstyle-plugin</artifactId>
 +                    <version>2.15</version>
 +                </plugin>                
 +            </plugins>
 +        </pluginManagement>
 +        <plugins>
 +            <plugin>
 +                <groupId>org.sonatype.plugins</groupId>
 +                <artifactId>nexus-staging-maven-plugin</artifactId>
 +                <version>1.6.5</version>
 +                <extensions>true</extensions>
 +                <configuration>
 +                    <serverId>repository.apache.org</serverId>
 +                    <nexusUrl>https://repository.apache.org/</nexusUrl>
 +                </configuration>
 +            </plugin>
 +            <plugin>
 +                <groupId>org.apache.maven.plugins</groupId>
 +                <artifactId>maven-enforcer-plugin</artifactId>
 +                <executions>
 +                    <execution>
 +                        <id>enforce-maven</id>
 +                        <goals>
 +                            <goal>enforce</goal>
 +                        </goals>
 +                        <configuration>
 +                            <rules>
 +                                <requireSameVersions>
 +                                    <plugins>
 +                                        <plugin>org.apache.maven.plugins:maven-surefire-plugin</plugin>
 +                                        <plugin>org.apache.maven.plugins:maven-failsafe-plugin</plugin>
 +                                        <plugin>org.apache.maven.plugins:maven-surefire-report-plugin</plugin>
 +                                    </plugins>
 +                                </requireSameVersions>
 +                                <requireMavenVersion>
 +                                    <version>${maven.min-version}</version>
 +                                </requireMavenVersion>
 +                            </rules>    
 +                        </configuration>
 +                    </execution>
 +                </executions>
 +            </plugin>
 +            <plugin>
 +                <groupId>org.apache.maven.plugins</groupId>
 +                <artifactId>maven-checkstyle-plugin</artifactId>
 +                <configuration>
 +                    <checkstyleRules>
 +                        <module name="Checker">
 +                            <property name="charset" value="UTF-8" />
 +                            <property name="severity" value="warning" />
 +                            <!-- Checks for whitespace                               -->
 +                            <!-- See http://checkstyle.sf.net/config_whitespace.html -->
 +                            <module name="FileTabCharacter">
 +                                <property name="eachLine" value="true" />
 +                            </module>
 +                            <module name="TreeWalker">
 +                                <module name="RegexpSinglelineJava">
 +                                    <property name="format" value="\s+$" />
 +                                    <property name="message" value="Line has trailing whitespace." />
 +                                </module>
 +                                <module name="RegexpSinglelineJava">
 +                                    <property name="format" value="[@]see\s+[{][@]link" />
 +                                    <property name="message" value="Javadoc @see does not need @link: pick one or the other." />
 +                                </module>
 +                                <module name="RegexpSinglelineJava">
 +                                    <property name="format" value="jline[.]internal[.]Preconditions" />
 +                                    <property name="message" value="Please use Guava Preconditions not JLine" />
 +                                </module>
 +                                <module name="OuterTypeFilename" />
 +                                <module name="LineLength">
 +                                    <!-- needs extra, because Eclipse formatter ignores the ending left brace -->
 +                                    <property name="max" value="200" />
 +                                    <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://" />
 +                                </module>
 +                                <module name="AvoidStarImport" />
 +                                <module name="UnusedImports">
 +                                    <property name="processJavadoc" value="true" />
 +                                </module>
 +                                <module name="NoLineWrap" />
 +                                <module name="LeftCurly">
 +                                    <property name="maxLineLength" value="160" />
 +                                </module>
 +                                <module name="RightCurly" />
 +                                <module name="RightCurly">
 +                                    <property name="option" value="alone" />
 +                                    <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT" />
 +                                </module>
 +                                <module name="SeparatorWrap">
 +                                    <property name="tokens" value="DOT" />
 +                                    <property name="option" value="nl" />
 +                                </module>
 +                                <module name="SeparatorWrap">
 +                                    <property name="tokens" value="COMMA" />
 +                                    <property name="option" value="EOL" />
 +                                </module>
 +                                <module name="PackageName">
 +                                    <property name="format" value="^[a-z]+(\.[a-z][a-zA-Z0-9]*)*$" />
 +                                </module>
 +                                <module name="MethodTypeParameterName">
 +                                    <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)" />
 +                                </module>
 +                                <module name="MethodParamPad" />
 +                                <module name="OperatorWrap">
 +                                    <property name="option" value="NL" />
 +                                    <property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, QUESTION, SL, SR, STAR " />
 +                                </module>
 +                                <module name="AnnotationLocation">
 +                                    <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF" />
 +                                </module>
 +                                <module name="AnnotationLocation">
 +                                    <property name="tokens" value="VARIABLE_DEF" />
 +                                    <property name="allowSamelineMultipleAnnotations" value="true" />
 +                                </module>
 +                                <module name="NonEmptyAtclauseDescription" />
 +                                <module name="JavadocTagContinuationIndentation" />
 +                                <module name="JavadocMethod">
 +                                    <property name="allowMissingJavadoc" value="true" />
 +                                    <property name="allowMissingParamTags" value="true" />
 +                                    <property name="allowMissingThrowsTags" value="true" />
 +                                    <property name="allowMissingReturnTag" value="true" />
 +                                    <property name="allowedAnnotations" value="Override,Test,BeforeClass,AfterClass,Before,After" />
 +                                    <property name="allowThrowsTagsForSubclasses" value="true" />
 +                                </module>
 +                                <module name="SingleLineJavadoc" />
 +                            </module>
 +                        </module>
 +                    </checkstyleRules>
 +                    <violationSeverity>warning</violationSeverity>
 +                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
 +                    <excludes>**/HelpMojo.java</excludes>
 +                </configuration>
 +                <dependencies>
 +                    <dependency>
 +                        <groupId>com.puppycrawl.tools</groupId>
 +                        <artifactId>checkstyle</artifactId>
 +                        <version>6.3</version>
 +                    </dependency>
 +                </dependencies>
 +                <executions>
 +                    <execution>
 +                        <id>check-style</id>
 +                        <goals>
 +                            <goal>check</goal>
 +                        </goals>
 +                    </execution>
 +                </executions>
 +            </plugin>            
 +            <plugin>
 +                <groupId>org.apache.rat</groupId>
 +                <artifactId>apache-rat-plugin</artifactId>
 +                <configuration>
 +                    <excludes>
 +                        <exclude>nb-configuration.xml</exclude> <!-- courtesy excludes for netbeans users -->
 +                        <exclude>nbactions.xml</exclude> <!-- courtesy excludes for netbeans users -->
 +                        <exclude>DEPENDENCIES</exclude> <!-- auto generated file by apache's maven config while building sources.zip -->
 +                    </excludes>
 +                </configuration>
 +                <dependencies>
 +                    <!-- workaround for RAT-158 -->
 +                    <dependency>
 +                        <groupId>org.apache.maven.doxia</groupId>
 +                        <artifactId>doxia-core</artifactId>
 +                        <version>1.6</version>
 +                        <exclusions>
 +                            <exclusion>
 +                                <groupId>xerces</groupId>
 +                                <artifactId>xercesImpl</artifactId>
 +                            </exclusion>
 +                        </exclusions>
 +                    </dependency>
 +                </dependencies>
 +                <executions>
 +                    <execution>
 +                        <id>check-licenses</id>
 +                        <goals>
 +                            <goal>check</goal>
 +                        </goals>
 +                    </execution>
 +                </executions>
 +            </plugin>             
 +            <plugin>
 +                <groupId>org.apache.nifi</groupId>
 +                <artifactId>nifi-nar-maven-plugin</artifactId>
 +                <version>1.0.0-incubating</version>
 +                <extensions>true</extensions>
 +            </plugin>
 +        </plugins>
 +    </build>
 +</project>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8a296aac/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-user-actions/src/main/java/org/apache/nifi/action/Component.java
----------------------------------------------------------------------
diff --cc nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-user-actions/src/main/java/org/apache/nifi/action/Component.java
index 276decc,7f62c92..dcd23ee
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-user-actions/src/main/java/org/apache/nifi/action/Component.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-user-actions/src/main/java/org/apache/nifi/action/Component.java
@@@ -27,6 -26,8 +27,8 @@@ public enum Component 
      OutputPort,
      ProcessGroup,
      RemoteProcessGroup,
 -	Funnel,
 +    Funnel,
-     Connection;
+     Connection,
+     ControllerService,
+     ReportingTask;
  }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8a296aac/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-user-actions/src/main/java/org/apache/nifi/action/component/details/ExtensionDetails.java
----------------------------------------------------------------------
diff --cc nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-user-actions/src/main/java/org/apache/nifi/action/component/details/ExtensionDetails.java
index 0000000,e557548..4c1f91e
mode 000000,100644..100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-user-actions/src/main/java/org/apache/nifi/action/component/details/ExtensionDetails.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-user-actions/src/main/java/org/apache/nifi/action/component/details/ExtensionDetails.java
@@@ -1,0 -1,34 +1,34 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *     http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package org.apache.nifi.action.component.details;
+ 
+ /**
+  *
+  */
+ public class ExtensionDetails extends ComponentDetails {
+ 
+     private String type;
+ 
+     public String getType() {
+         return type;
+     }
+ 
+     public void setType(String type) {
+         this.type = type;
+     }
 -    
++
+ }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8a296aac/nifi/pom.xml
----------------------------------------------------------------------
diff --cc nifi/pom.xml
index 4a30398,d500cbe..ad8f9a2
--- a/nifi/pom.xml
+++ b/nifi/pom.xml
@@@ -16,11 -16,12 +16,11 @@@
  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <parent>
 -        <groupId>org.apache</groupId>
 -        <artifactId>apache</artifactId>
 -        <version>16</version>
 +        <groupId>org.apache.nifi</groupId>
 +        <artifactId>nifi-parent</artifactId>
-         <version>1-incubating-SNAPSHOT</version>
++        <version>1.0.0-incubating-SNAPSHOT</version>
          <relativePath />
      </parent>
 -    <groupId>org.apache.nifi</groupId>
      <artifactId>nifi</artifactId>
      <version>0.1.0-incubating-SNAPSHOT</version>
      <packaging>pom</packaging>
@@@ -36,9 -67,24 +36,9 @@@
          <module>nifi-maven-archetypes</module>
          <module>nifi-external</module>
      </modules>
 -    <scm>
 -        <connection>scm:git:git://git.apache.org/incubator-nifi.git</connection>
 -        <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-nifi.git</developerConnection>
 -        <url>https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git</url>
 -        <tag>HEAD</tag>
 -    </scm>
 -    <issueManagement>
 -        <system>JIRA</system>
 -        <url>https://issues.apache.org/jira/browse/NIFI</url>
 -    </issueManagement>
      <properties>
 -        <maven.compiler.source>1.7</maven.compiler.source>
 -        <maven.compiler.target>1.7</maven.compiler.target>
 -        <maven.min-version>3.0.5</maven.min-version>
 -        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 -        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
          <org.slf4j.version>1.7.10</org.slf4j.version>
-         <jetty.version>9.2.5.v20141112</jetty.version>
+         <jetty.version>9.2.10.v20150310</jetty.version>
          <lucene.version>4.10.3</lucene.version>
          <spring.version>4.1.4.RELEASE</spring.version>
          <spring.security.version>3.2.5.RELEASE</spring.security.version>


[40/50] [abbrv] incubator-nifi git commit: NIFI-506: Fixed unit tests

Posted by jo...@apache.org.
NIFI-506: Fixed unit tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8bcaca75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8bcaca75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8bcaca75

Branch: refs/heads/NIFI-271
Commit: 8bcaca75146885fa01ad75de7121d3f9669746f7
Parents: 58ea7af
Author: Mark Payne <ma...@hotmail.com>
Authored: Sat Apr 11 20:01:22 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Sat Apr 11 20:01:22 2015 -0400

----------------------------------------------------------------------
 .../src/test/resources/hyperglycemia                      | 10 +++++-----
 .../src/test/resources/hypoglycemia                       | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8bcaca75/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia
index 9c6888c..cae413b 100644
--- a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia
@@ -1,5 +1,5 @@
-MSH|^~\&|XXXXXXXX||HealthProvider||||ORU^R01|Q1111111111111111111|P|2.3|
-PID|||111111111||SMITH^JOHN||19700100|M||||||||||111111111111|123456789|
-PD1||||1234567890^LAST^FIRST^M^^^^^NPI|
-OBR|1|341856649^HNAM_ORDERID|000000000000000000|648088^Basic Metabolic Panel|||20150101000000|||||||||1620^Johnson^Corey^A||||||20150101000000|||F|||||||||||20150101000000|
-OBX|1|NM|GLU^Glucose Lvl|159|mg/dL|65-99^65^99|H|||F|||20150102000000|
\ No newline at end of file
+MSH|^~\&|XXXXXX||HealthOrg01||||ORU^R01|Q1111111111111111111|P|2.3|
+PID|||000000001||SMITH^JOHN||19700101|M||||||||||999999999999|123456789|
+PD1||||1234567890^LAST^FIRST^M^^^^^NPI|
+OBR|1|341856649^HNAM_ORDERID|000000000000000000|648088^Basic Metabolic Panel|||20150101000100|||||||||1620^Johnson^John^R||||||20150101000100|||M|||||||||||20150101000100|
+OBX|1|NM|GLU^Glucose Lvl|159|mg/dL|65-99^65^99|H|||F|||20150101000100|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8bcaca75/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia
index d7bdeec..764ffcc 100644
--- a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia
@@ -1,5 +1,5 @@
-MSH|^~\&|XXXXXXXX||HealthProvider||||ORU^R01|Q1111111111111111111|P|2.3|
-PID|||111111111||SMITH^JOHN||19700100|M||||||||||111111111111|123456789|
-PD1||||1234567890^LAST^FIRST^M^^^^^NPI|
-OBR|1|341856649^HNAM_ORDERID|000000000000000000|648088^Basic Metabolic Panel|||20150101000000|||||||||1620^Johnson^Corey^A||||||20150101000000|||F|||||||||||20150101000000|
-OBX|1|NM|GLU^Glucose Lvl|59|mg/dL|65-99^65^99|L|||F|||20150102000000|
\ No newline at end of file
+MSH|^~\&|XXXXXX||HealthOrg01||||ORU^R01|Q1111111111111111111|P|2.3|
+PID|||000000001||SMITH^JOHN||19700101|M||||||||||999999999999|123456789|
+PD1||||1234567890^LAST^FIRST^M^^^^^NPI|
+OBR|1|341856649^HNAM_ORDERID|000000000000000000|648088^Basic Metabolic Panel|||20150101000100|||||||||1620^Johnson^John^R||||||20150101000100|||M|||||||||||20150101000100|
+OBX|1|NM|GLU^Glucose Lvl|59|mg/dL|65-99^65^99|L|||F|||20150101000100|
\ No newline at end of file


[27/50] [abbrv] incubator-nifi git commit: NIFI-497: - Requiring new property names to be unique.

Posted by jo...@apache.org.
NIFI-497:
- Requiring new property names to be unique.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/9299355a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/9299355a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/9299355a

Branch: refs/heads/NIFI-271
Commit: 9299355ae9fe31d47824acab21aa02fc92c5d897
Parents: 322be25
Author: Matt Gilman <ma...@gmail.com>
Authored: Fri Apr 10 11:30:54 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Fri Apr 10 11:30:54 2015 -0400

----------------------------------------------------------------------
 .../propertytable/jquery.propertytable.js       | 74 +++++++++++++-------
 1 file changed, 48 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9299355a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
index b5f56b0..7ffaa3f 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
@@ -1375,37 +1375,59 @@
                         var add = function () {
                             var propertyName = $.trim(newPropertyNameField.val());
 
-                            // ensure the property name and value is specified
+                            // ensure the property name is specified
                             if (propertyName !== '') {
-                                // load the descriptor and add the property
-                                options.descriptorDeferred(propertyName).done(function(response) {
-                                    var descriptor = response.propertyDescriptor;
-
-                                    // store the descriptor for use later
-                                    var descriptors = table.data('descriptors');
-                                    if (!nf.Common.isUndefined(descriptors)) {
-                                        descriptors[descriptor.name] = descriptor;
+                                var propertyGrid = table.data('gridInstance');
+                                var propertyData = propertyGrid.getData();
+                                
+                                // ensure the property name is unique
+                                var existingPropertyId = null;
+                                $.each(propertyData.getItems(), function (_, item) {
+                                    if (propertyName === item.property) {
+                                        existingPropertyId = item.id;
+                                        return false;
                                     }
-
-                                    // add a row for the new property
-                                    var propertyGrid = table.data('gridInstance');
-                                    var propertyData = propertyGrid.getData();
-                                    var id = propertyData.getLength(); 
-                                    propertyData.addItem({
-                                        id: id,
-                                        hidden: false,
-                                        property: propertyName,
-                                        displayName: propertyName,
-                                        previousValue: null,
-                                        value: null,
-                                        type: 'userDefined'
+                                });
+                                
+                                if (existingPropertyId === null) {
+                                    // load the descriptor and add the property
+                                    options.descriptorDeferred(propertyName).done(function(response) {
+                                        var descriptor = response.propertyDescriptor;
+
+                                        // store the descriptor for use later
+                                        var descriptors = table.data('descriptors');
+                                        if (!nf.Common.isUndefined(descriptors)) {
+                                            descriptors[descriptor.name] = descriptor;
+                                        }
+
+                                        // add a row for the new property
+                                        var id = propertyData.getLength(); 
+                                        propertyData.addItem({
+                                            id: id,
+                                            hidden: false,
+                                            property: propertyName,
+                                            displayName: propertyName,
+                                            previousValue: null,
+                                            value: null,
+                                            type: 'userDefined'
+                                        });
+
+                                        // select the new properties row
+                                        var row = propertyData.getRowById(id);
+                                        propertyGrid.setSelectedRows([row]);
+                                        propertyGrid.scrollRowIntoView(row);
                                     });
-
-                                    // select the new properties row
-                                    var row = propertyData.getRowById(id);
+                                } else {
+                                    nf.Dialog.showOkDialog({
+                                        dialogContent: 'A property with this name already exists.',
+                                        overlayBackground: false
+                                    });
+                                    
+                                    // select the existing properties row
+                                    var row = propertyData.getRowById(existingPropertyId);
                                     propertyGrid.setSelectedRows([row]);
                                     propertyGrid.scrollRowIntoView(row);
-                                });
+                                }
                             } else {
                                 nf.Dialog.showOkDialog({
                                     dialogContent: 'Property name must be specified.',


[18/50] [abbrv] incubator-nifi git commit: NIFI-501: - Ensuring the property descriptor is loaded before adding/updating the property in the table.

Posted by jo...@apache.org.
NIFI-501:
- Ensuring the property descriptor is loaded before adding/updating the property in the table.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/c1959b3e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/c1959b3e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/c1959b3e

Branch: refs/heads/NIFI-271
Commit: c1959b3e2d8f48247642655d3e8cbeb08baa3cef
Parents: eb023e5
Author: Matt Gilman <ma...@gmail.com>
Authored: Fri Apr 10 06:56:51 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Fri Apr 10 06:56:51 2015 -0400

----------------------------------------------------------------------
 .../propertytable/jquery.propertytable.js       | 82 +++++++++-----------
 1 file changed, 36 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c1959b3e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
index c0b8884..b5f56b0 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
@@ -882,24 +882,16 @@
                         // update the revision
                         nf.Client.setRevision(response.revision);
 
-                        $.Deferred(function (deferred) {
-                            // load the property descriptor if possible
-                            if (typeof configurationOptions.descriptorDeferred === 'function') {
-                                configurationOptions.descriptorDeferred(item.property).done(function(response) {
-                                    var descriptor = response.propertyDescriptor;
-
-                                    // store the descriptor for use later
-                                    var descriptors = gridContainer.data('descriptors');
-                                    if (!nf.Common.isUndefined(descriptors)) {
-                                        descriptors[descriptor.name] = descriptor;
-                                    }
-
-                                    deferred.resolve();
-                                });
-                            } else {
-                                deferred.resolve();
+                        // load the descriptor and update the property
+                        configurationOptions.descriptorDeferred(item.property).done(function(descriptorResponse) {
+                            var descriptor = descriptorResponse.propertyDescriptor;
+
+                            // store the descriptor for use later
+                            var descriptors = gridContainer.data('descriptors');
+                            if (!nf.Common.isUndefined(descriptors)) {
+                                descriptors[descriptor.name] = descriptor;
                             }
-                        }).done(function() {
+
                             // add a row for the new property
                             var data = grid.getData();
                             data.updateItem(item.id, $.extend(item, {
@@ -1385,37 +1377,35 @@
 
                             // ensure the property name and value is specified
                             if (propertyName !== '') {
-                                // load the property descriptor if possible
-                                if (typeof options.descriptorDeferred === 'function') {
-                                    options.descriptorDeferred(propertyName).done(function(response) {
-                                        var descriptor = response.propertyDescriptor;
-                                        
-                                        // store the descriptor for use later
-                                        var descriptors = table.data('descriptors');
-                                        if (!nf.Common.isUndefined(descriptors)) {
-                                            descriptors[descriptor.name] = descriptor;
-                                        }
+                                // load the descriptor and add the property
+                                options.descriptorDeferred(propertyName).done(function(response) {
+                                    var descriptor = response.propertyDescriptor;
+
+                                    // store the descriptor for use later
+                                    var descriptors = table.data('descriptors');
+                                    if (!nf.Common.isUndefined(descriptors)) {
+                                        descriptors[descriptor.name] = descriptor;
+                                    }
+
+                                    // add a row for the new property
+                                    var propertyGrid = table.data('gridInstance');
+                                    var propertyData = propertyGrid.getData();
+                                    var id = propertyData.getLength(); 
+                                    propertyData.addItem({
+                                        id: id,
+                                        hidden: false,
+                                        property: propertyName,
+                                        displayName: propertyName,
+                                        previousValue: null,
+                                        value: null,
+                                        type: 'userDefined'
                                     });
-                                }
-                                
-                                // add a row for the new property
-                                var propertyGrid = table.data('gridInstance');
-                                var propertyData = propertyGrid.getData();
-                                var id = propertyData.getLength(); 
-                                propertyData.addItem({
-                                    id: id,
-                                    hidden: false,
-                                    property: propertyName,
-                                    displayName: propertyName,
-                                    previousValue: null,
-                                    value: null,
-                                    type: 'userDefined'
+
+                                    // select the new properties row
+                                    var row = propertyData.getRowById(id);
+                                    propertyGrid.setSelectedRows([row]);
+                                    propertyGrid.scrollRowIntoView(row);
                                 });
-                                
-                                // select the new properties row
-                                var row = propertyData.getRowById(id);
-                                propertyGrid.setSelectedRows([row]);
-                                propertyGrid.scrollRowIntoView(row);
                             } else {
                                 nf.Dialog.showOkDialog({
                                     dialogContent: 'Property name must be specified.',


[21/50] [abbrv] incubator-nifi git commit: NIFI-503: Removed dependencies on commons-lang3 and commons-io

Posted by jo...@apache.org.
NIFI-503: Removed dependencies on commons-lang3 and commons-io


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e18c0a7d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e18c0a7d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e18c0a7d

Branch: refs/heads/NIFI-271
Commit: e18c0a7d267460293a7e5a0189b223607212354f
Parents: 512ac9c
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 10 09:37:53 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 10 09:37:53 2015 -0400

----------------------------------------------------------------------
 .../nifi-framework/nifi-documentation/pom.xml       |  8 --------
 .../documentation/html/HtmlDocumentationWriter.java | 15 ++++++++++++---
 .../html/HtmlProcessorDocumentationWriter.java      | 16 +++++++++++-----
 .../html/HtmlDocumentationWriterTest.java           |  8 ++++++++
 4 files changed, 31 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e18c0a7d/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/pom.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/pom.xml
index e522d30..5995f5c 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/pom.xml
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/pom.xml
@@ -33,14 +33,6 @@
             <artifactId>nifi-properties</artifactId>
         </dependency>
         <dependency>
-            <groupId>commons-io</groupId>
-            <artifactId>commons-io</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-lang3</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.nifi</groupId>
             <artifactId>nifi-processor-utils</artifactId>
             <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e18c0a7d/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java
index 34b1327..243aaa3 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java
@@ -26,7 +26,6 @@ import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.nifi.annotation.behavior.DynamicProperties;
 import org.apache.nifi.annotation.behavior.DynamicProperty;
 import org.apache.nifi.annotation.documentation.CapabilityDescription;
@@ -212,13 +211,23 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
         xmlStreamWriter.writeEndElement();
         xmlStreamWriter.writeStartElement("p");
         if (tags != null) {
-            final String tagString = StringUtils.join(tags.value(), ", ");
+            final String tagString = join(tags.value(), ", ");
             xmlStreamWriter.writeCharacters(tagString);
         } else {
             xmlStreamWriter.writeCharacters("None.");
         }
         xmlStreamWriter.writeEndElement();
-
+    }
+    
+    static String join(final String[] toJoin, final String delimiter) {
+    	final StringBuilder sb = new StringBuilder();
+    	for (int i=0; i < toJoin.length; i++) {
+    		sb.append(toJoin[i]);
+    		if ( i < toJoin.length - 1 ) {
+    			sb.append(delimiter);
+    		}
+    	}
+    	return sb.toString();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e18c0a7d/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlProcessorDocumentationWriter.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlProcessorDocumentationWriter.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlProcessorDocumentationWriter.java
index bc355f7..c253a4d 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlProcessorDocumentationWriter.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlProcessorDocumentationWriter.java
@@ -23,7 +23,6 @@ import java.util.List;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.nifi.annotation.behavior.DynamicRelationship;
 import org.apache.nifi.annotation.behavior.ReadsAttribute;
 import org.apache.nifi.annotation.behavior.ReadsAttributes;
@@ -67,6 +66,13 @@ public class HtmlProcessorDocumentationWriter extends HtmlDocumentationWriter {
         handleWritesAttributes(xmlStreamWriter, processor);
     }
 
+    private String defaultIfBlank(final String test, final String defaultValue) {
+    	if ( test == null || test.trim().isEmpty() ) {
+    		return defaultValue;
+    	}
+    	return test;
+    }
+    
     /**
      * Writes out just the attributes that are being read in a table form.
      * 
@@ -91,10 +97,10 @@ public class HtmlProcessorDocumentationWriter extends HtmlDocumentationWriter {
             for (ReadsAttribute attribute : attributesRead) {
                 xmlStreamWriter.writeStartElement("tr");
                 writeSimpleElement(xmlStreamWriter, "td",
-                        StringUtils.defaultIfBlank(attribute.attribute(), "Not Specified"));
+                        defaultIfBlank(attribute.attribute(), "Not Specified"));
                 // TODO allow for HTML characters here.
                 writeSimpleElement(xmlStreamWriter, "td",
-                        StringUtils.defaultIfBlank(attribute.description(), "Not Specified"));
+                        defaultIfBlank(attribute.description(), "Not Specified"));
                 xmlStreamWriter.writeEndElement();
                 
             }
@@ -129,10 +135,10 @@ public class HtmlProcessorDocumentationWriter extends HtmlDocumentationWriter {
             for (WritesAttribute attribute : attributesRead) {
                 xmlStreamWriter.writeStartElement("tr");
                 writeSimpleElement(xmlStreamWriter, "td",
-                        StringUtils.defaultIfBlank(attribute.attribute(), "Not Specified"));
+                        defaultIfBlank(attribute.attribute(), "Not Specified"));
                 // TODO allow for HTML characters here.
                 writeSimpleElement(xmlStreamWriter, "td",
-                        StringUtils.defaultIfBlank(attribute.description(), "Not Specified"));
+                        defaultIfBlank(attribute.description(), "Not Specified"));
                 xmlStreamWriter.writeEndElement();
             }
             xmlStreamWriter.writeEndElement();

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e18c0a7d/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/html/HtmlDocumentationWriterTest.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/html/HtmlDocumentationWriterTest.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/html/HtmlDocumentationWriterTest.java
index 9d7926e..90ff09f 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/html/HtmlDocumentationWriterTest.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/html/HtmlDocumentationWriterTest.java
@@ -30,10 +30,18 @@ import org.apache.nifi.reporting.ReportingTask;
 import org.junit.Test;
 
 import static org.apache.nifi.documentation.html.XmlValidator.assertContains;
+import static org.junit.Assert.assertEquals;
 
 public class HtmlDocumentationWriterTest {
 
 	@Test
+	public void testJoin() {
+		assertEquals("a, b, c", HtmlDocumentationWriter.join(new String[] {"a",  "b", "c"}, ", "));
+		assertEquals("a, b", HtmlDocumentationWriter.join(new String[] {"a", "b"}, ", "));
+		assertEquals("a", HtmlDocumentationWriter.join(new String[] {"a"}, ", "));
+	}
+	
+	@Test
 	public void testDocumentControllerService() throws InitializationException, IOException {
 
 		ControllerService controllerService = new FullyDocumentedControllerService();


[34/50] [abbrv] incubator-nifi git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop

Posted by jo...@apache.org.
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/7aca8eae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/7aca8eae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/7aca8eae

Branch: refs/heads/NIFI-271
Commit: 7aca8eaeae7c8907bc1f5a4ba8e4fc74e011d710
Parents: 9054dd4 f1c36e6
Author: Matt Gilman <ma...@gmail.com>
Authored: Sat Apr 11 07:55:28 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Sat Apr 11 07:55:28 2015 -0400

----------------------------------------------------------------------
 nifi/nifi-assembly/NOTICE                       |  49 +
 nifi/nifi-assembly/pom.xml                      | 925 ++++++++++---------
 .../nifi-hl7-query-language/.gitignore          |   3 +
 .../nifi-hl7-query-language/pom.xml             | 125 +++
 .../apache/nifi/hl7/query/antlr/HL7QueryLexer.g | 173 ++++
 .../nifi/hl7/query/antlr/HL7QueryParser.g       | 108 +++
 .../org/apache/nifi/hl7/hapi/EmptyField.java    |  37 +
 .../org/apache/nifi/hl7/hapi/HapiField.java     |  83 ++
 .../org/apache/nifi/hl7/hapi/HapiMessage.java   |  94 ++
 .../org/apache/nifi/hl7/hapi/HapiSegment.java   |  69 ++
 .../apache/nifi/hl7/hapi/SingleValueField.java  |  42 +
 .../java/org/apache/nifi/hl7/io/HL7Reader.java  |  27 +
 .../hl7/io/exception/InvalidHL7Exception.java   |  40 +
 .../org/apache/nifi/hl7/model/HL7Component.java |  24 +
 .../org/apache/nifi/hl7/model/HL7Field.java     |  21 +
 .../org/apache/nifi/hl7/model/HL7Message.java   |  27 +
 .../org/apache/nifi/hl7/model/HL7Segment.java   |  27 +
 .../org/apache/nifi/hl7/query/Declaration.java  |  29 +
 .../org/apache/nifi/hl7/query/HL7Query.java     | 412 +++++++++
 .../org/apache/nifi/hl7/query/QueryResult.java  |  29 +
 .../org/apache/nifi/hl7/query/ResultHit.java    |  25 +
 .../org/apache/nifi/hl7/query/Selection.java    |  37 +
 .../hl7/query/evaluator/BooleanEvaluator.java   |  24 +
 .../nifi/hl7/query/evaluator/Evaluator.java     |  27 +
 .../hl7/query/evaluator/IntegerEvaluator.java   |  26 +
 .../hl7/query/evaluator/StringEvaluator.java    |  25 +
 .../comparison/AbstractComparisonEvaluator.java | 106 +++
 .../comparison/AbstractNumericComparison.java   |  67 ++
 .../evaluator/comparison/EqualsEvaluator.java   |  32 +
 .../comparison/GreaterThanEvaluator.java        |  34 +
 .../comparison/GreaterThanOrEqualEvaluator.java |  34 +
 .../evaluator/comparison/IsNullEvaluator.java   |  69 ++
 .../evaluator/comparison/LessThanEvaluator.java |  31 +
 .../comparison/LessThanOrEqualEvaluator.java    |  31 +
 .../comparison/NotEqualsEvaluator.java          |  32 +
 .../evaluator/comparison/NotEvaluator.java      |  36 +
 .../evaluator/comparison/NotNullEvaluator.java  |  65 ++
 .../literal/IntegerLiteralEvaluator.java        |  36 +
 .../literal/StringLiteralEvaluator.java         |  35 +
 .../hl7/query/evaluator/logic/AndEvaluator.java |  43 +
 .../hl7/query/evaluator/logic/OrEvaluator.java  |  43 +
 .../message/DeclaredReferenceEvaluator.java     |  42 +
 .../query/evaluator/message/DotEvaluator.java   |  88 ++
 .../query/evaluator/message/FieldEvaluator.java |  67 ++
 .../evaluator/message/MessageEvaluator.java     |  34 +
 .../evaluator/message/SegmentEvaluator.java     |  51 +
 .../exception/HL7QueryParsingException.java     |  37 +
 .../nifi/hl7/query/result/MissedResult.java     |  56 ++
 .../hl7/query/result/StandardQueryResult.java   |  69 ++
 .../hl7/query/result/StandardResultHit.java     |  41 +
 .../org/apache/nifi/hl7/query/TestHL7Query.java | 310 +++++++
 .../src/test/resources/hyperglycemia            |   5 +
 .../src/test/resources/hypoglycemia             |   5 +
 .../client/socket/EndpointConnectionPool.java   |  57 +-
 .../nifi/remote/client/socket/SocketClient.java |   3 +-
 .../protocol/socket/SocketClientProtocol.java   |   8 +-
 .../socket/SocketClientTransaction.java         |  25 +-
 nifi/nifi-commons/pom.xml                       |   1 +
 .../nifi-framework/nifi-documentation/pom.xml   |   8 -
 .../html/HtmlDocumentationWriter.java           |  15 +-
 .../html/HtmlProcessorDocumentationWriter.java  |  16 +-
 .../html/HtmlDocumentationWriterTest.java       |   8 +
 .../repository/StandardRepositoryRecord.java    |  15 +-
 .../tasks/ContinuallyRunConnectableTask.java    |   2 +-
 .../nifi/remote/StandardRemoteGroupPort.java    |   6 +-
 .../nifi-geo-bundle/nifi-geo-nar/pom.xml        |  33 +
 .../nifi-geo-processors/.gitignore              |   1 +
 .../nifi-geo-bundle/nifi-geo-processors/pom.xml |  43 +
 .../org/apache/nifi/processors/GeoEnrichIP.java | 210 +++++
 .../nifi/processors/maxmind/DatabaseReader.java | 286 ++++++
 .../org.apache.nifi.processor.Processor         |  16 +
 nifi/nifi-nar-bundles/nifi-geo-bundle/pom.xml   |  42 +
 .../nifi-hl7-bundle/nifi-hl7-nar/pom.xml        |  36 +
 .../nifi-hl7-processors/.gitignore              |   1 +
 .../nifi-hl7-bundle/nifi-hl7-processors/pom.xml | 120 +++
 .../processors/hl7/ExtractHL7Attributes.java    | 247 +++++
 .../apache/nifi/processors/hl7/RouteHL7.java    | 217 +++++
 .../org.apache.nifi.processor.Processor         |  16 +
 .../hl7/TestExtractHL7Attributes.java           |  48 +
 .../src/test/resources/hypoglycemia.hl7         |   5 +
 nifi/nifi-nar-bundles/nifi-hl7-bundle/pom.xml   |  33 +
 .../nifi-language-translation-nar/pom.xml       |  36 +
 .../nifi-yandex-processors/.gitignore           |   1 +
 .../nifi-yandex-processors/pom.xml              |  63 ++
 .../nifi/processors/yandex/YandexTranslate.java | 333 +++++++
 .../processors/yandex/model/Translation.java    |  52 ++
 .../nifi/processors/yandex/util/Languages.java  |  86 ++
 .../yandex/util/ObjectMapperResolver.java       |  48 +
 .../org.apache.nifi.processor.Processor         |  16 +
 .../processors/yandex/TestYandexTranslate.java  | 226 +++++
 .../nifi-language-translation-bundle/pom.xml    |  48 +
 .../nifi-social-media-nar/pom.xml               |  36 +
 .../nifi-twitter-processors/.gitignore          |   1 +
 .../nifi-twitter-processors/pom.xml             |  60 ++
 .../nifi/processors/twitter/GetTwitter.java     | 360 ++++++++
 .../org.apache.nifi.processor.Processor         |  16 +
 .../nifi-social-media-bundle/pom.xml            |  33 +
 nifi/nifi-nar-bundles/pom.xml                   |   4 +
 nifi/pom.xml                                    |  24 +
 99 files changed, 6480 insertions(+), 488 deletions(-)
----------------------------------------------------------------------



[49/50] [abbrv] incubator-nifi git commit: NIFI-485: Allow user to choose how to handle missing JsonPath by ignoring or with a warning

Posted by jo...@apache.org.
NIFI-485:  Allow user to choose how to handle missing JsonPath by ignoring or with a warning


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/53b6ac33
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/53b6ac33
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/53b6ac33

Branch: refs/heads/NIFI-271
Commit: 53b6ac3333d19aff0cc68341fe944da9b0e445f9
Parents: 13cd2a6
Author: Aldrin Piri <al...@gmail.com>
Authored: Sun Apr 19 09:24:45 2015 -0400
Committer: Aldrin Piri <al...@gmail.com>
Committed: Sun Apr 19 09:24:45 2015 -0400

----------------------------------------------------------------------
 .../processors/standard/EvaluateJsonPath.java   | 21 ++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/53b6ac33/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 f214178..7f92213 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
@@ -75,6 +75,9 @@ public class EvaluateJsonPath extends AbstractJsonPathProcessor {
     public static final String RETURN_TYPE_JSON = "json";
     public static final String RETURN_TYPE_SCALAR = "scalar";
 
+    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.")
@@ -90,6 +93,14 @@ public class EvaluateJsonPath extends AbstractJsonPathProcessor {
             .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 Behavior")
+            .description("Indicates how to handle missing JSON path expressions when destination is set to 'flowfile-attribute'. Selecting 'warn' will generate a warning when a JSON path expression is not found.")
+            .required(true)
+            .allowableValues(PATH_NOT_FOUND_WARN, PATH_NOT_FOUND_IGNORE)
+            .defaultValue(PATH_NOT_FOUND_IGNORE)
+            .build();
 
     public static final Relationship REL_MATCH = new Relationship.Builder().name("matched").description("FlowFiles are routed to this relationship when the JsonPath is successfully evaluated and the FlowFile is modified as a result").build();
     public static final Relationship REL_NO_MATCH = new Relationship.Builder().name("unmatched").description("FlowFiles are routed to this relationship when the JsonPath does not match the content of the FlowFile and the Destination is set to flowfile-content").build();
@@ -111,6 +122,7 @@ public class EvaluateJsonPath extends AbstractJsonPathProcessor {
         final List<PropertyDescriptor> properties = new ArrayList<>();
         properties.add(DESTINATION);
         properties.add(RETURN_TYPE);
+        properties.add(PATH_NOT_FOUND);
         properties.add(NULL_VALUE_DEFAULT_REPRESENTATION);
         this.properties = Collections.unmodifiableList(properties);
     }
@@ -239,6 +251,7 @@ public class EvaluateJsonPath extends AbstractJsonPathProcessor {
 
             String jsonPathAttrKey = attributeJsonPathEntry.getKey();
             JsonPath jsonPathExp = attributeJsonPathEntry.getValue();
+            final String pathNotFound = processContext.getProperty(PATH_NOT_FOUND).getValue();
 
             final ObjectHolder<Object> resultHolder = new ObjectHolder<>(null);
             try {
@@ -251,7 +264,11 @@ public class EvaluateJsonPath extends AbstractJsonPathProcessor {
                 }
                 resultHolder.set(result);
             } catch (PathNotFoundException e) {
-                logger.warn("FlowFile {} could not find path {} for attribute key {}.", new Object[]{flowFile.getId(), jsonPathExp.getPath(), jsonPathAttrKey}, e);
+            	
+            	if (pathNotFound.equals(PATH_NOT_FOUND_WARN)) {
+                    logger.warn("FlowFile {} could not find path {} for attribute key {}.", new Object[]{flowFile.getId(), jsonPathExp.getPath(), jsonPathAttrKey}, e);
+            	}
+            	
                 if (destination.equals(DESTINATION_ATTRIBUTE)) {
                     jsonPathResults.put(jsonPathAttrKey, StringUtils.EMPTY);
                     continue;
@@ -283,4 +300,4 @@ public class EvaluateJsonPath extends AbstractJsonPathProcessor {
         flowFile = processSession.putAllAttributes(flowFile, jsonPathResults);
         processSession.transfer(flowFile, REL_MATCH);
     }
-}
\ No newline at end of file
+}


[26/50] [abbrv] incubator-nifi git commit: Revert "NIFI-488: Redirect nifi output streams and redirect bootstrap log messages to file"

Posted by jo...@apache.org.
Revert "NIFI-488: Redirect nifi output streams and redirect bootstrap log messages to file"

This reverts commit abd279c1e01e3aea3332e6b378701554722317e6.


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/3515f2c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/3515f2c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/3515f2c1

Branch: refs/heads/NIFI-271
Commit: 3515f2c12fedb8cd1e88bb8793b75a31317038b3
Parents: 2c6b2a5
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 10 11:20:23 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 10 11:20:23 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/nifi/bootstrap/RunNiFi.java | 131 +++----------------
 .../src/main/resources/conf/bootstrap.conf      |   5 -
 2 files changed, 17 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/3515f2c1/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 d25df97..28a9b71 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
@@ -45,10 +45,9 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
-import java.util.logging.FileHandler;
+import java.util.logging.ConsoleHandler;
 import java.util.logging.Handler;
 import java.util.logging.Level;
-import java.util.logging.SimpleFormatter;
 
 
 /**
@@ -93,82 +92,16 @@ public class RunNiFi {
 
 	private final java.util.logging.Logger logger;
 	
-	public RunNiFi(final File bootstrapConfigFile, final boolean verbose) throws IOException {
+	public RunNiFi(final File bootstrapConfigFile, final boolean verbose) {
 		this.bootstrapConfigFile = bootstrapConfigFile;
 		logger = java.util.logging.Logger.getLogger("Bootstrap");
-		
-		final Properties bootstrapProps = new Properties();
-		try (final InputStream configIn = new FileInputStream(bootstrapConfigFile)) {
-			bootstrapProps.load(configIn);
-		}
-
-		String logFilename = bootstrapProps.getProperty("bootstrap.log.file");
-		if ( logFilename == null ) {
-			logFilename = "./logs/bootstrap.log";
-		}
-		
-		File logFile = new File(logFilename);
-		if ( !logFile.isAbsolute() ) {
-			final File workDir = getDefaultWorkingDirectory();
-			logFile = new File(workDir, logFilename);
-		}
-		
-		final File logFileDir = logFile.getParentFile();
-		final Handler fileHandler;
-		if ( logFileDir.exists() || logFileDir.mkdirs() ) {
-			final int maxSize = getIntProp(bootstrapProps, "bootstrap.log.max.bytes", 1024 * 1024 * 10);	// 10 MB
-			final int numFiles = getIntProp(bootstrapProps, "bootstrap.log.count", 10);
-			
-			fileHandler = new FileHandler(logFile.getAbsolutePath(), maxSize, numFiles, true);
-			fileHandler.setFormatter(new SimpleFormatter());
-			logger.addHandler(fileHandler);
-		} else {
-			fileHandler = null;
-			logger.severe("Could not create log file directory " + logFileDir + ". Will not log bootstrap info to file or redirect NiFi standard out to file");
-		}
-		
 		if ( verbose ) {
 		    logger.info("Enabling Verbose Output");
 		    
 		    logger.setLevel(Level.FINE);
-		    
-		    for ( final Handler handler : logger.getHandlers() ) {
-		    	handler.setLevel(Level.FINE);
-		    }
-		}
-	}
-	
-	
-	private File getLogFile() throws IOException {
-		final Properties bootstrapProps = new Properties();
-		try (final InputStream configIn = new FileInputStream(bootstrapConfigFile)) {
-			bootstrapProps.load(configIn);
-		}
-
-		String logFilename = bootstrapProps.getProperty("bootstrap.log.file");
-		if ( logFilename == null ) {
-			logFilename = "./logs/bootstrap.log";
-		}
-		
-		File logFile = new File(logFilename);
-		if ( !logFile.isAbsolute() ) {
-			final File workDir = getDefaultWorkingDirectory();
-			logFile = new File(workDir, logFilename);
-		}
-
-		return logFile;
-	}
-	
-	private static int getIntProp(final Properties properties, final String name, final int defaultValue) {
-		String propVal = properties.getProperty(name);
-		if ( propVal == null || propVal.trim().isEmpty() ) {
-			return defaultValue;
-		}
-		
-		try {
-			return Integer.parseInt(propVal.trim());
-		} catch (final NumberFormatException nfe) {
-			throw new NumberFormatException("Expected bootstrap property '" + name + "' to be an integer but found value: " + propVal);
+		    final Handler handler = new ConsoleHandler();
+		    handler.setLevel(Level.FINE);
+		    logger.addHandler(handler);
 		}
 	}
 	
@@ -648,35 +581,6 @@ public class RunNiFi {
 		}
 	}
 	
-	private void redirectOutput(final Process process) {
-		redirectStreamToLogs(process.getInputStream());
-		redirectStreamToLogs(process.getErrorStream());
-	}
-	
-	private void redirectStreamToLogs(final InputStream in) {
-		final Thread t = new Thread(new Runnable() {
-			@Override
-			public void run() {
-				try (final BufferedReader reader = new BufferedReader(new InputStreamReader(in))) {
-					String line;
-					while ((line = reader.readLine()) != null) {
-						logger.info(line);
-					}
-				} catch (IOException e) {
-					logger.warning("Failed to read output of NiFi console: " + e);
-				}
-			}
-		});
-		t.setDaemon(true);
-		t.start();
-	}
-	
-	private File getDefaultWorkingDirectory() {
-		final File bootstrapConfigAbsoluteFile = bootstrapConfigFile.getAbsoluteFile();
-		final File binDir = bootstrapConfigAbsoluteFile.getParentFile();
-		return binDir.getParentFile();
-	}
-	
 	@SuppressWarnings({ "rawtypes", "unchecked" })
 	public void start(final boolean monitor) throws IOException, InterruptedException {
 		final Integer port = getCurrentPort();
@@ -686,6 +590,7 @@ public class RunNiFi {
 		}
 		
 		final ProcessBuilder builder = new ProcessBuilder();
+
 		if ( !bootstrapConfigFile.exists() ) {
 			throw new FileNotFoundException(bootstrapConfigFile.getAbsolutePath());
 		}
@@ -699,16 +604,17 @@ public class RunNiFi {
 		props.putAll( (Map) properties );
 
 		final String specifiedWorkingDir = props.get("working.dir");
-		final File workingDir = getDefaultWorkingDirectory();
-		if ( specifiedWorkingDir == null ) {
-			builder.directory(workingDir);
-		} else {
+		if ( specifiedWorkingDir != null ) {
 			builder.directory(new File(specifiedWorkingDir));
 		}
+
+		final File bootstrapConfigAbsoluteFile = bootstrapConfigFile.getAbsoluteFile();
+		final File binDir = bootstrapConfigAbsoluteFile.getParentFile();
+		final File workingDir = binDir.getParentFile();
 		
-		final File logDir = getLogFile().getParentFile();
-		builder.redirectError(new File(logDir, "nifi.err"));
-		builder.redirectOutput(new File(logDir, "nifi.out"));
+		if ( specifiedWorkingDir == null ) {
+			builder.directory(workingDir);
+		}
 		
 		final String libFilename = replaceNull(props.get("lib.dir"), "./lib").trim();
 		File libDir = getFile(libFilename, workingDir);
@@ -832,15 +738,14 @@ public class RunNiFi {
 			try {
 				gracefulShutdownSeconds = Integer.parseInt(gracefulShutdown);
 			} catch (final NumberFormatException nfe) {
-				throw new NumberFormatException("The '" + GRACEFUL_SHUTDOWN_PROP + "' property in Bootstrap Config File " + bootstrapConfigFile.getAbsolutePath() + " has an invalid value. Must be a non-negative integer");
+				throw new NumberFormatException("The '" + GRACEFUL_SHUTDOWN_PROP + "' property in Bootstrap Config File " + bootstrapConfigAbsoluteFile.getAbsolutePath() + " has an invalid value. Must be a non-negative integer");
 			}
 			
 			if ( gracefulShutdownSeconds < 0 ) {
-				throw new NumberFormatException("The '" + GRACEFUL_SHUTDOWN_PROP + "' property in Bootstrap Config File " + bootstrapConfigFile.getAbsolutePath() + " has an invalid value. Must be a non-negative integer");
+				throw new NumberFormatException("The '" + GRACEFUL_SHUTDOWN_PROP + "' property in Bootstrap Config File " + bootstrapConfigAbsoluteFile.getAbsolutePath() + " has an invalid value. Must be a non-negative integer");
 			}
 			
 			Process process = builder.start();
-			redirectOutput(process);
 			Long pid = getPid(process);
 		    if ( pid != null ) {
                 nifiPid = pid;
@@ -871,8 +776,7 @@ public class RunNiFi {
 					if (autoRestartNiFi) {
 						logger.warning("Apache NiFi appears to have died. Restarting...");
 						process = builder.start();
-						redirectOutput(process);
-
+						
 						pid = getPid(process);
 						if ( pid != null ) {
 			                nifiPid = pid;
@@ -898,7 +802,6 @@ public class RunNiFi {
 			}
 		} else {
 			final Process process = builder.start();
-			redirectOutput(process);
 			final Long pid = getPid(process);
 			
 			if ( pid != null ) {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/3515f2c1/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/bootstrap.conf
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/bootstrap.conf b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/bootstrap.conf
index e87bde2..c1536d8 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/bootstrap.conf
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/bootstrap.conf
@@ -21,11 +21,6 @@ java=java
 # Username to use when running NiFi. This value will be ignored on Windows.
 run.as=
 
-# Bootstrap logger info
-bootstrap.log.file=logs/nifi-bootstrap.log
-bootstrap.log.max.bytes=10485760
-bootstrap.log.count=10
-
 # Configure where NiFi's lib and conf directories live
 lib.dir=./lib
 conf.dir=./conf


[45/50] [abbrv] incubator-nifi git commit: Merge branch 'develop' of http://git-wip-us.apache.org/repos/asf/incubator-nifi into develop

Posted by jo...@apache.org.
Merge branch 'develop' of http://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/3667a28e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/3667a28e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/3667a28e

Branch: refs/heads/NIFI-271
Commit: 3667a28e87224a02ae2a7a5a29e36543c242f5be
Parents: 509933f ce5a654
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 17 12:06:52 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 17 12:06:52 2015 -0400

----------------------------------------------------------------------
 .../nifi/annotation/lifecycle/OnAdded.java      |   13 +-
 .../nifi/annotation/lifecycle/OnDisabled.java   |   29 +-
 .../nifi/annotation/lifecycle/OnEnabled.java    |   34 +-
 .../nifi/annotation/lifecycle/OnRemoved.java    |   14 +-
 .../nifi/annotation/lifecycle/OnShutdown.java   |   13 +-
 .../nifi/annotation/lifecycle/OnStopped.java    |    9 +
 .../annotation/lifecycle/OnUnscheduled.java     |    2 -
 .../nifi/components/PropertyDescriptor.java     |   14 +-
 .../nifi/components/ValidationContext.java      |    9 +
 .../controller/AbstractControllerService.java   |   13 +-
 .../ControllerServiceInitializationContext.java |   10 +
 .../controller/ControllerServiceLookup.java     |   19 +
 .../org/apache/nifi/logging/ComponentLog.java   |  100 +
 .../org/apache/nifi/logging/ProcessorLog.java   |   61 +-
 .../nifi/reporting/AbstractReportingTask.java   |   10 +
 .../ReportingInitializationContext.java         |   10 +
 .../nifi/web/ClusterRequestException.java       |    1 +
 .../org/apache/nifi/web/ComponentDetails.java   |  157 ++
 .../apache/nifi/web/ConfigurationAction.java    |  137 ++
 .../nifi/web/NiFiWebConfigurationContext.java   |  102 +
 .../web/NiFiWebConfigurationRequestContext.java |   31 +
 .../org/apache/nifi/web/NiFiWebContext.java     |    1 +
 .../apache/nifi/web/NiFiWebContextConfig.java   |    1 +
 .../apache/nifi/web/NiFiWebRequestContext.java  |   58 +
 .../nifi/web/ProcessorConfigurationAction.java  |    1 +
 .../java/org/apache/nifi/web/ProcessorInfo.java |    1 +
 .../main/java/org/apache/nifi/web/Revision.java |   32 +-
 .../org/apache/nifi/web/UiExtensionType.java    |   31 +
 nifi/nifi-assembly/NOTICE                       |   65 +
 nifi/nifi-assembly/pom.xml                      |  927 +++++-----
 .../nifi-hl7-query-language/.gitignore          |    3 +
 .../nifi-hl7-query-language/pom.xml             |  122 ++
 .../apache/nifi/hl7/query/antlr/HL7QueryLexer.g |  173 ++
 .../nifi/hl7/query/antlr/HL7QueryParser.g       |  108 ++
 .../org/apache/nifi/hl7/hapi/EmptyField.java    |   37 +
 .../org/apache/nifi/hl7/hapi/HapiField.java     |   83 +
 .../org/apache/nifi/hl7/hapi/HapiMessage.java   |   94 +
 .../org/apache/nifi/hl7/hapi/HapiSegment.java   |   69 +
 .../apache/nifi/hl7/hapi/SingleValueField.java  |   42 +
 .../java/org/apache/nifi/hl7/io/HL7Reader.java  |   27 +
 .../hl7/io/exception/InvalidHL7Exception.java   |   40 +
 .../org/apache/nifi/hl7/model/HL7Component.java |   24 +
 .../org/apache/nifi/hl7/model/HL7Field.java     |   21 +
 .../org/apache/nifi/hl7/model/HL7Message.java   |   27 +
 .../org/apache/nifi/hl7/model/HL7Segment.java   |   27 +
 .../org/apache/nifi/hl7/query/Declaration.java  |   29 +
 .../org/apache/nifi/hl7/query/HL7Query.java     |  412 +++++
 .../org/apache/nifi/hl7/query/QueryResult.java  |   29 +
 .../org/apache/nifi/hl7/query/ResultHit.java    |   25 +
 .../org/apache/nifi/hl7/query/Selection.java    |   37 +
 .../hl7/query/evaluator/BooleanEvaluator.java   |   24 +
 .../nifi/hl7/query/evaluator/Evaluator.java     |   27 +
 .../hl7/query/evaluator/IntegerEvaluator.java   |   26 +
 .../hl7/query/evaluator/StringEvaluator.java    |   25 +
 .../comparison/AbstractComparisonEvaluator.java |  106 ++
 .../comparison/AbstractNumericComparison.java   |   67 +
 .../evaluator/comparison/EqualsEvaluator.java   |   32 +
 .../comparison/GreaterThanEvaluator.java        |   34 +
 .../comparison/GreaterThanOrEqualEvaluator.java |   34 +
 .../evaluator/comparison/IsNullEvaluator.java   |   69 +
 .../evaluator/comparison/LessThanEvaluator.java |   31 +
 .../comparison/LessThanOrEqualEvaluator.java    |   31 +
 .../comparison/NotEqualsEvaluator.java          |   32 +
 .../evaluator/comparison/NotEvaluator.java      |   36 +
 .../evaluator/comparison/NotNullEvaluator.java  |   65 +
 .../literal/IntegerLiteralEvaluator.java        |   36 +
 .../literal/StringLiteralEvaluator.java         |   35 +
 .../hl7/query/evaluator/logic/AndEvaluator.java |   43 +
 .../hl7/query/evaluator/logic/OrEvaluator.java  |   43 +
 .../message/DeclaredReferenceEvaluator.java     |   42 +
 .../query/evaluator/message/DotEvaluator.java   |   88 +
 .../query/evaluator/message/FieldEvaluator.java |   67 +
 .../evaluator/message/MessageEvaluator.java     |   34 +
 .../evaluator/message/SegmentEvaluator.java     |   51 +
 .../exception/HL7QueryParsingException.java     |   37 +
 .../nifi/hl7/query/result/MissedResult.java     |   56 +
 .../hl7/query/result/StandardQueryResult.java   |   69 +
 .../hl7/query/result/StandardResultHit.java     |   41 +
 .../org/apache/nifi/hl7/query/TestHL7Query.java |  310 ++++
 .../src/test/resources/hyperglycemia            |    5 +
 .../src/test/resources/hypoglycemia             |    5 +
 .../nifi/processor/util/StandardValidators.java |   20 +-
 .../org/apache/nifi/util/NiFiProperties.java    |    2 -
 .../client/socket/EndpointConnectionPool.java   |   59 +-
 .../nifi/remote/client/socket/SocketClient.java |    9 +-
 .../protocol/socket/SocketClientProtocol.java   |    8 +-
 .../socket/SocketClientTransaction.java         |   25 +-
 .../socket/TestEndpointConnectionStatePool.java |    4 +-
 .../java/org/apache/nifi/util/EscapeUtils.java  |   42 +
 nifi/nifi-commons/pom.xml                       |    1 +
 .../src/main/asciidoc/administration-guide.adoc |   21 +-
 ...kControllerServiceInitializationContext.java |   17 +
 .../nifi/util/MockControllerServiceLookup.java  |   11 +
 .../MockProcessorInitializationContext.java     |   10 +
 .../org/apache/nifi/util/MockProcessorLog.java  |   34 +-
 .../MockReportingInitializationContext.java     |   10 +-
 .../apache/nifi/util/MockValidationContext.java |   15 +
 .../nifi/util/StandardProcessorTestRunner.java  |    5 +-
 .../nifi-aws-bundle/nifi-aws-nar/pom.xml        |   36 +
 .../nifi-aws-bundle/nifi-aws-processors/pom.xml |   58 +
 .../processors/aws/AbstractAWSProcessor.java    |  195 ++
 .../processors/aws/s3/AbstractS3Processor.java  |  171 ++
 .../nifi/processors/aws/s3/FetchS3Object.java   |  157 ++
 .../nifi/processors/aws/s3/PutS3Object.java     |  181 ++
 .../aws/sns/AbstractSNSProcessor.java           |   60 +
 .../apache/nifi/processors/aws/sns/PutSNS.java  |  155 ++
 .../aws/sqs/AbstractSQSProcessor.java           |   51 +
 .../nifi/processors/aws/sqs/DeleteSQS.java      |   95 +
 .../apache/nifi/processors/aws/sqs/GetSQS.java  |  204 ++
 .../apache/nifi/processors/aws/sqs/PutSQS.java  |  147 ++
 .../org.apache.nifi.processor.Processor         |   20 +
 .../processors/aws/s3/TestFetchS3Object.java    |   44 +
 .../nifi/processors/aws/s3/TestPutS3Object.java |   87 +
 .../nifi/processors/aws/sns/TestPutSNS.java     |   34 +
 .../nifi/processors/aws/sqs/TestGetSQS.java     |   32 +
 .../nifi/processors/aws/sqs/TestPutSQS.java     |   35 +
 .../src/test/resources/hello.txt                |    1 +
 nifi/nifi-nar-bundles/nifi-aws-bundle/pom.xml   |   43 +
 .../org/apache/nifi/admin/dao/ActionDAO.java    |    6 +-
 .../nifi/admin/dao/impl/StandardActionDAO.java  |   60 +-
 .../apache/nifi/admin/service/AuditService.java |    6 +-
 .../admin/service/action/GetPreviousValues.java |    8 +-
 .../service/impl/StandardAuditService.java      |    4 +-
 .../nifi/web/api/dto/ComponentHistoryDTO.java   |   56 +
 .../web/api/dto/ControllerConfigurationDTO.java |   18 +
 .../nifi/web/api/dto/ControllerServiceDTO.java  |  190 ++
 ...ontrollerServiceReferencingComponentDTO.java |  207 +++
 .../nifi/web/api/dto/DocumentedTypeDTO.java     |    6 +-
 .../apache/nifi/web/api/dto/FlowSnippetDTO.java |   15 +-
 .../nifi/web/api/dto/NiFiComponentDTO.java      |    4 +-
 .../nifi/web/api/dto/ProcessorConfigDTO.java    |  218 +--
 .../nifi/web/api/dto/ProcessorHistoryDTO.java   |   56 -
 .../nifi/web/api/dto/PropertyDescriptorDTO.java |  244 +++
 .../nifi/web/api/dto/ReportingTaskDTO.java      |  228 +++
 .../apache/nifi/web/api/dto/RevisionDTO.java    |   15 +
 .../component/details/ComponentDetailsDTO.java  |    2 +-
 .../component/details/ExtensionDetailsDTO.java  |   41 +
 .../component/details/ProcessorDetailsDTO.java  |   41 -
 .../web/api/entity/ComponentHistoryEntity.java  |   45 +
 .../web/api/entity/ControllerServiceEntity.java |   45 +
 ...ollerServiceReferencingComponentsEntity.java |   46 +
 .../entity/ControllerServiceTypesEntity.java    |   46 +
 .../api/entity/ControllerServicesEntity.java    |   46 +
 .../web/api/entity/ProcessorHistoryEntity.java  |   45 -
 .../api/entity/PropertyDescriptorEntity.java    |   46 +
 .../web/api/entity/ReportingTaskEntity.java     |   45 +
 .../api/entity/ReportingTaskTypesEntity.java    |   46 +
 .../web/api/entity/ReportingTasksEntity.java    |   46 +
 .../nifi-framework/nifi-documentation/pom.xml   |    8 -
 .../html/HtmlDocumentationWriter.java           |   15 +-
 .../html/HtmlProcessorDocumentationWriter.java  |   16 +-
 ...kControllerServiceInitializationContext.java |    6 +
 .../mock/MockControllerServiceLookup.java       |   10 +
 .../MockReportingInitializationContext.java     |    8 +-
 .../html/HtmlDocumentationWriterTest.java       |    8 +
 .../nifi-framework-cluster-web/pom.xml          |    4 -
 .../context/ClusterContextThreadLocal.java      |    7 +-
 .../ClusterAwareOptimisticLockingManager.java   |   96 -
 .../nifi-framework-cluster/pom.xml              |    4 +
 .../nifi/cluster/flow/ClusterDataFlow.java      |   15 +-
 .../cluster/flow/DataFlowManagementService.java |   17 +
 .../nifi/cluster/flow/impl/DataFlowDaoImpl.java |   43 +-
 .../impl/DataFlowManagementServiceImpl.java     |   65 +-
 .../nifi/cluster/manager/NodeResponse.java      |   14 +
 .../cluster/manager/impl/WebClusterManager.java |  929 ++++++++--
 .../spring/WebClusterManagerFactoryBean.java    |   23 +-
 .../resources/nifi-cluster-manager-context.xml  |    4 +
 .../nifi-framework-core-api/.gitignore          |    1 +
 .../controller/AbstractConfiguredComponent.java |   18 +-
 .../apache/nifi/controller/Availability.java    |   24 -
 .../nifi/controller/ProcessScheduler.java       |   27 +-
 .../apache/nifi/controller/ProcessorNode.java   |   16 +
 .../nifi/controller/ReportingTaskNode.java      |   26 +-
 .../controller/ValidationContextFactory.java    |    4 +
 .../exception/ComponentLifeCycleException.java  |   30 +
 ...ControllerServiceInstantiationException.java |   51 +
 .../ControllerServiceNotFoundException.java     |   51 -
 .../exception/ProcessorLifeCycleException.java  |   30 -
 .../reporting/ReportingTaskProvider.java        |  103 ++
 .../service/ControllerServiceNode.java          |   39 +-
 .../service/ControllerServiceProvider.java      |   83 +-
 .../service/ControllerServiceReference.java     |    7 +-
 .../service/ControllerServiceState.java         |   45 +
 .../apache/nifi/controller/FlowController.java  |  211 ++-
 .../nifi/controller/FlowFromDOMFactory.java     |   60 +-
 .../nifi/controller/StandardFlowSerializer.java |   68 +-
 .../nifi/controller/StandardFlowService.java    |    9 +-
 .../controller/StandardFlowSynchronizer.java    |  236 ++-
 .../nifi/controller/StandardProcessorNode.java  |   47 +-
 .../apache/nifi/controller/TemplateManager.java |   33 +-
 .../reporting/AbstractReportingTaskNode.java    |   76 +-
 .../reporting/StandardReportingContext.java     |   11 +
 .../StandardReportingInitializationContext.java |   23 +-
 .../repository/StandardRepositoryRecord.java    |   15 +-
 .../scheduling/StandardProcessScheduler.java    |  210 ++-
 .../service/ControllerServiceLoader.java        |  149 +-
 ...dControllerServiceInitializationContext.java |   20 +-
 .../service/StandardControllerServiceNode.java  |  128 +-
 .../StandardControllerServiceProvider.java      |  460 ++++-
 .../StandardControllerServiceReference.java     |   19 +-
 .../tasks/ContinuallyRunConnectableTask.java    |    2 +-
 .../controller/tasks/ReportingTaskWrapper.java  |   29 +-
 .../nifi/fingerprint/FingerprintFactory.java    |   79 +
 .../nifi/groups/StandardProcessGroup.java       |   32 +-
 .../nifi/persistence/FlowConfigurationDAO.java  |   25 -
 .../StandardXMLFlowConfigurationDAO.java        |  191 +-
 .../nifi/processor/SimpleProcessLogger.java     |   38 +-
 .../nifi/processor/StandardProcessContext.java  |   10 +
 .../processor/StandardSchedulingContext.java    |    5 +-
 .../processor/StandardValidationContext.java    |   12 +
 .../StandardValidationContextFactory.java       |    5 +
 .../java/org/apache/nifi/util/DomUtils.java     |   10 +
 .../ControllerServiceConfiguration.xsd          |   61 -
 .../src/main/resources/FlowConfiguration.xsd    |   49 +-
 .../resources/ReportingTaskConfiguration.xsd    |   87 -
 .../StandardControllerServiceProviderTest.java  |   71 +
 .../TestStandardControllerServiceProvider.java  |  385 ++++
 .../controller/service/mock/DummyProcessor.java |   49 +
 .../nifi/controller/service/mock/ServiceA.java  |   49 +
 .../nifi/controller/service/mock/ServiceB.java  |   23 +
 .../service/util/TestControllerService.java     |   61 +
 .../processor/TestStandardPropertyValue.java    |   11 +-
 ...org.apache.nifi.controller.ControllerService |   15 +
 .../nifi-framework/nifi-nar-utils/.gitignore    |    1 +
 .../main/resources/conf/controller-services.xml |   18 -
 .../src/main/resources/conf/nifi.properties     |    2 -
 .../src/main/resources/conf/reporting-tasks.xml |   49 -
 .../nifi/remote/StandardRemoteGroupPort.java    |    6 +-
 .../java/org/apache/nifi/action/Component.java  |    4 +-
 .../component/details/ExtensionDetails.java     |   34 +
 .../component/details/ProcessorDetails.java     |   34 -
 .../HttpServletConfigurationRequestContext.java |   56 +
 .../nifi/web/HttpServletRequestContext.java     |  100 +
 .../web/HttpServletRequestContextConfig.java    |    1 +
 .../nifi-framework/nifi-web/nifi-jetty/pom.xml  |    5 +
 .../org/apache/nifi/web/server/JettyServer.java |  208 ++-
 .../nifi-web/nifi-ui-extension/pom.xml          |   21 +
 .../apache/nifi/ui/extension/UiExtension.java   |   52 +
 .../nifi/ui/extension/UiExtensionMapping.java   |   52 +
 .../nifi-web/nifi-web-api/pom.xml               |    5 +
 .../nifi/audit/ControllerServiceAuditor.java    |  475 +++++
 .../org/apache/nifi/audit/FunnelAuditor.java    |    8 +-
 .../java/org/apache/nifi/audit/NiFiAuditor.java |   11 +-
 .../java/org/apache/nifi/audit/PortAuditor.java |   17 +-
 .../apache/nifi/audit/ProcessGroupAuditor.java  |   18 +-
 .../org/apache/nifi/audit/ProcessorAuditor.java |   20 +-
 .../apache/nifi/audit/RelationshipAuditor.java  |   18 +-
 .../nifi/audit/RemoteProcessGroupAuditor.java   |   22 +-
 .../apache/nifi/audit/ReportingTaskAuditor.java |  353 ++++
 .../org/apache/nifi/audit/SnippetAuditor.java   |   13 +-
 .../org/apache/nifi/web/NiFiServiceFacade.java  |  207 ++-
 .../nifi/web/StandardNiFiContentAccess.java     |   10 +-
 .../nifi/web/StandardNiFiServiceFacade.java     | 1371 ++++++++------
 .../StandardNiFiWebConfigurationContext.java    |  736 ++++++++
 .../apache/nifi/web/StandardNiFiWebContext.java |   28 +-
 .../nifi/web/api/ApplicationResource.java       |   76 +-
 .../apache/nifi/web/api/ClusterResource.java    |    2 +-
 .../apache/nifi/web/api/ConnectionResource.java |    6 +-
 .../apache/nifi/web/api/ControllerResource.java |  102 +-
 .../nifi/web/api/ControllerServiceResource.java |  803 ++++++++
 .../org/apache/nifi/web/api/FunnelResource.java |    6 +-
 .../apache/nifi/web/api/HistoryResource.java    |   70 +-
 .../apache/nifi/web/api/InputPortResource.java  |    6 +-
 .../org/apache/nifi/web/api/LabelResource.java  |    6 +-
 .../apache/nifi/web/api/OutputPortResource.java |    6 +-
 .../nifi/web/api/ProcessGroupResource.java      |   16 +-
 .../apache/nifi/web/api/ProcessorResource.java  |   72 +-
 .../web/api/RemoteProcessGroupResource.java     |   10 +-
 .../nifi/web/api/ReportingTaskResource.java     |  663 +++++++
 .../apache/nifi/web/api/SnippetResource.java    |    6 +-
 .../config/AdministrationExceptionMapper.java   |    6 +-
 .../web/api/config/ClusterExceptionMapper.java  |    6 +-
 .../web/api/config/NotFoundExceptionMapper.java |   48 +
 .../nifi/web/api/config/ThrowableMapper.java    |    6 +-
 .../org/apache/nifi/web/api/dto/DtoFactory.java |  303 ++-
 .../nifi/web/controller/ControllerFacade.java   |  112 +-
 .../nifi/web/dao/ControllerServiceDAO.java      |  110 ++
 .../apache/nifi/web/dao/ReportingTaskDAO.java   |   88 +
 .../dao/impl/StandardControllerServiceDAO.java  |  320 ++++
 .../nifi/web/dao/impl/StandardProcessorDAO.java |   13 +-
 .../web/dao/impl/StandardReportingTaskDAO.java  |  365 ++++
 .../nifi/web/dao/impl/StandardSnippetDAO.java   |   36 +-
 .../ControllerServiceProviderFactoryBean.java   |   68 +
 .../OptimisticLockingManagerFactoryBean.java    |   67 +
 .../ReportingTaskProviderFactoryBean.java       |   69 +
 .../org/apache/nifi/web/util/Availability.java  |   34 +
 .../org/apache/nifi/web/util/SnippetUtils.java  |  181 +-
 .../src/main/resources/nifi-web-api-context.xml |   61 +-
 .../nifi/integration/util/NiFiTestServer.java   |    5 +
 .../nifi/web/ContentViewerController.java       |   18 +-
 .../src/main/webapp/WEB-INF/jsp/header.jsp      |   20 +-
 .../src/main/webapp/WEB-INF/jsp/hexview.jsp     |    2 +-
 .../src/main/webapp/css/main.css                |    2 +-
 .../src/main/webapp/js/hexview/hexview.js       |    4 +-
 .../nifi-web/nifi-web-docs/pom.xml              |    6 +
 .../nifi/web/docs/DocumentationController.java  |    5 +-
 .../main/webapp/WEB-INF/jsp/documentation.jsp   |   20 +-
 .../src/main/webapp/js/application.js           |    7 +-
 .../nifi-web-optimistic-locking/pom.xml         |   12 +
 .../apache/nifi/web/ConfigurationRequest.java   |   34 +
 .../apache/nifi/web/ConfigurationSnapshot.java  |   22 +-
 .../org/apache/nifi/web/FlowModification.java   |   57 +
 .../nifi/web/OptimisticLockingManager.java      |   76 +-
 .../web/StandardOptimisticLockingManager.java   |  150 +-
 .../org/apache/nifi/web/UpdateRevision.java     |   31 +
 .../nifi/web/security/user/NiFiUserUtils.java   |   10 +
 .../nifi-framework/nifi-web/nifi-web-ui/pom.xml |   18 +-
 .../main/resources/filters/canvas.properties    |    8 +-
 .../src/main/webapp/WEB-INF/pages/canvas.jsp    |   11 +-
 .../main/webapp/WEB-INF/pages/message-page.jsp  |    6 +-
 .../src/main/webapp/WEB-INF/pages/summary.jsp   |    2 +
 .../WEB-INF/partials/canvas/canvas-header.jsp   |    2 +-
 .../canvas/controller-service-configuration.jsp |   90 +
 .../disable-controller-service-dialog.jsp       |   71 +
 .../canvas/enable-controller-service-dialog.jsp |   70 +
 .../canvas/new-controller-service-dialog.jsp    |   53 +
 .../partials/canvas/new-processor-dialog.jsp    |    6 +-
 .../canvas/new-processor-property-dialog.jsp    |   34 -
 .../canvas/new-reporting-task-dialog.jsp        |   53 +
 .../partials/canvas/processor-configuration.jsp |   21 +-
 .../WEB-INF/partials/canvas/registration.jsp    |    2 +-
 .../canvas/reporting-task-configuration.jsp     |  107 ++
 .../partials/canvas/settings-content.jsp        |   98 +-
 .../WEB-INF/partials/processor-details.jsp      |    4 -
 .../nifi-web-ui/src/main/webapp/css/about.css   |    1 -
 .../nifi-web-ui/src/main/webapp/css/canvas.css  |    4 +
 .../webapp/css/connection-configuration.css     |    1 -
 .../src/main/webapp/css/connection-details.css  |    1 -
 .../src/main/webapp/css/controller-service.css  |  269 +++
 .../nifi-web-ui/src/main/webapp/css/dialog.css  |   25 +-
 .../src/main/webapp/css/label-configuration.css |    1 -
 .../nifi-web-ui/src/main/webapp/css/main.css    |   42 +-
 .../css/new-controller-service-dialog.css       |  152 ++
 .../main/webapp/css/new-processor-dialog.css    |   53 +-
 .../webapp/css/new-reporting-task-dialog.css    |  152 ++
 .../src/main/webapp/css/port-configuration.css  |    2 -
 .../src/main/webapp/css/port-details.css        |    2 -
 .../webapp/css/process-group-configuration.css  |    1 -
 .../main/webapp/css/process-group-details.css   |    1 -
 .../main/webapp/css/processor-configuration.css |  153 --
 .../src/main/webapp/css/processor-details.css   |   27 -
 .../src/main/webapp/css/registration.css        |    8 -
 .../css/remote-process-group-configuration.css  |    3 -
 .../src/main/webapp/css/reporting-task.css      |  116 ++
 .../src/main/webapp/css/settings.css            |  123 +-
 .../nifi-web-ui/src/main/webapp/css/shell.css   |    2 +-
 .../src/main/webapp/css/status-history.css      |    1 -
 .../main/webapp/images/buttonNewProperty.png    |  Bin 590 -> 0 bytes
 .../src/main/webapp/images/iconEnable.png       |  Bin 0 -> 472 bytes
 .../src/main/webapp/images/iconUndo.png         |  Bin 642 -> 0 bytes
 .../src/main/webapp/js/jquery/jquery.each.js    |    2 +-
 .../webapp/js/jquery/modal/jquery.modal.css     |   12 +-
 .../main/webapp/js/jquery/modal/jquery.modal.js |  117 +-
 .../js/jquery/nfeditor/jquery.nfeditor.js       |    5 +-
 .../jquery/propertytable/buttonNewProperty.png  |  Bin 0 -> 590 bytes
 .../propertytable/jquery.propertytable.css      |  216 +++
 .../propertytable/jquery.propertytable.js       | 1630 ++++++++++++++++
 .../main/webapp/js/jquery/tabbs/jquery.tabbs.js |    2 +
 .../js/jquery/tagcloud/jquery.tagcloud.css      |   62 +
 .../js/jquery/tagcloud/jquery.tagcloud.js       |  226 +++
 .../js/nf/bulletin-board/nf-bulletin-board.js   |    3 +
 .../src/main/webapp/js/nf/canvas/nf-actions.js  |   17 +-
 .../src/main/webapp/js/nf/canvas/nf-birdseye.js |    3 +
 .../webapp/js/nf/canvas/nf-canvas-header.js     |   64 +-
 .../webapp/js/nf/canvas/nf-canvas-toolbar.js    |    3 +
 .../webapp/js/nf/canvas/nf-canvas-toolbox.js    |  164 +-
 .../main/webapp/js/nf/canvas/nf-canvas-utils.js |   10 +-
 .../src/main/webapp/js/nf/canvas/nf-canvas.js   |  113 +-
 .../main/webapp/js/nf/canvas/nf-clipboard.js    |    3 +
 .../main/webapp/js/nf/canvas/nf-connectable.js  |    3 +
 .../js/nf/canvas/nf-connection-configuration.js |    3 +
 .../main/webapp/js/nf/canvas/nf-connection.js   |    3 +
 .../main/webapp/js/nf/canvas/nf-context-menu.js |    3 +
 .../js/nf/canvas/nf-controller-service.js       | 1743 ++++++++++++++++++
 .../js/nf/canvas/nf-custom-processor-ui.js      |   43 -
 .../main/webapp/js/nf/canvas/nf-custom-ui.js    |   47 +
 .../main/webapp/js/nf/canvas/nf-draggable.js    |    3 +
 .../src/main/webapp/js/nf/canvas/nf-funnel.js   |    3 +
 .../src/main/webapp/js/nf/canvas/nf-go-to.js    |    3 +
 .../webapp/js/nf/canvas/nf-graph-control.js     |    3 +
 .../src/main/webapp/js/nf/canvas/nf-graph.js    |    3 +
 .../js/nf/canvas/nf-label-configuration.js      |    3 +
 .../src/main/webapp/js/nf/canvas/nf-label.js    |    3 +
 .../js/nf/canvas/nf-port-configuration.js       |    3 +
 .../main/webapp/js/nf/canvas/nf-port-details.js |    3 +
 .../src/main/webapp/js/nf/canvas/nf-port.js     |    3 +
 .../nf/canvas/nf-process-group-configuration.js |    3 +
 .../js/nf/canvas/nf-process-group-details.js    |    3 +
 .../webapp/js/nf/canvas/nf-process-group.js     |    3 +
 .../js/nf/canvas/nf-processor-configuration.js  |  500 ++---
 .../nf-processor-property-combo-editor.js       |  177 --
 .../canvas/nf-processor-property-nfel-editor.js |  207 ---
 .../js/nf/canvas/nf-processor-property-table.js |  567 ------
 .../canvas/nf-processor-property-text-editor.js |  212 ---
 .../main/webapp/js/nf/canvas/nf-processor.js    |    3 +
 .../main/webapp/js/nf/canvas/nf-registration.js |    7 +-
 .../nf-remote-process-group-configuration.js    |    3 +
 .../canvas/nf-remote-process-group-details.js   |    3 +
 .../nf/canvas/nf-remote-process-group-ports.js  |    3 +
 .../js/nf/canvas/nf-remote-process-group.js     |    3 +
 .../webapp/js/nf/canvas/nf-reporting-task.js    |  732 ++++++++
 .../js/nf/canvas/nf-secure-port-details.js      |    3 +
 .../main/webapp/js/nf/canvas/nf-selectable.js   |    3 +
 .../src/main/webapp/js/nf/canvas/nf-settings.js | 1526 ++++++++++++++-
 .../src/main/webapp/js/nf/canvas/nf-snippet.js  |    3 +
 .../src/main/webapp/js/nf/canvas/nf-storage.js  |    3 +
 .../webapp/js/nf/canvas/nf-toolbar-action.js    |    3 +
 .../webapp/js/nf/cluster/nf-cluster-table.js    |    3 +
 .../src/main/webapp/js/nf/cluster/nf-cluster.js |    3 +
 .../webapp/js/nf/counters/nf-counters-table.js  |    3 +
 .../main/webapp/js/nf/counters/nf-counters.js   |    3 +
 .../webapp/js/nf/history/nf-history-model.js    |    3 +
 .../webapp/js/nf/history/nf-history-table.js    |    7 +-
 .../src/main/webapp/js/nf/history/nf-history.js |    3 +
 .../src/main/webapp/js/nf/nf-client.js          |    3 +
 .../src/main/webapp/js/nf/nf-common.js          |   83 +-
 .../main/webapp/js/nf/nf-connection-details.js  |    3 +
 .../src/main/webapp/js/nf/nf-dialog.js          |   18 +-
 .../main/webapp/js/nf/nf-processor-details.js   |  358 +---
 .../src/main/webapp/js/nf/nf-shell.js           |    3 +
 .../src/main/webapp/js/nf/nf-status-history.js  |    3 +
 .../js/nf/provenance/nf-provenance-lineage.js   |    3 +
 .../js/nf/provenance/nf-provenance-table.js     |    3 +
 .../webapp/js/nf/provenance/nf-provenance.js    |    3 +
 .../webapp/js/nf/summary/nf-summary-table.js    |    2 +
 .../src/main/webapp/js/nf/summary/nf-summary.js |    3 +
 .../js/nf/templates/nf-templates-table.js       |    3 +
 .../main/webapp/js/nf/templates/nf-templates.js |    3 +
 .../main/webapp/js/nf/users/nf-users-table.js   |    3 +
 .../nifi-framework/nifi-web/pom.xml             |    4 +-
 .../nifi-geo-bundle/nifi-geo-nar/pom.xml        |   33 +
 .../nifi-geo-processors/.gitignore              |    1 +
 .../nifi-geo-bundle/nifi-geo-processors/pom.xml |   43 +
 .../org/apache/nifi/processors/GeoEnrichIP.java |  208 +++
 .../nifi/processors/maxmind/DatabaseReader.java |  286 +++
 .../org.apache.nifi.processor.Processor         |   16 +
 nifi/nifi-nar-bundles/nifi-geo-bundle/pom.xml   |   42 +
 .../nifi-hl7-bundle/nifi-hl7-nar/pom.xml        |   36 +
 .../nifi-hl7-processors/.gitignore              |    1 +
 .../nifi-hl7-bundle/nifi-hl7-processors/pom.xml |  120 ++
 .../processors/hl7/ExtractHL7Attributes.java    |  247 +++
 .../apache/nifi/processors/hl7/RouteHL7.java    |  217 +++
 .../org.apache.nifi.processor.Processor         |   16 +
 .../hl7/TestExtractHL7Attributes.java           |   48 +
 .../src/test/resources/hypoglycemia.hl7         |    5 +
 nifi/nifi-nar-bundles/nifi-hl7-bundle/pom.xml   |   33 +
 .../nifi-language-translation-nar/pom.xml       |   36 +
 .../nifi-yandex-processors/.gitignore           |    1 +
 .../nifi-yandex-processors/pom.xml              |   63 +
 .../nifi/processors/yandex/YandexTranslate.java |  333 ++++
 .../processors/yandex/model/Translation.java    |   52 +
 .../nifi/processors/yandex/util/Languages.java  |   86 +
 .../yandex/util/ObjectMapperResolver.java       |   48 +
 .../org.apache.nifi.processor.Processor         |   16 +
 .../processors/yandex/TestYandexTranslate.java  |  226 +++
 .../nifi-language-translation-bundle/pom.xml    |   48 +
 .../nifi-social-media-nar/pom.xml               |   36 +
 .../nifi-twitter-processors/.gitignore          |    1 +
 .../nifi-twitter-processors/pom.xml             |   60 +
 .../nifi/processors/twitter/GetTwitter.java     |  360 ++++
 .../org.apache.nifi.processor.Processor         |   16 +
 .../nifi-social-media-bundle/pom.xml            |   33 +
 .../nifi-standard-content-viewer/pom.xml        |    5 +
 .../src/main/webapp/WEB-INF/jsp/codemirror.jsp  |    7 +-
 .../processors/standard/EvaluateJsonPath.java   |    1 +
 .../standard/TestDetectDuplicate.java           |    5 +-
 .../DistributedMapCacheClientService.java       |   21 +-
 .../DistributedSetCacheClientService.java       |   16 +-
 .../cache/server/AbstractCacheServer.java       |    2 +-
 .../cache/server/DistributedCacheServer.java    |   13 +-
 .../nifi/http/StandardHttpContextMap.java       |    9 +
 .../nifi/ssl/StandardSSLContextService.java     |   39 +-
 .../nifi-update-attribute-ui/pom.xml            |    5 +
 .../update/attributes/api/RuleResource.java     |  131 +-
 .../src/main/webapp/META-INF/nifi-processor     |   15 -
 .../META-INF/nifi-processor-configuration       |   15 +
 .../src/main/webapp/WEB-INF/jsp/worksheet.jsp   |   10 +-
 .../src/main/webapp/WEB-INF/web.xml             |    4 +-
 .../src/main/webapp/js/application.js           |   25 +-
 nifi/nifi-nar-bundles/pom.xml                   |    8 +-
 nifi/pom.xml                                    |   31 +-
 481 files changed, 29995 insertions(+), 5962 deletions(-)
----------------------------------------------------------------------



[47/50] [abbrv] incubator-nifi git commit: nifi-476: Addressing the handling of null values in JsonPath related processors and providing configuration to treat them as empty string or the string "null".

Posted by jo...@apache.org.
nifi-476:  Addressing the handling of null values in JsonPath related processors and providing configuration to treat them as empty string or the string "null".

Signed-off-by: Aldrin Piri <al...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/fb2206a9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/fb2206a9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/fb2206a9

Branch: refs/heads/NIFI-271
Commit: fb2206a9bb5653196e5dc673f7b71ca0f8bc87b9
Parents: c5b961b
Author: Aldrin Piri <al...@gmail.com>
Authored: Fri Apr 17 23:30:26 2015 -0400
Committer: Aldrin Piri <al...@gmail.com>
Committed: Fri Apr 17 23:30:26 2015 -0400

----------------------------------------------------------------------
 .../standard/AbstractJsonPathProcessor.java     | 25 +++++-
 .../processors/standard/EvaluateJsonPath.java   | 36 ++++----
 .../nifi/processors/standard/SplitJson.java     |  5 +-
 .../standard/TestEvaluateJsonPath.java          | 86 +++++++++++++++++++
 .../nifi/processors/standard/TestSplitJson.java | 88 ++++++++++++++++++++
 5 files changed, 217 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fb2206a9/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractJsonPathProcessor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractJsonPathProcessor.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractJsonPathProcessor.java
index 94a299e..a80ee0f 100644
--- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractJsonPathProcessor.java
+++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractJsonPathProcessor.java
@@ -22,6 +22,7 @@ import com.jayway.jsonpath.JsonPath;
 import com.jayway.jsonpath.internal.spi.json.JsonSmartJsonProvider;
 import com.jayway.jsonpath.spi.json.JsonProvider;
 import net.minidev.json.parser.JSONParser;
+import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.components.ValidationContext;
 import org.apache.nifi.components.ValidationResult;
 import org.apache.nifi.components.Validator;
@@ -35,8 +36,10 @@ import org.apache.nifi.util.ObjectHolder;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 /**
  * Provides common functionality used for processors interacting and manipulating JSON data via JsonPath.
@@ -51,6 +54,24 @@ public abstract class AbstractJsonPathProcessor extends AbstractProcessor {
 
     private static final JsonProvider JSON_PROVIDER = STRICT_PROVIDER_CONFIGURATION.jsonProvider();
 
+    static final Map<String, String> NULL_REPRESENTATION_MAP = new HashMap<>();
+
+    static final String EMPTY_STRING_OPTION = "empty string";
+    static final String NULL_STRING_OPTION = "the string 'null'";
+
+    static {
+        NULL_REPRESENTATION_MAP.put(EMPTY_STRING_OPTION, "");
+        NULL_REPRESENTATION_MAP.put(NULL_STRING_OPTION, "null");
+    }
+
+    public static final PropertyDescriptor NULL_VALUE_DEFAULT_REPRESENTATION = new PropertyDescriptor.Builder()
+            .name("Null Value Representation")
+            .description("Indicates the desired representation of JSON Path expressions resulting in a null value.")
+            .required(true)
+            .allowableValues(NULL_REPRESENTATION_MAP.keySet())
+            .defaultValue(EMPTY_STRING_OPTION)
+            .build();
+
     static DocumentContext validateAndEstablishJsonContext(ProcessSession processSession, FlowFile flowFile) {
         // Parse the document once into an associated context to support multiple path evaluations if specified
         final ObjectHolder<DocumentContext> contextHolder = new ObjectHolder<>(null);
@@ -79,9 +100,9 @@ public abstract class AbstractJsonPathProcessor extends AbstractProcessor {
         return !(obj instanceof Map || obj instanceof List);
     }
 
-    static String getResultRepresentation(Object jsonPathResult) {
+    static String getResultRepresentation(Object jsonPathResult, String defaultValue) {
         if (isJsonScalar(jsonPathResult)) {
-            return jsonPathResult.toString();
+            return Objects.toString(jsonPathResult, defaultValue);
         }
         return JSON_PROVIDER.toJson(jsonPathResult);
     }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fb2206a9/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 229b342..f214178 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
@@ -16,20 +16,10 @@
  */
 package org.apache.nifi.processors.standard;
 
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.charset.StandardCharsets;
-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;
-
+import com.jayway.jsonpath.DocumentContext;
+import com.jayway.jsonpath.InvalidJsonException;
+import com.jayway.jsonpath.JsonPath;
+import com.jayway.jsonpath.PathNotFoundException;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.nifi.annotation.behavior.DynamicProperty;
 import org.apache.nifi.annotation.behavior.EventDriven;
@@ -52,10 +42,12 @@ import org.apache.nifi.processor.io.OutputStreamCallback;
 import org.apache.nifi.stream.io.BufferedOutputStream;
 import org.apache.nifi.util.ObjectHolder;
 
-import com.jayway.jsonpath.DocumentContext;
-import com.jayway.jsonpath.InvalidJsonException;
-import com.jayway.jsonpath.JsonPath;
-import com.jayway.jsonpath.PathNotFoundException;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
 
 @EventDriven
 @SideEffectFree
@@ -72,7 +64,7 @@ import com.jayway.jsonpath.PathNotFoundException;
         + "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 " + 
+@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 {
 
@@ -119,6 +111,7 @@ public class EvaluateJsonPath extends AbstractJsonPathProcessor {
         final List<PropertyDescriptor> properties = new ArrayList<>();
         properties.add(DESTINATION);
         properties.add(RETURN_TYPE);
+        properties.add(NULL_VALUE_DEFAULT_REPRESENTATION);
         this.properties = Collections.unmodifiableList(properties);
     }
 
@@ -211,6 +204,9 @@ public class EvaluateJsonPath extends AbstractJsonPathProcessor {
 
         final ProcessorLog logger = getLogger();
 
+        String representationOption = processContext.getProperty(NULL_VALUE_DEFAULT_REPRESENTATION).getValue();
+        final String nullDefaultValue = NULL_REPRESENTATION_MAP.get(representationOption);
+
         /* Build the JsonPath expressions from attributes */
         final Map<String, JsonPath> attributeToJsonPathMap = new HashMap<>();
 
@@ -265,7 +261,7 @@ public class EvaluateJsonPath extends AbstractJsonPathProcessor {
                 }
             }
 
-            final String resultRepresentation = getResultRepresentation(resultHolder.get());
+            final String resultRepresentation = getResultRepresentation(resultHolder.get(), nullDefaultValue);
             switch (destination) {
                 case DESTINATION_ATTRIBUTE:
                     jsonPathResults.put(jsonPathAttrKey, resultRepresentation);

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fb2206a9/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
index 4d79746..bba770a 100644
--- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
+++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitJson.java
@@ -74,6 +74,7 @@ public class SplitJson extends AbstractJsonPathProcessor {
     protected void init(final ProcessorInitializationContext context) {
         final List<PropertyDescriptor> properties = new ArrayList<>();
         properties.add(ARRAY_JSON_PATH_EXPRESSION);
+        properties.add(NULL_VALUE_DEFAULT_REPRESENTATION);
         this.properties = Collections.unmodifiableList(properties);
 
         final Set<Relationship> relationships = new HashSet<>();
@@ -142,6 +143,8 @@ public class SplitJson extends AbstractJsonPathProcessor {
         }
 
         final JsonPath jsonPath = JSON_PATH_REF.get();
+        String representationOption = processContext.getProperty(NULL_VALUE_DEFAULT_REPRESENTATION).getValue();
+        final String nullDefaultValue = NULL_REPRESENTATION_MAP.get(representationOption);
 
         final List<FlowFile> segments = new ArrayList<>();
 
@@ -168,7 +171,7 @@ public class SplitJson extends AbstractJsonPathProcessor {
             split = processSession.write(split, new OutputStreamCallback() {
                 @Override
                 public void process(OutputStream out) throws IOException {
-                    String resultSegmentContent = getResultRepresentation(resultSegment);
+                    String resultSegmentContent = getResultRepresentation(resultSegment, nullDefaultValue);
                     out.write(resultSegmentContent.getBytes(StandardCharsets.UTF_8));
                 }
             });

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fb2206a9/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
index 058e21c..5fa8f4d 100644
--- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
+++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEvaluateJsonPath.java
@@ -16,7 +16,11 @@
  */
 package org.apache.nifi.processors.standard;
 
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.processor.ProcessSession;
 import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.stream.io.BufferedOutputStream;
 import org.apache.nifi.util.MockFlowFile;
 import org.apache.nifi.util.StringUtils;
 import org.apache.nifi.util.TestRunner;
@@ -24,9 +28,14 @@ import org.apache.nifi.util.TestRunners;
 import org.junit.Assert;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import static org.junit.Assert.assertEquals;
+
 public class TestEvaluateJsonPath {
 
     private static final Path JSON_SNIPPET = Paths.get("src/test/resources/TestJson/json-sample.json");
@@ -261,4 +270,81 @@ public class TestEvaluateJsonPath {
         testRunner.getFlowFilesForRelationship(expectedRel).get(0).assertContentEquals(JSON_SNIPPET);
     }
 
+    @Test
+    public void testNullInput() throws Exception {
+        final TestRunner testRunner = TestRunners.newTestRunner(new EvaluateJsonPath());
+        testRunner.setProperty(EvaluateJsonPath.RETURN_TYPE, EvaluateJsonPath.RETURN_TYPE_JSON);
+        testRunner.setProperty(EvaluateJsonPath.DESTINATION, EvaluateJsonPath.DESTINATION_ATTRIBUTE);
+        testRunner.setProperty("stringField", "$.stringField");
+        testRunner.setProperty("missingField", "$.missingField");
+        testRunner.setProperty("nullField", "$.nullField");
+
+        ProcessSession session = testRunner.getProcessSessionFactory().createSession();
+        FlowFile ff = session.create();
+
+        ff = session.write(ff, new OutputStreamCallback() {
+            @Override
+            public void process(OutputStream out) throws IOException {
+                try (OutputStream outputStream = new BufferedOutputStream(out)) {
+                    outputStream.write("{\"stringField\": \"String Value\", \"nullField\": null}".getBytes(StandardCharsets.UTF_8));
+                }
+            }
+        });
+
+        testRunner.enqueue(ff);
+        testRunner.run();
+
+        testRunner.assertTransferCount(EvaluateJsonPath.REL_MATCH, 1);
+
+        FlowFile output = testRunner.getFlowFilesForRelationship(EvaluateJsonPath.REL_MATCH).get(0);
+
+        String validFieldValue = output.getAttribute("stringField");
+        assertEquals("String Value", validFieldValue);
+
+        String missingValue = output.getAttribute("missingField");
+        assertEquals("Missing Value", "", missingValue);
+
+        String nullValue = output.getAttribute("nullField");
+        assertEquals("Null Value", "", nullValue);
+    }
+
+    @Test
+    public void testNullInput_nullStringRepresentation() throws Exception {
+        final TestRunner testRunner = TestRunners.newTestRunner(new EvaluateJsonPath());
+        testRunner.setProperty(EvaluateJsonPath.RETURN_TYPE, EvaluateJsonPath.RETURN_TYPE_JSON);
+        testRunner.setProperty(EvaluateJsonPath.DESTINATION, EvaluateJsonPath.DESTINATION_ATTRIBUTE);
+        testRunner.setProperty(EvaluateJsonPath.NULL_VALUE_DEFAULT_REPRESENTATION, AbstractJsonPathProcessor.NULL_STRING_OPTION);
+        testRunner.setProperty("stringField", "$.stringField");
+        testRunner.setProperty("missingField", "$.missingField");
+        testRunner.setProperty("nullField", "$.nullField");
+
+        ProcessSession session = testRunner.getProcessSessionFactory().createSession();
+        FlowFile ff = session.create();
+
+        ff = session.write(ff, new OutputStreamCallback() {
+            @Override
+            public void process(OutputStream out) throws IOException {
+                try (OutputStream outputStream = new BufferedOutputStream(out)) {
+                    outputStream.write("{\"stringField\": \"String Value\", \"nullField\": null}".getBytes(StandardCharsets.UTF_8));
+                }
+            }
+        });
+
+        testRunner.enqueue(ff);
+        testRunner.run();
+
+        testRunner.assertTransferCount(EvaluateJsonPath.REL_MATCH, 1);
+
+        FlowFile output = testRunner.getFlowFilesForRelationship(EvaluateJsonPath.REL_MATCH).get(0);
+
+        String validFieldValue = output.getAttribute("stringField");
+        assertEquals("String Value", validFieldValue);
+
+        String missingValue = output.getAttribute("missingField");
+        assertEquals("Missing Value", "", missingValue);
+
+        String nullValue = output.getAttribute("nullField");
+        assertEquals("Null Value", "null", nullValue);
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fb2206a9/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitJson.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitJson.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitJson.java
index f47467f..fc07386 100644
--- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitJson.java
+++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitJson.java
@@ -16,13 +16,20 @@
  */
 package org.apache.nifi.processors.standard;
 
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.processor.ProcessSession;
 import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.stream.io.BufferedOutputStream;
 import org.apache.nifi.util.MockFlowFile;
 import org.apache.nifi.util.TestRunner;
 import org.apache.nifi.util.TestRunners;
 import org.junit.Assert;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
@@ -123,4 +130,85 @@ public class TestSplitJson {
         testRunner.assertTransferCount(SplitJson.REL_FAILURE, 1);
         testRunner.getFlowFilesForRelationship(SplitJson.REL_FAILURE).get(0).assertContentEquals(JSON_SNIPPET);
     }
+
+    @Test
+    public void testSplit_pathToNullValue() throws Exception {
+        final TestRunner testRunner = TestRunners.newTestRunner(new SplitJson());
+        testRunner.setProperty(SplitJson.ARRAY_JSON_PATH_EXPRESSION, "$.nullField");
+
+        ProcessSession session = testRunner.getProcessSessionFactory().createSession();
+        FlowFile ff = session.create();
+
+        ff = session.write(ff, new OutputStreamCallback() {
+            @Override
+            public void process(OutputStream out) throws IOException {
+                try (OutputStream outputStream = new BufferedOutputStream(out)) {
+                    outputStream.write("{\"stringField\": \"String Value\", \"nullField\": null}".getBytes(StandardCharsets.UTF_8));
+                }
+            }
+        });
+
+        testRunner.enqueue(ff);
+        testRunner.run();
+
+        testRunner.assertTransferCount(SplitJson.REL_FAILURE, 1);
+    }
+
+    @Test
+    public void testSplit_pathToArrayWithNulls_emptyStringRepresentation() throws Exception {
+        final TestRunner testRunner = TestRunners.newTestRunner(new SplitJson());
+        testRunner.setProperty(SplitJson.ARRAY_JSON_PATH_EXPRESSION, "$.arrayOfNulls");
+
+        ProcessSession session = testRunner.getProcessSessionFactory().createSession();
+        FlowFile ff = session.create();
+
+        ff = session.write(ff, new OutputStreamCallback() {
+            @Override
+            public void process(OutputStream out) throws IOException {
+                try (OutputStream outputStream = new BufferedOutputStream(out)) {
+                    outputStream.write("{\"stringField\": \"String Value\", \"arrayOfNulls\": [null, null, null]}".getBytes(StandardCharsets.UTF_8));
+                }
+            }
+        });
+
+        testRunner.enqueue(ff);
+        testRunner.run();
+
+        /* assert that three files were transferred to split and each is empty */
+        int expectedFiles = 3;
+        testRunner.assertTransferCount(SplitJson.REL_SPLIT, expectedFiles);
+        for (int i = 0; i < expectedFiles; i++) {
+            testRunner.getFlowFilesForRelationship(SplitJson.REL_SPLIT).get(i).assertContentEquals("");
+        }
+    }
+
+    @Test
+    public void testSplit_pathToArrayWithNulls_nullStringRepresentation() throws Exception {
+        final TestRunner testRunner = TestRunners.newTestRunner(new SplitJson());
+        testRunner.setProperty(SplitJson.ARRAY_JSON_PATH_EXPRESSION, "$.arrayOfNulls");
+        testRunner.setProperty(SplitJson.NULL_VALUE_DEFAULT_REPRESENTATION,
+                AbstractJsonPathProcessor.NULL_STRING_OPTION);
+
+        ProcessSession session = testRunner.getProcessSessionFactory().createSession();
+        FlowFile ff = session.create();
+
+        ff = session.write(ff, new OutputStreamCallback() {
+            @Override
+            public void process(OutputStream out) throws IOException {
+                try (OutputStream outputStream = new BufferedOutputStream(out)) {
+                    outputStream.write("{\"stringField\": \"String Value\", \"arrayOfNulls\": [null, null, null]}".getBytes(StandardCharsets.UTF_8));
+                }
+            }
+        });
+
+        testRunner.enqueue(ff);
+        testRunner.run();
+
+        /* assert that three files were transferred to split and each has the word null in it */
+        int expectedFiles = 3;
+        testRunner.assertTransferCount(SplitJson.REL_SPLIT, expectedFiles);
+        for (int i = 0; i < expectedFiles; i++) {
+            testRunner.getFlowFilesForRelationship(SplitJson.REL_SPLIT).get(i).assertContentEquals("null");
+        }
+    }
 }


[20/50] [abbrv] incubator-nifi git commit: NIFI-504: Removed erroneous copyright notice

Posted by jo...@apache.org.
NIFI-504: Removed erroneous copyright notice


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/512ac9c7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/512ac9c7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/512ac9c7

Branch: refs/heads/NIFI-271
Commit: 512ac9c704e155461dac0c0c905ecccaba645c3b
Parents: 10d002c
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 10 08:42:43 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 10 08:42:43 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/nifi/processors/maxmind/DatabaseReader.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/512ac9c7/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 796a7af..734f093 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
@@ -46,7 +46,7 @@ import com.maxmind.geoip2.model.IspResponse;
  * 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
- * Copyright (c) 2013 by MaxMind, Inc.
+ * 
  * 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.


[33/50] [abbrv] incubator-nifi git commit: NIFI-502: - When adding a new property entering into edit mode automatically. - Ensuring the markup for the available actions are appended instead of replaced.

Posted by jo...@apache.org.
NIFI-502:
- When adding a new property entering into edit mode automatically.
- Ensuring the markup for the available actions are appended instead of replaced.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/9054dd4e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/9054dd4e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/9054dd4e

Branch: refs/heads/NIFI-271
Commit: 9054dd4e4273846ffd8c24e8ed1b26a6000209b6
Parents: df57555
Author: Matt Gilman <ma...@gmail.com>
Authored: Fri Apr 10 16:07:45 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Fri Apr 10 16:07:45 2015 -0400

----------------------------------------------------------------------
 .../webapp/js/jquery/propertytable/jquery.propertytable.js   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9054dd4e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
index 7ffaa3f..ca53709 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
@@ -1015,7 +1015,7 @@
                 // ensure the configured value is referencing a valid service
                 $.each(propertyDescriptor.allowableValues, function (_, allowableValue) {
                     if (allowableValue.value === dataContext.value) {
-                        markup = '<img src="images/iconGoTo.png" title="Go To" class="go-to-service pointer" style="margin-top: 2px" />';
+                        markup += '<img src="images/iconGoTo.png" title="Go To" class="go-to-service pointer" style="margin-top: 2px" />';
                         return false;
                     }
                 });
@@ -1023,7 +1023,7 @@
 
             // allow user defined properties to be removed
             if (options.readOnly !== true && dataContext.type === 'userDefined') {
-                markup = '<img src="images/iconDelete.png" title="Delete" class="delete-property pointer" style="margin-top: 2px" />';
+                markup += '<img src="images/iconDelete.png" title="Delete" class="delete-property pointer" style="margin-top: 2px" />';
             }
 
             return markup;
@@ -1414,8 +1414,8 @@
 
                                         // select the new properties row
                                         var row = propertyData.getRowById(id);
-                                        propertyGrid.setSelectedRows([row]);
-                                        propertyGrid.scrollRowIntoView(row);
+                                        propertyGrid.setActiveCell(row, propertyGrid.getColumnIndex('value'));
+                                        propertyGrid.editActiveCell();
                                     });
                                 } else {
                                     nf.Dialog.showOkDialog({


[09/50] [abbrv] incubator-nifi git commit: NIFI-496: Only update the updatedAttributes map if a value is changed

Posted by jo...@apache.org.
NIFI-496: Only update the updatedAttributes map if a value is changed


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e8fde859
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e8fde859
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e8fde859

Branch: refs/heads/NIFI-271
Commit: e8fde859141e55fd13a1eaae77f4705e61f6071d
Parents: abd279c
Author: Mark Payne <ma...@hotmail.com>
Authored: Thu Apr 9 09:31:20 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Thu Apr 9 09:31:20 2015 -0400

----------------------------------------------------------------------
 .../repository/StandardRepositoryRecord.java         | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e8fde859/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardRepositoryRecord.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardRepositoryRecord.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardRepositoryRecord.java
index 1fde9aa..6ecb991 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardRepositoryRecord.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardRepositoryRecord.java
@@ -116,12 +116,23 @@ public class StandardRepositoryRecord implements RepositoryRecord {
 
     public void setWorking(final FlowFileRecord flowFile, final String attributeKey, final String attributeValue) {
         workingFlowFileRecord = flowFile;
-        updatedAttributes.put(attributeKey, attributeValue);
+        
+        // If setting attribute to same value as original, don't add to updated attributes
+        final String currentValue = originalAttributes.get(attributeKey);
+        if ( currentValue == null || !currentValue.equals(attributeValue) ) {
+        	updatedAttributes.put(attributeKey, attributeValue);
+        }
     }
 
     public void setWorking(final FlowFileRecord flowFile, final Map<String, String> updatedAttribs) {
         workingFlowFileRecord = flowFile;
-        updatedAttributes.putAll(updatedAttribs);
+        
+        for ( final Map.Entry<String, String> entry : updatedAttribs.entrySet() ) {
+        	final String currentValue = originalAttributes.get(entry.getKey());
+        	if ( currentValue == null || !currentValue.equals(entry.getValue()) ) {
+        		updatedAttributes.put(entry.getKey(), entry.getValue());
+        	}
+        }
     }
 
     @Override


[14/50] [abbrv] incubator-nifi git commit: 504: Initial import of geo enrich processors

Posted by jo...@apache.org.
504: Initial import of geo enrich processors


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/ff0bd2c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/ff0bd2c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/ff0bd2c6

Branch: refs/heads/NIFI-271
Commit: ff0bd2c6696e73d3157eb2d0116913e337410f38
Parents: 45416dc
Author: Mark Payne <ma...@hotmail.com>
Authored: Thu Apr 9 17:54:59 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Thu Apr 9 17:54:59 2015 -0400

----------------------------------------------------------------------
 .../nifi-geo-bundle/nifi-geo-nar/pom.xml        |  33 +++
 .../nifi-geo-processors/.gitignore              |   1 +
 .../nifi-geo-bundle/nifi-geo-processors/pom.xml |  43 +++
 .../org/apache/nifi/processors/GeoEnrichIP.java | 210 ++++++++++++++
 .../nifi/processors/maxmind/DatabaseReader.java | 286 +++++++++++++++++++
 .../org.apache.nifi.processor.Processor         |  16 ++
 nifi/nifi-nar-bundles/nifi-geo-bundle/pom.xml   |  42 +++
 7 files changed, 631 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ff0bd2c6/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-nar/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-nar/pom.xml b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-nar/pom.xml
new file mode 100644
index 0000000..484e291
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-nar/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+      http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-geo-bundle</artifactId>
+        <version>0.1.0-incubating-SNAPSHOT</version>
+    </parent>
+    <artifactId>nifi-geo-nar</artifactId>
+    <packaging>nar</packaging>
+    <description>NiFi Geo Enrichment NAR</description>
+	
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-geo-processors</artifactId>
+        </dependency>
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ff0bd2c6/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/.gitignore
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/.gitignore b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/.gitignore
@@ -0,0 +1 @@
+/target/

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ff0bd2c6/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/pom.xml b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/pom.xml
new file mode 100644
index 0000000..67bc253
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/pom.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+      http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-geo-bundle</artifactId>
+        <version>0.1.0-incubating-SNAPSHOT</version>
+    </parent>
+    <artifactId>nifi-geo-processors</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-processor-utils</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-utils</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.maxmind.geoip2</groupId>
+            <artifactId>geoip2</artifactId>
+            <version>2.1.0</version>
+        </dependency>        
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ff0bd2c6/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
new file mode 100644
index 0000000..fed0e7e
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java
@@ -0,0 +1,210 @@
+/*
+ * 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;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.ArrayList;
+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.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.behavior.EventDriven;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.annotation.lifecycle.OnStopped;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.maxmind.DatabaseReader;
+import org.apache.nifi.util.StopWatch;
+
+import com.maxmind.geoip2.exception.GeoIp2Exception;
+import com.maxmind.geoip2.model.CityResponse;
+import com.maxmind.geoip2.record.Subdivision;
+
+@EventDriven
+@SideEffectFree
+@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>")
+@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"),
+})
+public class GeoEnrichIP extends AbstractProcessor {
+
+    public static final PropertyDescriptor GEO_DATABASE_FILE = new PropertyDescriptor.Builder()
+            .name("Geo Database File")
+            .description("Path to Maxmind Geo Enrichment Database File")
+            .required(true)
+            .addValidator(StandardValidators.FILE_EXISTS_VALIDATOR)
+            .build();
+
+    public static final PropertyDescriptor IP_ADDRESS_ATTRIBUTE = new PropertyDescriptor.Builder()
+            .name("IP Address Attribute")
+            .required(true)
+            .description("The name of an attribute whose value is a dotted decimal IP address for which enrichment should occur")
+            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+            .build();
+
+    public static final Relationship REL_FOUND = new Relationship.Builder()
+            .name("found")
+            .description("Where to route flow files after successfully enriching attributes with geo data")
+            .build();
+
+    public static final Relationship REL_NOT_FOUND = new Relationship.Builder()
+            .name("not found")
+            .description("Where to route flow files after unsuccessfully enriching attributes because no geo data was found")
+            .build();
+
+    private Set<Relationship> relationships;
+    private List<PropertyDescriptor> propertyDescriptors;
+    private final AtomicReference<DatabaseReader> databaseReaderRef = new AtomicReference<>(null);
+
+    @Override
+    public Set<Relationship> getRelationships() {
+        return relationships;
+    }
+
+    @Override
+    protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
+        return propertyDescriptors;
+    }
+
+    @OnScheduled
+    public final void onScheduled(final ProcessContext context) throws IOException {
+        final String dbFileString = context.getProperty(GEO_DATABASE_FILE).getValue();
+        final File dbFile = new File(dbFileString);
+        final StopWatch stopWatch = new StopWatch(true);
+        final DatabaseReader reader = new DatabaseReader.Builder(dbFile).build();
+        stopWatch.stop();
+        getLogger().info("Completed loading of Maxmind Geo Database.  Elapsed time was {} milliseconds.", new Object[]{stopWatch.getDuration(TimeUnit.MILLISECONDS)});
+        databaseReaderRef.set(reader);
+    }
+
+    @OnStopped
+    public void closeReader() throws IOException {
+    	final DatabaseReader reader = databaseReaderRef.get();
+    	if ( reader != null ) {
+    		reader.close();
+    	}
+    }
+    
+    @Override
+    protected void init(final ProcessorInitializationContext context) {
+        final Set<Relationship> rels = new HashSet<>();
+        rels.add(REL_FOUND);
+        rels.add(REL_NOT_FOUND);
+        this.relationships = Collections.unmodifiableSet(rels);
+
+        final List<PropertyDescriptor> props = new ArrayList<>();
+        props.add(GEO_DATABASE_FILE);
+        props.add(IP_ADDRESS_ATTRIBUTE);
+        this.propertyDescriptors = Collections.unmodifiableList(props);
+    }
+
+    @Override
+    public void onTrigger(final ProcessContext context, final ProcessSession session) throws ProcessException {
+        FlowFile flowFile = session.get();
+        if (flowFile == null) {
+            return;
+        }
+
+        final DatabaseReader dbReader = databaseReaderRef.get();
+        final String ipAttributeName = context.getProperty(IP_ADDRESS_ATTRIBUTE).getValue();
+        final String ipAttributeValue = flowFile.getAttribute(ipAttributeName);
+        if (StringUtils.isEmpty(ipAttributeName)) { //TODO need to add additional validation - should look like an IPv4 or IPv6 addr for instance
+            session.transfer(flowFile, REL_NOT_FOUND);
+            getLogger().warn("Unable to find ip address for {}", new Object[]{flowFile});
+            return;
+        }
+        InetAddress inetAddress = null;
+        CityResponse response = null;
+
+        try {
+            inetAddress = InetAddress.getByName(ipAttributeValue);
+        } catch (final IOException ioe) {
+            session.transfer(flowFile, REL_NOT_FOUND);
+            getLogger().warn("Could not resolve {} to ip address for {}", new Object[]{ipAttributeValue, flowFile}, ioe);
+            return;
+        }
+        final StopWatch stopWatch = new StopWatch(true);
+        try {
+            response = dbReader.city(inetAddress);
+            stopWatch.stop();
+        } catch (final IOException | GeoIp2Exception ex) {
+            session.transfer(flowFile, REL_NOT_FOUND);
+            getLogger().warn("Failure while trying to find enrichment data for {} due to {}", new Object[]{flowFile, ex}, ex);
+            return;
+        }
+        
+        if (response == null) {
+            session.transfer(flowFile, REL_NOT_FOUND);
+            getLogger().warn("No enrichment data found for ip {} of {}", new Object[]{ipAttributeValue, flowFile});
+            return;
+        }
+
+        final Map<String, 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());
+        attrs.put(new StringBuilder(ipAttributeName).append(".geo.latitude").toString(), response.getLocation().getLatitude().toString());
+        attrs.put(new StringBuilder(ipAttributeName).append(".geo.longitude").toString(), response.getLocation().getLongitude().toString());
+        int i = 0;
+        for (final Subdivision subd : response.getSubdivisions()) {
+            attrs.put(new StringBuilder(ipAttributeName).append(".geo.subdivision.").append(i).toString(), subd.getName());
+            attrs.put(new StringBuilder(ipAttributeName).append(".geo.subdivision.isocode.").append(i).toString(), subd.getIsoCode());
+            i++;
+        }
+        attrs.put(new StringBuilder(ipAttributeName).append(".geo.country").toString(), response.getCountry().getName());
+        attrs.put(new StringBuilder(ipAttributeName).append(".geo.country.isocode").toString(), response.getCountry().getIsoCode());
+        attrs.put(new StringBuilder(ipAttributeName).append(".geo.postalcode").toString(), response.getPostal().getCode());
+        flowFile = session.putAllAttributes(flowFile, attrs);
+
+        session.transfer(flowFile, REL_FOUND);
+        getLogger().info("Completed lookup of IP geo information for {}", new Object[]{flowFile});
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ff0bd2c6/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
new file mode 100644
index 0000000..796a7af
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/java/org/apache/nifi/processors/maxmind/DatabaseReader.java
@@ -0,0 +1,286 @@
+/*
+ * 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.maxmind;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.InetAddress;
+import java.util.Arrays;
+import java.util.List;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.InjectableValues;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.maxmind.db.Metadata;
+import com.maxmind.db.Reader;
+import com.maxmind.db.Reader.FileMode;
+import com.maxmind.geoip2.GeoIp2Provider;
+import com.maxmind.geoip2.exception.AddressNotFoundException;
+import com.maxmind.geoip2.exception.GeoIp2Exception;
+import com.maxmind.geoip2.model.AnonymousIpResponse;
+import com.maxmind.geoip2.model.CityResponse;
+import com.maxmind.geoip2.model.ConnectionTypeResponse;
+import com.maxmind.geoip2.model.CountryResponse;
+import com.maxmind.geoip2.model.DomainResponse;
+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
+ * Copyright (c) 2013 by MaxMind, Inc.
+ * 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 be looked up using the <code>get</code> method.
+ */
+public class DatabaseReader implements GeoIp2Provider, Closeable {
+
+    private final Reader reader;
+
+    private final ObjectMapper om;
+
+    private DatabaseReader(Builder builder) throws IOException {
+        if (builder.stream != null) {
+            this.reader = new Reader(builder.stream);
+        } else if (builder.database != null) {
+            this.reader = new Reader(builder.database, builder.mode);
+        } else {
+            // This should never happen. If it does, review the Builder class
+            // constructors for errors.
+            throw new IllegalArgumentException(
+                    "Unsupported Builder configuration: expected either File or URL");
+        }
+        this.om = new ObjectMapper();
+        this.om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
+                false);
+        this.om.configure(
+                DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL, true);
+        InjectableValues inject = new InjectableValues.Std().addValue(
+                "locales", builder.locales);
+        this.om.setInjectableValues(inject);
+    }
+
+    /**
+     * <p>
+     * Constructs a Builder for the DatabaseReader. The file passed to it must
+     * be a valid GeoIP2 database file.
+     * </p>
+     * <p>
+     * <code>Builder</code> creates instances of <code>DatabaseReader</code>
+     * from values set by the methods.
+     * </p>
+     * <p>
+     * Only the values set in the <code>Builder</code> constructor are required.
+     * </p>
+     */
+    public final static class Builder {
+        final File database;
+        final InputStream stream;
+
+        List<String> locales = Arrays.asList("en");
+        FileMode mode = FileMode.MEMORY_MAPPED;
+
+        /**
+         * @param stream the stream containing the GeoIP2 database to use.
+         */
+        public Builder(InputStream stream) {
+            this.stream = stream;
+            this.database = null;
+        }
+
+        /**
+         * @param database the GeoIP2 database file to use.
+         */
+        public Builder(File database) {
+            this.database = database;
+            this.stream = null;
+        }
+
+        /**
+         * @param val List of locale codes to use in name property from most
+         *            preferred to least preferred.
+         * @return Builder object
+         */
+        public Builder locales(List<String> val) {
+            this.locales = val;
+            return this;
+        }
+
+        /**
+         * @param val The file mode used to open the GeoIP2 database
+         * @return Builder object
+         * @throws java.lang.IllegalArgumentException if you initialized the Builder with a URL, which uses
+         *                                            {@link FileMode#MEMORY}, but you provided a different
+         *                                            FileMode to this method.
+         */
+        public Builder fileMode(FileMode val) {
+            if (this.stream != null && !FileMode.MEMORY.equals(val)) {
+                throw new IllegalArgumentException(
+                        "Only FileMode.MEMORY is supported when using an InputStream.");
+            }
+            this.mode = val;
+            return this;
+        }
+
+        /**
+         * @return an instance of <code>DatabaseReader</code> created from the
+         * fields set on this builder.
+         * @throws IOException if there is an error reading the database
+         */
+        public DatabaseReader build() throws IOException {
+            return new DatabaseReader(this);
+        }
+    }
+
+    /**
+     * @param ipAddress IPv4 or IPv6 address to lookup.
+     * @return A <T> object with the data for the IP address or null if no 
+     * information could be found for the given IP address
+     * @throws IOException              if there is an error opening or reading from the file.
+     */
+    private <T> T get(InetAddress ipAddress, Class<T> cls, boolean hasTraits,
+                      String type) throws IOException, AddressNotFoundException {
+
+        String databaseType = this.getMetadata().getDatabaseType();
+        if (!databaseType.contains(type)) {
+            String caller = Thread.currentThread().getStackTrace()[2]
+                    .getMethodName();
+            throw new UnsupportedOperationException(
+                    "Invalid attempt to open a " + databaseType
+                            + " database using the " + caller + " method");
+        }
+
+        ObjectNode node = (ObjectNode) this.reader.get(ipAddress);
+
+        if (node == null) {
+            return null;
+        }
+
+        ObjectNode ipNode;
+        if (hasTraits) {
+            if (!node.has("traits")) {
+                node.set("traits", this.om.createObjectNode());
+            }
+            ipNode = (ObjectNode) node.get("traits");
+        } else {
+            ipNode = node;
+        }
+        ipNode.put("ip_address", ipAddress.getHostAddress());
+
+        return this.om.treeToValue(node, cls);
+    }
+
+    /**
+     * <p>
+     * Closes the database.
+     * </p>
+     * <p>
+     * If you are using <code>FileMode.MEMORY_MAPPED</code>, this will
+     * <em>not</em> unmap the underlying file due to a limitation in Java's
+     * <code>MappedByteBuffer</code>. It will however set the reference to
+     * the buffer to <code>null</code>, allowing the garbage collector to
+     * collect it.
+     * </p>
+     *
+     * @throws IOException if an I/O error occurs.
+     */
+    @Override
+    public void close() throws IOException {
+        this.reader.close();
+    }
+
+    @Override
+    public CountryResponse country(InetAddress ipAddress) throws IOException,
+            GeoIp2Exception {
+        return this.get(ipAddress, CountryResponse.class, true, "Country");
+    }
+
+    @Override
+    public CityResponse city(InetAddress ipAddress) throws IOException,
+            GeoIp2Exception {
+        return this.get(ipAddress, CityResponse.class, true, "City");
+    }
+
+    /**
+     * Look up an IP address in a GeoIP2 Anonymous IP.
+     *
+     * @param ipAddress IPv4 or IPv6 address to lookup.
+     * @return a AnonymousIpResponse for the requested IP address.
+     * @throws GeoIp2Exception if there is an error looking up the IP
+     * @throws IOException     if there is an IO error
+     */
+    public AnonymousIpResponse anonymousIp(InetAddress ipAddress) throws IOException,
+            GeoIp2Exception {
+        return this.get(ipAddress, AnonymousIpResponse.class, false, "GeoIP2-Anonymous-IP");
+    }
+
+    /**
+     * Look up an IP address in a GeoIP2 Connection Type database.
+     *
+     * @param ipAddress IPv4 or IPv6 address to lookup.
+     * @return a ConnectTypeResponse for the requested IP address.
+     * @throws GeoIp2Exception if there is an error looking up the IP
+     * @throws IOException     if there is an IO error
+     */
+    public ConnectionTypeResponse connectionType(InetAddress ipAddress)
+            throws IOException, GeoIp2Exception {
+        return this.get(ipAddress, ConnectionTypeResponse.class, false,
+                "GeoIP2-Connection-Type");
+    }
+
+    /**
+     * Look up an IP address in a GeoIP2 Domain database.
+     *
+     * @param ipAddress IPv4 or IPv6 address to lookup.
+     * @return a DomainResponse for the requested IP address.
+     * @throws GeoIp2Exception if there is an error looking up the IP
+     * @throws IOException     if there is an IO error
+     */
+    public DomainResponse domain(InetAddress ipAddress) throws IOException,
+            GeoIp2Exception {
+        return this
+                .get(ipAddress, DomainResponse.class, false, "GeoIP2-Domain");
+    }
+
+    /**
+     * Look up an IP address in a GeoIP2 ISP database.
+     *
+     * @param ipAddress IPv4 or IPv6 address to lookup.
+     * @return an IspResponse for the requested IP address.
+     * @throws GeoIp2Exception if there is an error looking up the IP
+     * @throws IOException     if there is an IO error
+     */
+    public IspResponse isp(InetAddress ipAddress) throws IOException,
+            GeoIp2Exception {
+        return this.get(ipAddress, IspResponse.class, false, "GeoIP2-ISP");
+    }
+
+    /**
+     * @return the metadata for the open MaxMind DB file.
+     */
+    public Metadata getMetadata() {
+        return this.reader.getMetadata();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ff0bd2c6/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
new file mode 100644
index 0000000..9b1be71
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-geo-bundle/nifi-geo-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+org.apache.nifi.processors.GeoEnrichIP
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ff0bd2c6/nifi/nifi-nar-bundles/nifi-geo-bundle/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-geo-bundle/pom.xml b/nifi/nifi-nar-bundles/nifi-geo-bundle/pom.xml
new file mode 100644
index 0000000..2dbd32f
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-geo-bundle/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+      http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-nar-bundles</artifactId>
+        <version>0.1.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-geo-bundle</artifactId>
+    <packaging>pom</packaging>
+    <description>NiFi Geo Enrichment Capability Set</description>
+	
+    <modules>
+        <module>nifi-geo-processors</module>
+        <module>nifi-geo-nar</module>
+    </modules>
+	
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.nifi</groupId>
+                <artifactId>nifi-geo-processors</artifactId>
+                <version>0.1.0-incubating-SNAPSHOT</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>


[35/50] [abbrv] incubator-nifi git commit: NIFI-514 removed extraneous logging

Posted by jo...@apache.org.
NIFI-514 removed extraneous logging


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/9ee34e2e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/9ee34e2e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/9ee34e2e

Branch: refs/heads/NIFI-271
Commit: 9ee34e2e3cc72b579c49f97b5ae6f2601bc75087
Parents: 7aca8ea
Author: joewitt <jo...@apache.org>
Authored: Sat Apr 11 12:06:45 2015 -0400
Committer: joewitt <jo...@apache.org>
Committed: Sat Apr 11 12:06:45 2015 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/nifi/processors/GeoEnrichIP.java      | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9ee34e2e/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 fed0e7e..03f40cf 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
@@ -183,7 +183,6 @@ public class GeoEnrichIP extends AbstractProcessor {
         
         if (response == null) {
             session.transfer(flowFile, REL_NOT_FOUND);
-            getLogger().warn("No enrichment data found for ip {} of {}", new Object[]{ipAttributeValue, flowFile});
             return;
         }
 
@@ -204,7 +203,6 @@ public class GeoEnrichIP extends AbstractProcessor {
         flowFile = session.putAllAttributes(flowFile, attrs);
 
         session.transfer(flowFile, REL_FOUND);
-        getLogger().info("Completed lookup of IP geo information for {}", new Object[]{flowFile});
     }
 
 }


[43/50] [abbrv] incubator-nifi git commit: NIFI-522 updated Jetty version and removed extraneous name element from unrelated pom

Posted by jo...@apache.org.
NIFI-522 updated Jetty version and removed extraneous name element from unrelated pom


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/ce5a654e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/ce5a654e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/ce5a654e

Branch: refs/heads/NIFI-271
Commit: ce5a654e96ef257d900a555b595831dd944cb616
Parents: 8270791
Author: joewitt <jo...@apache.org>
Authored: Fri Apr 17 07:59:54 2015 -0400
Committer: joewitt <jo...@apache.org>
Committed: Fri Apr 17 07:59:54 2015 -0400

----------------------------------------------------------------------
 nifi/nifi-commons/nifi-hl7-query-language/pom.xml | 3 ---
 nifi/pom.xml                                      | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ce5a654e/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 9d0003f..7daa400 100644
--- a/nifi/nifi-commons/nifi-hl7-query-language/pom.xml
+++ b/nifi/nifi-commons/nifi-hl7-query-language/pom.xml
@@ -25,9 +25,6 @@
 	
 	<artifactId>nifi-hl7-query-language</artifactId>
 	<packaging>jar</packaging>
-
-	<name>NiFi Health Level 7 (HL7) Query Language</name>
-
 	<build>
 		<plugins>
 			<plugin>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ce5a654e/nifi/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/pom.xml b/nifi/pom.xml
index 9b8bfb4..d500cbe 100644
--- a/nifi/pom.xml
+++ b/nifi/pom.xml
@@ -84,7 +84,7 @@
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <org.slf4j.version>1.7.10</org.slf4j.version>
-        <jetty.version>9.2.5.v20141112</jetty.version>
+        <jetty.version>9.2.10.v20150310</jetty.version>
         <lucene.version>4.10.3</lucene.version>
         <spring.version>4.1.4.RELEASE</spring.version>
         <spring.security.version>3.2.5.RELEASE</spring.security.version>


[38/50] [abbrv] incubator-nifi git commit: Merge branch 'NIFI-25' into develop

Posted by jo...@apache.org.
Merge branch 'NIFI-25' 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/58ea7af9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/58ea7af9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/58ea7af9

Branch: refs/heads/NIFI-271
Commit: 58ea7af9a73deadba2b57d5c30f73179e56622c4
Parents: 9ee34e2 e813487
Author: Mark Payne <ma...@hotmail.com>
Authored: Sat Apr 11 14:39:07 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Sat Apr 11 14:39:07 2015 -0400

----------------------------------------------------------------------
 nifi/nifi-assembly/NOTICE                       |  16 ++
 .../nifi-aws-bundle/nifi-aws-nar/pom.xml        |  36 ++++
 .../nifi-aws-bundle/nifi-aws-processors/pom.xml |  58 ++++++
 .../processors/aws/AbstractAWSProcessor.java    | 195 ++++++++++++++++++
 .../processors/aws/s3/AbstractS3Processor.java  | 171 ++++++++++++++++
 .../nifi/processors/aws/s3/FetchS3Object.java   | 157 ++++++++++++++
 .../nifi/processors/aws/s3/PutS3Object.java     | 181 ++++++++++++++++
 .../aws/sns/AbstractSNSProcessor.java           |  60 ++++++
 .../apache/nifi/processors/aws/sns/PutSNS.java  | 155 ++++++++++++++
 .../aws/sqs/AbstractSQSProcessor.java           |  51 +++++
 .../nifi/processors/aws/sqs/DeleteSQS.java      |  95 +++++++++
 .../apache/nifi/processors/aws/sqs/GetSQS.java  | 204 +++++++++++++++++++
 .../apache/nifi/processors/aws/sqs/PutSQS.java  | 147 +++++++++++++
 .../org.apache.nifi.processor.Processor         |  20 ++
 .../processors/aws/s3/TestFetchS3Object.java    |  44 ++++
 .../nifi/processors/aws/s3/TestPutS3Object.java |  87 ++++++++
 .../nifi/processors/aws/sns/TestPutSNS.java     |  34 ++++
 .../nifi/processors/aws/sqs/TestGetSQS.java     |  32 +++
 .../nifi/processors/aws/sqs/TestPutSQS.java     |  35 ++++
 .../src/test/resources/hello.txt                |   1 +
 nifi/nifi-nar-bundles/nifi-aws-bundle/pom.xml   |  43 ++++
 nifi/nifi-nar-bundles/pom.xml                   |   4 +-
 22 files changed, 1824 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[48/50] [abbrv] incubator-nifi git commit: Merge branch 'develop' of http://git-wip-us.apache.org/repos/asf/incubator-nifi into develop

Posted by jo...@apache.org.
Merge branch 'develop' of http://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/13cd2a67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/13cd2a67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/13cd2a67

Branch: refs/heads/NIFI-271
Commit: 13cd2a67c89e2c08880247c5837360f370fc9922
Parents: 7843132 fb2206a
Author: Jenn Barnabee <je...@gmail.com>
Authored: Sat Apr 18 07:05:29 2015 -0400
Committer: Jenn Barnabee <je...@gmail.com>
Committed: Sat Apr 18 07:05:29 2015 -0400

----------------------------------------------------------------------
 .../nifi-hl7-query-language/pom.xml             |  3 -
 .../nifi/provenance/lucene/DocsReader.java      | 20 ++---
 .../provenance/serialization/RecordReaders.java | 41 ++++++++-
 .../standard/AbstractJsonPathProcessor.java     | 25 +++++-
 .../processors/standard/EvaluateJsonPath.java   | 36 ++++----
 .../nifi/processors/standard/PutEmail.java      | 16 +++-
 .../nifi/processors/standard/SplitJson.java     |  5 +-
 .../standard/TestEvaluateJsonPath.java          | 86 +++++++++++++++++++
 .../nifi/processors/standard/TestSplitJson.java | 88 ++++++++++++++++++++
 nifi/pom.xml                                    |  2 +-
 10 files changed, 278 insertions(+), 44 deletions(-)
----------------------------------------------------------------------



[37/50] [abbrv] incubator-nifi git commit: Merge branch 'develop' into NIFI-25

Posted by jo...@apache.org.
Merge branch 'develop' into NIFI-25


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e8134870
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e8134870
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e8134870

Branch: refs/heads/NIFI-271
Commit: e8134870fda7b2b8eac4033b6c9217ae2839f04c
Parents: 0211d0d 7aca8ea
Author: Mark Payne <ma...@hotmail.com>
Authored: Sat Apr 11 14:38:51 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Sat Apr 11 14:38:51 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/nifi/bootstrap/RunNiFi.java | 131 +++---------------
 .../nifi-hl7-query-language/pom.xml             |  10 ++
 .../apache/nifi/hl7/query/antlr/HL7QueryLexer.g |  17 +++
 .../nifi/hl7/query/antlr/HL7QueryParser.g       |  17 +++
 .../org/apache/nifi/hl7/query/TestHL7Query.java |  52 +------
 .../src/test/resources/hyperglycemia            |   8 +-
 .../src/test/resources/hypoglycemia             |   8 +-
 .../src/test/resources/metabolic-panel          |  23 ----
 .../resources/unsolicited-vaccine-update-long   |  16 ---
 .../resources/unsolicited-vaccine-update-short  |   4 -
 .../src/test/resources/vaccine-query            |   3 -
 .../src/test/resources/vaers-message-long       |  60 ---------
 .../tasks/ContinuallyRunConnectableTask.java    |   2 +-
 .../src/main/resources/conf/bootstrap.conf      |   5 -
 .../src/main/webapp/WEB-INF/jsp/hexview.jsp     |   2 +-
 .../src/main/webapp/css/main.css                |   2 +-
 .../propertytable/jquery.propertytable.js       |  78 +++++++----
 .../main/webapp/js/nf/canvas/nf-canvas-utils.js |   7 +-
 .../src/main/webapp/js/nf/canvas/nf-canvas.js   |   8 +-
 .../nifi-hl7-bundle/nifi-hl7-processors/pom.xml |  14 ++
 .../hl7/TestExtractHL7Attributes.java           |   2 +-
 .../src/test/resources/1.hl7                    |  16 ---
 .../src/test/resources/hypoglycemia.hl7         |  10 +-
 .../nifi/processors/yandex/YandexTranslate.java |  32 +++--
 .../processors/yandex/TestYandexTranslate.java  | 135 +++++++++++++++----
 .../src/main/webapp/js/application.js           |  13 +-
 26 files changed, 295 insertions(+), 380 deletions(-)
----------------------------------------------------------------------



[25/50] [abbrv] incubator-nifi git commit: NIFI-507: Make default not to yield for ports and funnels

Posted by jo...@apache.org.
NIFI-507: Make default not to yield for ports and funnels


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/2c6b2a56
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/2c6b2a56
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/2c6b2a56

Branch: refs/heads/NIFI-271
Commit: 2c6b2a56640df57cb816b84b39f061d0d5271bce
Parents: c201aa1
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 10 11:06:12 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 10 11:06:12 2015 -0400

----------------------------------------------------------------------
 .../nifi/controller/tasks/ContinuallyRunConnectableTask.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2c6b2a56/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ContinuallyRunConnectableTask.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ContinuallyRunConnectableTask.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ContinuallyRunConnectableTask.java
index b5b60c9..5ecd22e 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ContinuallyRunConnectableTask.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ContinuallyRunConnectableTask.java
@@ -107,6 +107,6 @@ public class ContinuallyRunConnectableTask implements Callable<Boolean> {
             return true;
         }
         
-        return true;
+        return false;	// do not yield
     }
 }


[28/50] [abbrv] incubator-nifi git commit: NIFI-508: - Fixing the ordering of words when the text wraps..

Posted by jo...@apache.org.
NIFI-508:
- Fixing the ordering of words when the text wraps..

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/cd845c08
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/cd845c08
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/cd845c08

Branch: refs/heads/NIFI-271
Commit: cd845c08f27a44092389af18a9753f328f46b622
Parents: 9299355
Author: Matt Gilman <ma...@gmail.com>
Authored: Fri Apr 10 12:34:52 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Fri Apr 10 12:34:52 2015 -0400

----------------------------------------------------------------------
 .../src/main/webapp/js/nf/canvas/nf-canvas-utils.js           | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/cd845c08/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
index f1cb458..4c6be57 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
@@ -311,8 +311,9 @@ nf.CanvasUtils = (function () {
 
                     // if we've reached the last line, use single line ellipsis
                     if (++i >= lineCount) {
-                        // restore the current word
-                        var remainder = [word].concat(words);
+                        // get the remainder using the current word and 
+                        // reversing whats left
+                        var remainder = [word].concat(words.reverse());
 
                         // apply ellipsis to the last line
                         nf.CanvasUtils.ellipsis(tspan, remainder.join(' '));
@@ -322,7 +323,7 @@ nf.CanvasUtils = (function () {
                     } else {
                         tspan.text(word);
 
-                        // other prep the line for the next iteration
+                        // prep the line for the next iteration
                         line = [word];
                     }
                 }


[16/50] [abbrv] incubator-nifi git commit: NIFI-244: Initial import of GetTwitter processor

Posted by jo...@apache.org.
NIFI-244: Initial import of GetTwitter processor


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e9cb3b30
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e9cb3b30
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e9cb3b30

Branch: refs/heads/NIFI-271
Commit: e9cb3b300c6b5e223744925cee1d0c59dd97d29a
Parents: 178c5cd
Author: Mark Payne <ma...@hotmail.com>
Authored: Thu Apr 9 17:56:52 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Thu Apr 9 17:56:52 2015 -0400

----------------------------------------------------------------------
 nifi/nifi-assembly/NOTICE                       |  49 +
 nifi/nifi-assembly/pom.xml                      | 925 ++++++++++---------
 nifi/nifi-commons/pom.xml                       |   1 +
 .../nifi-social-media-nar/pom.xml               |  36 +
 .../nifi-twitter-processors/.gitignore          |   1 +
 .../nifi-twitter-processors/pom.xml             |  60 ++
 .../nifi/processors/twitter/GetTwitter.java     | 360 ++++++++
 .../org.apache.nifi.processor.Processor         |  16 +
 .../nifi-social-media-bundle/pom.xml            |  33 +
 nifi/nifi-nar-bundles/pom.xml                   |   4 +
 nifi/pom.xml                                    |  24 +
 11 files changed, 1060 insertions(+), 449 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9cb3b30/nifi/nifi-assembly/NOTICE
----------------------------------------------------------------------
diff --git a/nifi/nifi-assembly/NOTICE b/nifi/nifi-assembly/NOTICE
index 8d7db8d..d95e2ff 100644
--- a/nifi/nifi-assembly/NOTICE
+++ b/nifi/nifi-assembly/NOTICE
@@ -501,6 +501,38 @@ The following binary components are provided under the Apache Software License v
       Apache License Version 2.0 http://www.apache.org/licenses/.
       (c) Daniel Lemire, http://lemire.me/en/
 
+  (ASLv2) Twitter4J
+    The following NOTICE information applies:
+      Copyright 2007 Yusuke Yamamoto
+      
+      Twitter4J includes software from JSON.org to parse JSON response from the Twitter API. You can see the license term at http://www.JSON.org/license.html
+  
+  (ASLv2) JOAuth
+    The following NOTICE information applies:
+      JOAuth
+      Copyright 2010-2013 Twitter, Inc
+
+      Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
+  
+  (ASLv2) Hosebird Client
+    The following NOTICE information applies:
+      Hosebird Client (hbc)
+      Copyright 2013 Twitter, Inc.
+
+      Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
+
+  (ASLv2) GeoIP2 Java API
+    The following NOTICE information applies:
+      GeoIP2 Java API
+      This software is Copyright (c) 2013 by MaxMind, Inc.
+      
+      This is free software, licensed under the Apache License, Version 2.0.
+      
+  (ASLv2) Google HTTP Client Library for Java
+    The following NOTICE information applies:
+      Google HTTP Client Library for Java
+      
+      This is free software, licensed under the Apache License, Version 2.0.
 
 ************************
 Common Development and Distribution License 1.1
@@ -541,6 +573,14 @@ The following binary components are provided under the Common Development and Di
     (CDDL 1.0) SR 250 Common Annotations For The JavaTM Platform (javax.annotation:jsr250-api:jar:1.0 - http://jcp.org/aboutJava/communityprocess/final/jsr250/index.html)
 
 ************************
+Creative Commons Attribution-ShareAlike 3.0
+************************
+
+The following binary components are provided under the Creative Commons Attribution-ShareAlike 3.0.  See project link for details.
+
+	(CCAS 3.0) MaxMind DB (https://github.com/maxmind/MaxMind-DB)
+
+************************
 Eclipse Public License 1.0
 ************************
 
@@ -560,6 +600,15 @@ The following binary components are provided under the Mozilla Public License v2
     (MPL 2.0) Saxon HE (net.sf.saxon:Saxon-HE:jar:9.6.0-4 - http://www.saxonica.com/)
 
 *****************
+Mozilla Public License v1.1
+*****************
+
+The following binary components are provided under the Mozilla Public License v1.1.  See project link for details.
+
+    (MPL 1.1) HAPI Base (ca.uhn.hapi:hapi-base:2.2 - http://http://hl7api.sourceforge.net/)
+    (MPL 1.1) HAPI Structures (ca.uhn.hapi:hapi-structures-v*:2.2 - http://http://hl7api.sourceforge.net/)
+
+*****************
 Public Domain
 *****************
 

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9cb3b30/nifi/nifi-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-assembly/pom.xml b/nifi/nifi-assembly/pom.xml
index a26f214..13ffba8 100644
--- a/nifi/nifi-assembly/pom.xml
+++ b/nifi/nifi-assembly/pom.xml
@@ -1,457 +1,484 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-      http://www.apache.org/licenses/LICENSE-2.0
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.nifi</groupId>
-        <artifactId>nifi</artifactId>
-        <version>0.1.0-incubating-SNAPSHOT</version>
-    </parent>
-    <artifactId>nifi-assembly</artifactId>
-    <packaging>pom</packaging>
-    <description>This is the assembly Apache NiFi (incubating)</description>
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <finalName>nifi-${project.version}</finalName>
-                    <attach>false</attach>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make shared resource</id>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <phase>package</phase>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/dependencies.xml</descriptor>
-                            </descriptors>
-                            <tarLongFileMode>posix</tarLongFileMode>
-                        </configuration>
-                    </execution>
-                </executions>    
-            </plugin>
-        </plugins>
-    </build>
-    <dependencies>
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jcl-over-slf4j</artifactId>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jul-to-slf4j</artifactId>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>log4j-over-slf4j</artifactId>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-runtime</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-bootstrap</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-resources</artifactId>
-            <classifier>resources</classifier>
-            <scope>runtime</scope>
-            <type>zip</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-docs</artifactId>
-            <classifier>resources</classifier>
-            <scope>runtime</scope>
-            <type>zip</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-framework-nar</artifactId>
-            <type>nar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-provenance-repository-nar</artifactId>
-            <type>nar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-standard-services-api-nar</artifactId>
-            <type>nar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-ssl-context-service-nar</artifactId>
-            <type>nar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-distributed-cache-services-nar</artifactId>
-            <type>nar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-standard-nar</artifactId>
-            <type>nar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-jetty-bundle</artifactId>
-            <type>nar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-update-attribute-nar</artifactId>
-            <type>nar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-hadoop-libraries-nar</artifactId>
-            <type>nar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-hadoop-nar</artifactId>
-            <type>nar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-kafka-nar</artifactId>
-            <type>nar</type>
-        </dependency>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	You under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.nifi</groupId>
+		<artifactId>nifi</artifactId>
+		<version>0.1.0-incubating-SNAPSHOT</version>
+	</parent>
+	<artifactId>nifi-assembly</artifactId>
+	<packaging>pom</packaging>
+	<description>This is the assembly Apache NiFi (incubating)</description>
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<configuration>
+					<finalName>nifi-${project.version}</finalName>
+					<attach>false</attach>
+				</configuration>
+				<executions>
+					<execution>
+						<id>make shared resource</id>
+						<goals>
+							<goal>single</goal>
+						</goals>
+						<phase>package</phase>
+						<configuration>
+							<descriptors>
+								<descriptor>src/main/assembly/dependencies.xml</descriptor>
+							</descriptors>
+							<tarLongFileMode>posix</tarLongFileMode>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
 		<dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-http-context-map-nar</artifactId>
-            <type>nar</type>
-        </dependency>
+			<groupId>ch.qos.logback</groupId>
+			<artifactId>logback-classic</artifactId>
+			<scope>compile</scope>
+		</dependency>
 		<dependency>
-            <groupId>org.apache.nifi</groupId>
-            <artifactId>nifi-kite-nar</artifactId>
-            <type>nar</type>
-        </dependency>
-    </dependencies>
-    
-    <properties>        
-        <!--Wrapper Properties-->
-        <nifi.wrapper.jvm.heap.initial.mb>256</nifi.wrapper.jvm.heap.initial.mb>
-        <nifi.wrapper.jvm.heap.max.mb>512</nifi.wrapper.jvm.heap.max.mb>
-        <nifi.initial.permgen.size.mb>128</nifi.initial.permgen.size.mb>
-        <nifi.max.permgen.size.mb>128</nifi.max.permgen.size.mb>
-        <nifi.wrapper.logfile.maxsize>10m</nifi.wrapper.logfile.maxsize>
-        <nifi.wrapper.logfile.maxfiles>10</nifi.wrapper.logfile.maxfiles>
-        
-        <!-- nifi.properties: core properties -->
-        <nifi.version>${project.version}</nifi.version>
-        <nifi.flowcontroller.autoResumeState>true</nifi.flowcontroller.autoResumeState>
-        <nifi.flowcontroller.graceful.shutdown.period>10 sec</nifi.flowcontroller.graceful.shutdown.period>
-        <nifi.flowservice.writedelay.interval>500 ms</nifi.flowservice.writedelay.interval>
-        <nifi.administrative.yield.duration>30 sec</nifi.administrative.yield.duration>
-        <nifi.bored.yield.duration>10 millis</nifi.bored.yield.duration>
+			<groupId>org.slf4j</groupId>
+			<artifactId>jcl-over-slf4j</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>jul-to-slf4j</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>log4j-over-slf4j</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-runtime</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-bootstrap</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-resources</artifactId>
+			<classifier>resources</classifier>
+			<scope>runtime</scope>
+			<type>zip</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-docs</artifactId>
+			<classifier>resources</classifier>
+			<scope>runtime</scope>
+			<type>zip</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-framework-nar</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-provenance-repository-nar</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-standard-services-api-nar</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-ssl-context-service-nar</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-distributed-cache-services-nar</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-standard-nar</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-jetty-bundle</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-update-attribute-nar</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-hadoop-libraries-nar</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-hadoop-nar</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-kafka-nar</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-http-context-map-nar</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-kite-nar</artifactId>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-social-media-nar</artifactId>
+			<version>0.1.0-incubating-SNAPSHOT</version>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-hl7-nar</artifactId>
+			<version>0.1.0-incubating-SNAPSHOT</version>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-language-translation-nar</artifactId>
+			<version>0.1.0-incubating-SNAPSHOT</version>
+			<type>nar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.nifi</groupId>
+			<artifactId>nifi-geo-nar</artifactId>
+			<version>0.1.0-incubating-SNAPSHOT</version>
+			<type>nar</type>
+		</dependency>
+	</dependencies>
+
+	<properties>
+		<!--Wrapper Properties -->
+		<nifi.wrapper.jvm.heap.initial.mb>256</nifi.wrapper.jvm.heap.initial.mb>
+		<nifi.wrapper.jvm.heap.max.mb>512</nifi.wrapper.jvm.heap.max.mb>
+		<nifi.initial.permgen.size.mb>128</nifi.initial.permgen.size.mb>
+		<nifi.max.permgen.size.mb>128</nifi.max.permgen.size.mb>
+		<nifi.wrapper.logfile.maxsize>10m</nifi.wrapper.logfile.maxsize>
+		<nifi.wrapper.logfile.maxfiles>10</nifi.wrapper.logfile.maxfiles>
+
+		<!-- nifi.properties: core properties -->
+		<nifi.version>${project.version}</nifi.version>
+		<nifi.flowcontroller.autoResumeState>true</nifi.flowcontroller.autoResumeState>
+		<nifi.flowcontroller.graceful.shutdown.period>10 sec</nifi.flowcontroller.graceful.shutdown.period>
+		<nifi.flowservice.writedelay.interval>500 ms</nifi.flowservice.writedelay.interval>
+		<nifi.administrative.yield.duration>30 sec</nifi.administrative.yield.duration>
+		<nifi.bored.yield.duration>10 millis</nifi.bored.yield.duration>
+
+		<nifi.flow.configuration.file>./conf/flow.xml.gz</nifi.flow.configuration.file>
+		<nifi.flow.configuration.archive.dir>./conf/archive/</nifi.flow.configuration.archive.dir>
+		<nifi.authority.provider.configuration.file>./conf/authority-providers.xml</nifi.authority.provider.configuration.file>
+		<nifi.templates.directory>./conf/templates</nifi.templates.directory>
+		<nifi.database.directory>./database_repository</nifi.database.directory>
+
+		<nifi.flowfile.repository.implementation>org.apache.nifi.controller.repository.WriteAheadFlowFileRepository</nifi.flowfile.repository.implementation>
+		<nifi.flowfile.repository.directory>./flowfile_repository</nifi.flowfile.repository.directory>
+		<nifi.flowfile.repository.partitions>256</nifi.flowfile.repository.partitions>
+		<nifi.flowfile.repository.checkpoint.interval>2 mins</nifi.flowfile.repository.checkpoint.interval>
+		<nifi.flowfile.repository.always.sync>false</nifi.flowfile.repository.always.sync>
+		<nifi.swap.manager.implementation>org.apache.nifi.controller.FileSystemSwapManager</nifi.swap.manager.implementation>
+		<nifi.queue.swap.threshold>20000</nifi.queue.swap.threshold>
+		<nifi.swap.in.period>5 sec</nifi.swap.in.period>
+		<nifi.swap.in.threads>1</nifi.swap.in.threads>
+		<nifi.swap.out.period>5 sec</nifi.swap.out.period>
+		<nifi.swap.out.threads>4</nifi.swap.out.threads>
+
+		<nifi.content.repository.implementation>org.apache.nifi.controller.repository.FileSystemRepository</nifi.content.repository.implementation>
+		<nifi.content.claim.max.appendable.size>10 MB</nifi.content.claim.max.appendable.size>
+		<nifi.content.claim.max.flow.files>100</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.enabled>false</nifi.content.repository.archive.enabled>
+		<nifi.content.repository.always.sync>false</nifi.content.repository.always.sync>
+		<nifi.content.viewer.url />
+
+		<nifi.restore.directory />
+		<nifi.ui.banner.text />
+		<nifi.ui.autorefresh.interval>30 sec</nifi.ui.autorefresh.interval>
+		<nifi.nar.library.directory>./lib</nifi.nar.library.directory>
+		<nifi.nar.working.directory>./work/nar/</nifi.nar.working.directory>
+		<nifi.documentation.working.directory>./work/docs/components</nifi.documentation.working.directory>
+
+		<nifi.sensitive.props.algorithm>PBEWITHMD5AND256BITAES-CBC-OPENSSL</nifi.sensitive.props.algorithm>
+		<nifi.sensitive.props.provider>BC</nifi.sensitive.props.provider>
+		<nifi.h2.url.append>;LOCK_TIMEOUT=25000;WRITE_DELAY=0;AUTO_SERVER=FALSE</nifi.h2.url.append>
+
+		<nifi.remote.input.socket.port>9990</nifi.remote.input.socket.port>
+
+		<!-- persistent provenance repository properties -->
+		<nifi.provenance.repository.implementation>org.apache.nifi.provenance.PersistentProvenanceRepository</nifi.provenance.repository.implementation>
+		<nifi.provenance.repository.directory.default>./provenance_repository</nifi.provenance.repository.directory.default>
+		<nifi.provenance.repository.max.storage.time>24 hours</nifi.provenance.repository.max.storage.time>
+		<nifi.provenance.repository.max.storage.size>1 GB</nifi.provenance.repository.max.storage.size>
+		<nifi.provenance.repository.rollover.time>5 mins</nifi.provenance.repository.rollover.time>
+		<nifi.provenance.repository.rollover.size>100 MB</nifi.provenance.repository.rollover.size>
+		<nifi.provenance.repository.query.threads>2</nifi.provenance.repository.query.threads>
+		<nifi.provenance.repository.compress.on.rollover>true</nifi.provenance.repository.compress.on.rollover>
+		<nifi.provenance.repository.indexed.fields>EventType, FlowFileUUID,
+			Filename, ProcessorID</nifi.provenance.repository.indexed.fields>
+		<nifi.provenance.repository.indexed.attributes />
+		<nifi.provenance.repository.index.shard.size>500 MB</nifi.provenance.repository.index.shard.size>
+		<nifi.provenance.repository.always.sync>false</nifi.provenance.repository.always.sync>
+		<nifi.provenance.repository.journal.count>16</nifi.provenance.repository.journal.count>
+
+		<!-- volatile provenance repository properties -->
+		<nifi.provenance.repository.buffer.size>100000</nifi.provenance.repository.buffer.size>
+
+		<!-- Component status repository properties -->
+		<nifi.components.status.repository.implementation>org.apache.nifi.controller.status.history.VolatileComponentStatusRepository</nifi.components.status.repository.implementation>
+		<nifi.components.status.repository.buffer.size>288</nifi.components.status.repository.buffer.size>
+		<nifi.components.status.snapshot.frequency>5 mins</nifi.components.status.snapshot.frequency>
+
+		<!-- nifi.properties: web properties -->
+		<nifi.web.war.directory>./lib</nifi.web.war.directory>
+		<nifi.web.http.host />
+		<nifi.web.http.port>8080</nifi.web.http.port>
+		<nifi.web.https.host />
+		<nifi.web.https.port />
+		<nifi.jetty.work.dir>./work/jetty</nifi.jetty.work.dir>
+		<nifi.web.jetty.threads>200</nifi.web.jetty.threads>
 
-        <nifi.flow.configuration.file>./conf/flow.xml.gz</nifi.flow.configuration.file>
-        <nifi.flow.configuration.archive.dir>./conf/archive/</nifi.flow.configuration.archive.dir>
-        <nifi.authority.provider.configuration.file>./conf/authority-providers.xml</nifi.authority.provider.configuration.file>
-        <nifi.templates.directory>./conf/templates</nifi.templates.directory>
-        <nifi.database.directory>./database_repository</nifi.database.directory>
+		<!-- nifi.properties: security properties -->
+		<nifi.security.keystore />
+		<nifi.security.keystoreType />
+		<nifi.security.keystorePasswd />
+		<nifi.security.keyPasswd />
+		<nifi.security.truststore />
+		<nifi.security.truststoreType />
+		<nifi.security.truststorePasswd />
+		<nifi.security.needClientAuth />
+		<nifi.security.authorizedUsers.file>./conf/authorized-users.xml</nifi.security.authorizedUsers.file>
+		<nifi.security.user.credential.cache.duration>24 hours</nifi.security.user.credential.cache.duration>
+		<nifi.security.user.authority.provider>file-provider</nifi.security.user.authority.provider>
+		<nifi.security.x509.principal.extractor />
+		<nifi.security.support.new.account.requests />
+		<nifi.security.ocsp.responder.url />
+		<nifi.security.ocsp.responder.certificate />
 
-        <nifi.flowfile.repository.implementation>org.apache.nifi.controller.repository.WriteAheadFlowFileRepository</nifi.flowfile.repository.implementation>
-        <nifi.flowfile.repository.directory>./flowfile_repository</nifi.flowfile.repository.directory>
-        <nifi.flowfile.repository.partitions>256</nifi.flowfile.repository.partitions>
-        <nifi.flowfile.repository.checkpoint.interval>2 mins</nifi.flowfile.repository.checkpoint.interval>
-        <nifi.flowfile.repository.always.sync>false</nifi.flowfile.repository.always.sync>
-        <nifi.swap.manager.implementation>org.apache.nifi.controller.FileSystemSwapManager</nifi.swap.manager.implementation>
-        <nifi.queue.swap.threshold>20000</nifi.queue.swap.threshold>
-        <nifi.swap.in.period>5 sec</nifi.swap.in.period>
-        <nifi.swap.in.threads>1</nifi.swap.in.threads>
-        <nifi.swap.out.period>5 sec</nifi.swap.out.period>
-        <nifi.swap.out.threads>4</nifi.swap.out.threads>
-		
-        <nifi.content.repository.implementation>org.apache.nifi.controller.repository.FileSystemRepository</nifi.content.repository.implementation>
-        <nifi.content.claim.max.appendable.size>10 MB</nifi.content.claim.max.appendable.size>
-        <nifi.content.claim.max.flow.files>100</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.enabled>false</nifi.content.repository.archive.enabled>
-        <nifi.content.repository.always.sync>false</nifi.content.repository.always.sync>
-        <nifi.content.viewer.url />
-        
-        <nifi.restore.directory />
-        <nifi.ui.banner.text />
-        <nifi.ui.autorefresh.interval>30 sec</nifi.ui.autorefresh.interval>
-        <nifi.nar.library.directory>./lib</nifi.nar.library.directory>
-        <nifi.nar.working.directory>./work/nar/</nifi.nar.working.directory>
-        <nifi.documentation.working.directory>./work/docs/components</nifi.documentation.working.directory>
-        
-        <nifi.sensitive.props.algorithm>PBEWITHMD5AND256BITAES-CBC-OPENSSL</nifi.sensitive.props.algorithm>
-        <nifi.sensitive.props.provider>BC</nifi.sensitive.props.provider>
-        <nifi.h2.url.append>;LOCK_TIMEOUT=25000;WRITE_DELAY=0;AUTO_SERVER=FALSE</nifi.h2.url.append>
+		<!-- nifi.properties: cluster common properties (cluster manager and nodes 
+			must have same values) -->
+		<nifi.cluster.protocol.heartbeat.interval>5 sec</nifi.cluster.protocol.heartbeat.interval>
+		<nifi.cluster.protocol.is.secure>false</nifi.cluster.protocol.is.secure>
+		<nifi.cluster.protocol.socket.timeout>30 sec</nifi.cluster.protocol.socket.timeout>
+		<nifi.cluster.protocol.connection.handshake.timeout>45 sec</nifi.cluster.protocol.connection.handshake.timeout>
+		<nifi.cluster.protocol.use.multicast>false</nifi.cluster.protocol.use.multicast>
+		<nifi.cluster.protocol.multicast.address />
+		<nifi.cluster.protocol.multicast.port />
+		<nifi.cluster.protocol.multicast.service.broadcast.delay>500 ms</nifi.cluster.protocol.multicast.service.broadcast.delay>
+		<nifi.cluster.protocol.multicast.service.locator.attempts>3</nifi.cluster.protocol.multicast.service.locator.attempts>
+		<nifi.cluster.protocol.multicast.service.locator.attempts.delay>1 sec</nifi.cluster.protocol.multicast.service.locator.attempts.delay>
 
-        <nifi.remote.input.socket.port>9990</nifi.remote.input.socket.port>
-        
-        <!-- persistent provenance repository properties -->
-        <nifi.provenance.repository.implementation>org.apache.nifi.provenance.PersistentProvenanceRepository</nifi.provenance.repository.implementation>
-        <nifi.provenance.repository.directory.default>./provenance_repository</nifi.provenance.repository.directory.default>
-        <nifi.provenance.repository.max.storage.time>24 hours</nifi.provenance.repository.max.storage.time>
-        <nifi.provenance.repository.max.storage.size>1 GB</nifi.provenance.repository.max.storage.size>
-        <nifi.provenance.repository.rollover.time>5 mins</nifi.provenance.repository.rollover.time>
-        <nifi.provenance.repository.rollover.size>100 MB</nifi.provenance.repository.rollover.size>
-        <nifi.provenance.repository.query.threads>2</nifi.provenance.repository.query.threads>
-        <nifi.provenance.repository.compress.on.rollover>true</nifi.provenance.repository.compress.on.rollover>
-        <nifi.provenance.repository.indexed.fields>EventType, FlowFileUUID, Filename, ProcessorID</nifi.provenance.repository.indexed.fields>
-        <nifi.provenance.repository.indexed.attributes />
-        <nifi.provenance.repository.index.shard.size>500 MB</nifi.provenance.repository.index.shard.size>
-        <nifi.provenance.repository.always.sync>false</nifi.provenance.repository.always.sync>
-        <nifi.provenance.repository.journal.count>16</nifi.provenance.repository.journal.count>
-        
-        <!-- volatile provenance repository properties -->
-        <nifi.provenance.repository.buffer.size>100000</nifi.provenance.repository.buffer.size>
-        
-        <!-- Component status repository properties -->
-        <nifi.components.status.repository.implementation>org.apache.nifi.controller.status.history.VolatileComponentStatusRepository</nifi.components.status.repository.implementation>
-        <nifi.components.status.repository.buffer.size>288</nifi.components.status.repository.buffer.size>
-        <nifi.components.status.snapshot.frequency>5 mins</nifi.components.status.snapshot.frequency>
-        
-        <!-- nifi.properties: web properties -->
-        <nifi.web.war.directory>./lib</nifi.web.war.directory>
-        <nifi.web.http.host />
-        <nifi.web.http.port>8080</nifi.web.http.port>
-        <nifi.web.https.host />
-        <nifi.web.https.port />
-        <nifi.jetty.work.dir>./work/jetty</nifi.jetty.work.dir>
-        <nifi.web.jetty.threads>200</nifi.web.jetty.threads>
-        
-        <!-- nifi.properties: security properties -->
-        <nifi.security.keystore />
-        <nifi.security.keystoreType />
-        <nifi.security.keystorePasswd />
-        <nifi.security.keyPasswd />
-        <nifi.security.truststore />
-        <nifi.security.truststoreType />
-        <nifi.security.truststorePasswd />
-        <nifi.security.needClientAuth />
-        <nifi.security.authorizedUsers.file>./conf/authorized-users.xml</nifi.security.authorizedUsers.file>
-        <nifi.security.user.credential.cache.duration>24 hours</nifi.security.user.credential.cache.duration>
-        <nifi.security.user.authority.provider>file-provider</nifi.security.user.authority.provider>
-        <nifi.security.x509.principal.extractor />
-        <nifi.security.support.new.account.requests />
-        <nifi.security.ocsp.responder.url />
-        <nifi.security.ocsp.responder.certificate />
-        
-        <!-- nifi.properties: cluster common properties (cluster manager and nodes must have same values) -->
-        <nifi.cluster.protocol.heartbeat.interval>5 sec</nifi.cluster.protocol.heartbeat.interval>
-        <nifi.cluster.protocol.is.secure>false</nifi.cluster.protocol.is.secure>
-        <nifi.cluster.protocol.socket.timeout>30 sec</nifi.cluster.protocol.socket.timeout>
-        <nifi.cluster.protocol.connection.handshake.timeout>45 sec</nifi.cluster.protocol.connection.handshake.timeout> 
-        <nifi.cluster.protocol.use.multicast>false</nifi.cluster.protocol.use.multicast>
-        <nifi.cluster.protocol.multicast.address />
-        <nifi.cluster.protocol.multicast.port />
-        <nifi.cluster.protocol.multicast.service.broadcast.delay>500 ms</nifi.cluster.protocol.multicast.service.broadcast.delay>
-        <nifi.cluster.protocol.multicast.service.locator.attempts>3</nifi.cluster.protocol.multicast.service.locator.attempts>
-        <nifi.cluster.protocol.multicast.service.locator.attempts.delay>1 sec</nifi.cluster.protocol.multicast.service.locator.attempts.delay>
+		<!-- nifi.properties: cluster node properties (only configure for cluster 
+			nodes) -->
+		<nifi.cluster.is.node>false</nifi.cluster.is.node>
+		<nifi.cluster.node.address />
+		<nifi.cluster.node.protocol.port />
+		<nifi.cluster.node.protocol.threads>2</nifi.cluster.node.protocol.threads>
+		<nifi.cluster.node.unicast.manager.address />
+		<nifi.cluster.node.unicast.manager.protocol.port />
 
-        <!-- nifi.properties: cluster node properties (only configure for cluster nodes) -->
-        <nifi.cluster.is.node>false</nifi.cluster.is.node>
-        <nifi.cluster.node.address />
-        <nifi.cluster.node.protocol.port />
-        <nifi.cluster.node.protocol.threads>2</nifi.cluster.node.protocol.threads>
-        <nifi.cluster.node.unicast.manager.address />
-        <nifi.cluster.node.unicast.manager.protocol.port />
-        
-        <!-- nifi.properties: cluster manager properties (only configure for cluster manager) -->
-        <nifi.cluster.is.manager>false</nifi.cluster.is.manager>
-        <nifi.cluster.manager.address />
-        <nifi.cluster.manager.protocol.port />
-        <nifi.cluster.manager.node.firewall.file />
-        <nifi.cluster.manager.node.event.history.size>10</nifi.cluster.manager.node.event.history.size>
-        <nifi.cluster.manager.node.api.connection.timeout>30 sec</nifi.cluster.manager.node.api.connection.timeout>
-        <nifi.cluster.manager.node.api.read.timeout>30 sec</nifi.cluster.manager.node.api.read.timeout>
-        <nifi.cluster.manager.node.api.request.threads>10</nifi.cluster.manager.node.api.request.threads>
-        <nifi.cluster.manager.flow.retrieval.delay>5 sec</nifi.cluster.manager.flow.retrieval.delay>
-        <nifi.cluster.manager.protocol.threads>10</nifi.cluster.manager.protocol.threads>
-        <nifi.cluster.manager.safemode.duration>0 sec</nifi.cluster.manager.safemode.duration>
-    </properties>
-    <profiles>
-        <profile>
-            <id>rpm</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <artifactId>maven-dependency-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <id>unpack-shared-resources</id>
-                                <goals>
-                                    <goal>unpack-dependencies</goal>
-                                </goals>
-                                <phase>generate-resources</phase>
-                                <configuration>
-                                    <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
-                                    <includeArtifactIds>nifi-resources</includeArtifactIds>
-                                    <includeGroupIds>org.apache.nifi</includeGroupIds>
-                                    <excludeTransitive>false</excludeTransitive>
-                                </configuration>
-                            </execution>
-                            <execution>
-                                <id>unpack-docs</id>
-                                <goals>
-                                    <goal>unpack-dependencies</goal>
-                                </goals>
-                                <phase>generate-resources</phase>
-                                <configuration>
-                                    <outputDirectory>${project.build.directory}/generated-docs</outputDirectory>
-                                    <includeArtifactIds>nifi-docs</includeArtifactIds>
-                                    <includeGroupIds>org.apache.nifi</includeGroupIds>
-                                    <excludeTransitive>false</excludeTransitive>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>                    
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>rpm-maven-plugin</artifactId>
-                        <configuration>
-                            <summary>Apache NiFi (incubating)</summary>
-                            <description>Apache Nifi (incubating) is dataflow system based on the Flow-Based Programming concepts.</description>
-                            <license>Apache License, Version 2.0 and others (see included LICENSE file)</license>
-                            <url>http://nifi.incubator.apache.org</url>
-                            <group>Utilities</group>
-                            <prefix>/opt/nifi</prefix>
-                            <defineStatements>
-                                <defineStatement>_use_internal_dependency_generator 0</defineStatement>
-                            </defineStatements>
-                            <defaultDirmode>750</defaultDirmode>
-                            <defaultFilemode>640</defaultFilemode>
-                            <defaultUsername>root</defaultUsername>
-                            <defaultGroupname>root</defaultGroupname>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <id>build-bin-rpm</id>
-                                <goals>
-                                    <goal>attached-rpm</goal>
-                                </goals>
-                                <configuration>
-                                    <classifier>bin</classifier>
-                                    <provides>
-                                        <provide>nifi</provide>
-                                    </provides>
-                                    <mappings>
-                                        <mapping>
-                                            <directory>/opt/nifi/nifi-${project.version}</directory>
-                                        </mapping>
-                                        <mapping>
-                                            <directory>/opt/nifi/nifi-${project.version}</directory>
-                                            <sources>
-                                                <source>
-                                                    <location>./LICENSE</location>
-                                                </source>
-                                                <source>
-                                                    <location>./NOTICE</location>
-                                                </source>
-                                                <source>
-                                                    <location>../DISCLAIMER</location>
-                                                </source>
-                                                <source>
-                                                    <location>./README.md</location>
-                                                    <destination>README</destination>
-                                                </source>
-                                            </sources>
-                                        </mapping>
-                                        <mapping>
-                                            <directory>/opt/nifi/nifi-${project.version}/bin</directory>
-                                            <filemode>750</filemode>
-                                            <sources>
-                                                <source>
-                                                    <location>${project.build.directory}/generated-resources/bin/nifi.sh</location>
-                                                    <destination>nifi.sh</destination>
-                                                    <filter>true</filter>
-                                                </source>
-                                            </sources>
-                                        </mapping>
-                                        <mapping>
-                                            <directory>/opt/nifi/nifi-${project.version}/conf</directory>
-                                            <configuration>true</configuration>
-                                            <sources>
-                                                <source>
-                                                    <location>${project.build.directory}/generated-resources/conf</location>
-                                                    <filter>true</filter>
-                                                </source>
-                                            </sources>
-                                        </mapping>
-                                        <mapping>
-                                            <directory>/opt/nifi/nifi-${project.version}/lib</directory>
-                                            <dependency>
-                                                <excludes>
-                                                    <exclude>org.apache.nifi:nifi-bootstrap</exclude>
-                                                    <exclude>org.apache.nifi:nifi-resources</exclude>
-                                                    <exclude>org.apache.nifi:nifi-docs</exclude>
-                                                </excludes>
-                                            </dependency>
-                                        </mapping>
-                                        <mapping>
-                                            <directory>/opt/nifi/nifi-${project.version}/lib/bootstrap</directory>
-                                            <dependency>
-                                                <includes>
-                                                    <include>org.apache.nifi:nifi-bootstrap</include>
-                                                </includes>
-                                            </dependency>
-                                        </mapping>
-                                        <mapping>
-                                            <directory>/opt/nifi/nifi-${project.version}/docs</directory>
-                                            <sources>
-                                                <source>
-                                                    <location>${project.build.directory}/generated-docs</location>
-                                                </source>
-                                            </sources>
-                                        </mapping>
-                                    </mappings>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
+		<!-- nifi.properties: cluster manager properties (only configure for cluster 
+			manager) -->
+		<nifi.cluster.is.manager>false</nifi.cluster.is.manager>
+		<nifi.cluster.manager.address />
+		<nifi.cluster.manager.protocol.port />
+		<nifi.cluster.manager.node.firewall.file />
+		<nifi.cluster.manager.node.event.history.size>10</nifi.cluster.manager.node.event.history.size>
+		<nifi.cluster.manager.node.api.connection.timeout>30 sec</nifi.cluster.manager.node.api.connection.timeout>
+		<nifi.cluster.manager.node.api.read.timeout>30 sec</nifi.cluster.manager.node.api.read.timeout>
+		<nifi.cluster.manager.node.api.request.threads>10</nifi.cluster.manager.node.api.request.threads>
+		<nifi.cluster.manager.flow.retrieval.delay>5 sec</nifi.cluster.manager.flow.retrieval.delay>
+		<nifi.cluster.manager.protocol.threads>10</nifi.cluster.manager.protocol.threads>
+		<nifi.cluster.manager.safemode.duration>0 sec</nifi.cluster.manager.safemode.duration>
+	</properties>
+	<profiles>
+		<profile>
+			<id>rpm</id>
+			<activation>
+				<activeByDefault>false</activeByDefault>
+			</activation>
+			<build>
+				<plugins>
+					<plugin>
+						<artifactId>maven-dependency-plugin</artifactId>
+						<executions>
+							<execution>
+								<id>unpack-shared-resources</id>
+								<goals>
+									<goal>unpack-dependencies</goal>
+								</goals>
+								<phase>generate-resources</phase>
+								<configuration>
+									<outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
+									<includeArtifactIds>nifi-resources</includeArtifactIds>
+									<includeGroupIds>org.apache.nifi</includeGroupIds>
+									<excludeTransitive>false</excludeTransitive>
+								</configuration>
+							</execution>
+							<execution>
+								<id>unpack-docs</id>
+								<goals>
+									<goal>unpack-dependencies</goal>
+								</goals>
+								<phase>generate-resources</phase>
+								<configuration>
+									<outputDirectory>${project.build.directory}/generated-docs</outputDirectory>
+									<includeArtifactIds>nifi-docs</includeArtifactIds>
+									<includeGroupIds>org.apache.nifi</includeGroupIds>
+									<excludeTransitive>false</excludeTransitive>
+								</configuration>
+							</execution>
+						</executions>
+					</plugin>
+					<plugin>
+						<groupId>org.codehaus.mojo</groupId>
+						<artifactId>rpm-maven-plugin</artifactId>
+						<configuration>
+							<summary>Apache NiFi (incubating)</summary>
+							<description>Apache Nifi (incubating) is dataflow system based on
+								the Flow-Based Programming concepts.</description>
+							<license>Apache License, Version 2.0 and others (see included
+								LICENSE file)</license>
+							<url>http://nifi.incubator.apache.org</url>
+							<group>Utilities</group>
+							<prefix>/opt/nifi</prefix>
+							<defineStatements>
+								<defineStatement>_use_internal_dependency_generator 0</defineStatement>
+							</defineStatements>
+							<defaultDirmode>750</defaultDirmode>
+							<defaultFilemode>640</defaultFilemode>
+							<defaultUsername>root</defaultUsername>
+							<defaultGroupname>root</defaultGroupname>
+						</configuration>
+						<executions>
+							<execution>
+								<id>build-bin-rpm</id>
+								<goals>
+									<goal>attached-rpm</goal>
+								</goals>
+								<configuration>
+									<classifier>bin</classifier>
+									<provides>
+										<provide>nifi</provide>
+									</provides>
+									<mappings>
+										<mapping>
+											<directory>/opt/nifi/nifi-${project.version}</directory>
+										</mapping>
+										<mapping>
+											<directory>/opt/nifi/nifi-${project.version}</directory>
+											<sources>
+												<source>
+													<location>./LICENSE</location>
+												</source>
+												<source>
+													<location>./NOTICE</location>
+												</source>
+												<source>
+													<location>../DISCLAIMER</location>
+												</source>
+												<source>
+													<location>./README.md</location>
+													<destination>README</destination>
+												</source>
+											</sources>
+										</mapping>
+										<mapping>
+											<directory>/opt/nifi/nifi-${project.version}/bin</directory>
+											<filemode>750</filemode>
+											<sources>
+												<source>
+													<location>${project.build.directory}/generated-resources/bin/nifi.sh</location>
+													<destination>nifi.sh</destination>
+													<filter>true</filter>
+												</source>
+											</sources>
+										</mapping>
+										<mapping>
+											<directory>/opt/nifi/nifi-${project.version}/conf</directory>
+											<configuration>true</configuration>
+											<sources>
+												<source>
+													<location>${project.build.directory}/generated-resources/conf</location>
+													<filter>true</filter>
+												</source>
+											</sources>
+										</mapping>
+										<mapping>
+											<directory>/opt/nifi/nifi-${project.version}/lib</directory>
+											<dependency>
+												<excludes>
+													<exclude>org.apache.nifi:nifi-bootstrap</exclude>
+													<exclude>org.apache.nifi:nifi-resources</exclude>
+													<exclude>org.apache.nifi:nifi-docs</exclude>
+												</excludes>
+											</dependency>
+										</mapping>
+										<mapping>
+											<directory>/opt/nifi/nifi-${project.version}/lib/bootstrap</directory>
+											<dependency>
+												<includes>
+													<include>org.apache.nifi:nifi-bootstrap</include>
+												</includes>
+											</dependency>
+										</mapping>
+										<mapping>
+											<directory>/opt/nifi/nifi-${project.version}/docs</directory>
+											<sources>
+												<source>
+													<location>${project.build.directory}/generated-docs</location>
+												</source>
+											</sources>
+										</mapping>
+									</mappings>
+								</configuration>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+	</profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9cb3b30/nifi/nifi-commons/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/pom.xml b/nifi/nifi-commons/pom.xml
index 5358054..1d2ce46 100644
--- a/nifi/nifi-commons/pom.xml
+++ b/nifi/nifi-commons/pom.xml
@@ -36,5 +36,6 @@
         <module>nifi-processor-utilities</module>
         <module>nifi-write-ahead-log</module>
 		<module>nifi-site-to-site-client</module>
+		<module>nifi-hl7-query-language</module>
     </modules>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9cb3b30/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 b/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-social-media-nar/pom.xml
new file mode 100644
index 0000000..6da74dd
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-social-media-nar/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-social-media-bundle</artifactId>
+        <version>0.1.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-social-media-nar</artifactId>
+    <packaging>nar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-twitter-processors</artifactId>
+            <version>0.1.0-incubating-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9cb3b30/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/.gitignore
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/.gitignore b/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/.gitignore
@@ -0,0 +1 @@
+/target/

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9cb3b30/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
new file mode 100644
index 0000000..45af0ce
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/pom.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+      http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-social-media-bundle</artifactId>
+        <version>0.1.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-twitter-processors</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-processor-utils</artifactId>
+        </dependency>
+	
+		<dependency>
+			<groupId>com.twitter</groupId>
+			<artifactId>hbc-twitter4j</artifactId>
+			<version>2.2.0</version>
+		</dependency>
+        
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-mock</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9cb3b30/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
new file mode 100644
index 0000000..45b1ae1
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/java/org/apache/nifi/processors/twitter/GetTwitter.java
@@ -0,0 +1,360 @@
+/*
+ * 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.twitter;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.MalformedURLException;
+import java.nio.charset.StandardCharsets;
+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.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.regex.Pattern;
+
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.annotation.lifecycle.OnStopped;
+import org.apache.nifi.components.AllowableValue;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.ValidationContext;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.components.Validator;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+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.util.StandardValidators;
+
+import com.twitter.hbc.ClientBuilder;
+import com.twitter.hbc.core.Client;
+import com.twitter.hbc.core.Constants;
+import com.twitter.hbc.core.endpoint.StatusesFilterEndpoint;
+import com.twitter.hbc.core.endpoint.StatusesFirehoseEndpoint;
+import com.twitter.hbc.core.endpoint.StatusesSampleEndpoint;
+import com.twitter.hbc.core.endpoint.StreamingEndpoint;
+import com.twitter.hbc.core.event.Event;
+import com.twitter.hbc.core.processor.StringDelimitedProcessor;
+import com.twitter.hbc.httpclient.auth.Authentication;
+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")
+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();
+    public static final PropertyDescriptor CONSUMER_KEY = new PropertyDescriptor.Builder()
+    	.name("Consumer Key")
+    	.description("The Consumer Key provided by Twitter")
+    	.required(true)
+    	.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+    	.build();
+    public static final PropertyDescriptor CONSUMER_SECRET = new PropertyDescriptor.Builder()
+		.name("Consumer Secret")
+		.description("The Consumer Secret provided by Twitter")
+		.required(true)
+		.sensitive(true)
+		.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+		.build();
+    public static final PropertyDescriptor ACCESS_TOKEN = new PropertyDescriptor.Builder()
+		.name("Access Token")
+		.description("The Acces Token provided by Twitter")
+		.required(true)
+		.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+		.build();
+    public static final PropertyDescriptor ACCESS_TOKEN_SECRET = new PropertyDescriptor.Builder()
+		.name("Access Token Secret")
+		.description("The Access Token Secret provided by Twitter")
+		.required(true)
+		.sensitive(true)
+		.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+		.build();
+    public static final PropertyDescriptor LANGUAGES = new PropertyDescriptor.Builder()
+    	.name("Languages")
+    	.description("A comma-separated list of languages for which tweets should be fetched")
+    	.required(false)
+    	.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+    	.build();
+    public static final PropertyDescriptor FOLLOWING = new PropertyDescriptor.Builder()
+		.name("IDs to Follow")
+		.description("A comma-separated list of Twitter User ID's to follow. Ignored unless Endpoint is set to 'Filter Endpoint'.")
+		.required(false)
+		.addValidator(new FollowingValidator())
+		.build();
+    public static final PropertyDescriptor TERMS = new PropertyDescriptor.Builder()
+		.name("Terms to Filter On")
+		.description("A comma-separated list of terms to filter on. Ignored unless Endpoint is set to 'Filter Endpoint'. The filter works such that if any term matches, the status update will be retrieved; multiple terms separated by a space function as an 'AND'. I.e., 'it was, hello' will retrieve status updates that have either 'hello' or both 'it' AND 'was'")
+		.required(false)
+		.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+		.build();
+    
+    
+    public static final Relationship REL_SUCCESS = new Relationship.Builder()
+        .name("success")
+        .description("All status updates will be routed to this relationship")
+        .build();
+
+    private List<PropertyDescriptor> descriptors;
+    private Set<Relationship> relationships;
+
+    private final BlockingQueue<Event> eventQueue = new LinkedBlockingQueue<Event>(1000);
+    
+    private volatile Client client;
+    private volatile BlockingQueue<String> messageQueue;
+
+    @Override
+    protected void init(final ProcessorInitializationContext context) {
+        final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
+        descriptors.add(ENDPOINT);
+        descriptors.add(CONSUMER_KEY);
+        descriptors.add(CONSUMER_SECRET);
+        descriptors.add(ACCESS_TOKEN);
+        descriptors.add(ACCESS_TOKEN_SECRET);
+        descriptors.add(LANGUAGES);
+        descriptors.add(TERMS);
+        descriptors.add(FOLLOWING);
+        this.descriptors = Collections.unmodifiableList(descriptors);
+
+        final Set<Relationship> relationships = new HashSet<Relationship>();
+        relationships.add(REL_SUCCESS);
+        this.relationships = Collections.unmodifiableSet(relationships);
+    }
+
+    @Override
+    public Set<Relationship> getRelationships() {
+        return this.relationships;
+    }
+
+    @Override
+    public final List<PropertyDescriptor> getSupportedPropertyDescriptors() {
+        return descriptors;
+    }
+    
+    @Override
+    protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
+    	return new PropertyDescriptor.Builder()
+    		.name(propertyDescriptorName)
+    		.description("Adds a query parameter with name '" + propertyDescriptorName + "' to the Twitter query")
+    		.required(false)
+    		.dynamic(true)
+    		.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+    		.build();
+    }
+    
+    @Override
+    protected Collection<ValidationResult> customValidate(final ValidationContext validationContext) {
+    	final List<ValidationResult> results = new ArrayList<>();
+    	final String endpointName = validationContext.getProperty(ENDPOINT).getValue();
+    	
+    	if ( ENDPOINT_FILTER.getValue().equals(endpointName) ) {
+    		if ( !validationContext.getProperty(TERMS).isSet() && !validationContext.getProperty(FOLLOWING).isSet() ) {
+    			results.add(new ValidationResult.Builder().input("").subject(FOLLOWING.getName()).valid(false).explanation("When using the 'Filter Endpoint', at least one of '" + TERMS.getName() + "' or '" + FOLLOWING.getName() + "' must be set").build());
+    		}
+    	}
+    	
+    	return results;
+    }
+    
+    @Override
+    public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) {
+    	// if any property is modified, the results are no longer valid. Destroy all messages in teh queue.
+    	messageQueue.clear();
+    }
+
+    @OnScheduled
+    public void onScheduled(final ProcessContext context) throws MalformedURLException {
+    	messageQueue = new LinkedBlockingQueue<>(100000);
+    	
+    	final String endpointName = context.getProperty(ENDPOINT).getValue();
+    	final Authentication oauth = new OAuth1(context.getProperty(CONSUMER_KEY).getValue(), 
+    			context.getProperty(CONSUMER_SECRET).getValue(), 
+    			context.getProperty(ACCESS_TOKEN).getValue(),
+    			context.getProperty(ACCESS_TOKEN_SECRET).getValue());
+
+    	final ClientBuilder clientBuilder = new ClientBuilder();
+    	clientBuilder.name("GetTwitter[id=" + getIdentifier() + "]")
+    		.authentication(oauth)
+    		.eventMessageQueue(eventQueue)
+    		.processor(new StringDelimitedProcessor(messageQueue));
+
+    	final String languageString = context.getProperty(LANGUAGES).getValue();
+    	final List<String> languages;
+    	if ( languageString == null ) {
+    		languages = null;
+    	} else {
+    		languages = new ArrayList<>();
+	    	for ( final String language : context.getProperty(LANGUAGES).getValue().split(",") ) {
+	    		languages.add(language.trim());
+	    	}
+    	}
+    	
+    	final String host;
+    	final StreamingEndpoint streamingEndpoint;
+    	if ( ENDPOINT_SAMPLE.getValue().equals(endpointName) ) {
+    		host = Constants.STREAM_HOST;
+    		final StatusesSampleEndpoint sse = new StatusesSampleEndpoint();
+    		streamingEndpoint = sse;
+    		if ( languages != null ) {
+    			sse.languages(languages);
+    		}
+    	} else if ( ENDPOINT_FIREHOSE.getValue().equals(endpointName) ) {
+    		host = Constants.STREAM_HOST;
+        	final StatusesFirehoseEndpoint firehoseEndpoint = new StatusesFirehoseEndpoint();
+        	streamingEndpoint = firehoseEndpoint;
+        	if ( languages != null ) {
+        		firehoseEndpoint.languages(languages);
+        	}
+    	} else if ( ENDPOINT_FILTER.getValue().equals(endpointName) ) {
+    		host = Constants.STREAM_HOST;
+    		final StatusesFilterEndpoint filterEndpoint = new StatusesFilterEndpoint();
+    		
+    		final String followingString = context.getProperty(FOLLOWING).getValue();
+    		final List<Long> followingIds;
+    		if ( followingString == null ) {
+    			followingIds = Collections.emptyList();
+    		} else {
+    			followingIds = new ArrayList<>();
+    			
+    			for ( final String split : followingString.split(",") ) {
+    				final Long id = Long.parseLong(split.trim());
+    				followingIds.add(id);
+    			}
+    		}
+    		
+    		final String termString = context.getProperty(TERMS).getValue();
+    		final List<String> terms;
+    		if ( termString == null ) {
+    			terms = Collections.emptyList();
+    		} else {
+    			terms = new ArrayList<>();
+    			for ( final String split : termString.split(",") ) {
+    				terms.add(split.trim());
+    			}
+    		}
+    		
+    		if ( !terms.isEmpty() ) {
+    			filterEndpoint.trackTerms(terms);
+    		}
+    		
+    		if ( !followingIds.isEmpty() ) {
+    			filterEndpoint.followings(followingIds);
+    		}
+    		
+    		if ( languages != null ) {
+    			filterEndpoint.languages(languages);
+    		}
+    		streamingEndpoint = filterEndpoint;
+    	} else {
+    		throw new AssertionError("Endpoint was invalid value: " + endpointName);
+    	}
+
+    	clientBuilder.hosts(host).endpoint(streamingEndpoint);
+    	client = clientBuilder.build();
+    	client.connect();
+    }
+
+    @OnStopped
+    public void shutdownClient() {
+    	if ( client != null ) {
+    		client.stop();
+    	}
+    }
+    
+    @Override
+    public void onTrigger(final ProcessContext context, final ProcessSession session) throws ProcessException {
+    	final Event event = eventQueue.poll();
+    	if ( event != null ) {
+    		switch (event.getEventType()) {
+	    		case STOPPED_BY_ERROR:
+    				getLogger().error("Received error {}: {} due to {}. Will not attempt to reconnect", new Object[] {event.getEventType(), event.getMessage(), event.getUnderlyingException()});
+    				break;
+	    		case CONNECTION_ERROR:
+    			case HTTP_ERROR:
+    				getLogger().error("Received error {}: {}. Will attempt to reconnect", new Object[] {event.getEventType(), event.getMessage()});
+    				client.reconnect();
+    				break;
+    			default:
+    				break;
+    		}
+    	}
+    	
+    	final String tweet = messageQueue.poll();
+    	if ( tweet == null ) {
+    		context.yield();
+    		return;
+    	}
+    	
+    	FlowFile flowFile = session.create();
+    	flowFile = session.write(flowFile, new OutputStreamCallback() {
+			@Override
+			public void process(final OutputStream out) throws IOException {
+				out.write(tweet.getBytes(StandardCharsets.UTF_8));
+			}
+    	});
+    	
+    	final Map<String, String> attributes = new HashMap<>();
+    	attributes.put(CoreAttributes.MIME_TYPE.key(), "application/json");
+    	attributes.put(CoreAttributes.FILENAME.key(), flowFile.getAttribute(CoreAttributes.FILENAME.key()) + ".json");
+    	flowFile = session.putAllAttributes(flowFile, attributes);
+    	
+    	session.transfer(flowFile, REL_SUCCESS);
+    	session.getProvenanceReporter().receive(flowFile, Constants.STREAM_HOST + client.getEndpoint().getURI().toString());
+    }
+
+    private static class FollowingValidator implements Validator {
+    	private static final Pattern NUMBER_PATTERN = Pattern.compile("\\d+");
+    	
+		@Override
+		public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
+			final String[] splits = input.split(",");
+			for ( final String split : splits ) {
+				if ( !NUMBER_PATTERN.matcher(split.trim()).matches() ) {
+					return new ValidationResult.Builder().input(input).subject(subject).valid(false).explanation("Must be comma-separted list of User ID's").build();
+				}
+			}
+			
+			return new ValidationResult.Builder().subject(subject).input(input).valid(true).build();
+		}
+    	
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9cb3b30/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor b/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
new file mode 100644
index 0000000..9504a11
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+org.apache.nifi.processors.twitter.GetTwitter
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9cb3b30/nifi/nifi-nar-bundles/nifi-social-media-bundle/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-social-media-bundle/pom.xml b/nifi/nifi-nar-bundles/nifi-social-media-bundle/pom.xml
new file mode 100644
index 0000000..5aadbce
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-social-media-bundle/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-nar-bundles</artifactId>
+        <version>0.1.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-social-media-bundle</artifactId>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>nifi-twitter-processors</module>
+        <module>nifi-social-media-nar</module>
+    </modules>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9cb3b30/nifi/nifi-nar-bundles/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/pom.xml b/nifi/nifi-nar-bundles/pom.xml
index e7c122d..50a9407 100644
--- a/nifi/nifi-nar-bundles/pom.xml
+++ b/nifi/nifi-nar-bundles/pom.xml
@@ -35,6 +35,10 @@
         <module>nifi-update-attribute-bundle</module>
         <module>nifi-kafka-bundle</module>
 		<module>nifi-kite-bundle</module>
+		<module>nifi-social-media-bundle</module>
+		<module>nifi-geo-bundle</module>
+		<module>nifi-hl7-bundle</module>
+		<module>nifi-language-translation-bundle</module>
     </modules>
     <dependencyManagement>
         <dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9cb3b30/nifi/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/pom.xml b/nifi/pom.xml
index 2e2346a..9b8bfb4 100644
--- a/nifi/pom.xml
+++ b/nifi/pom.xml
@@ -800,6 +800,30 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.nifi</groupId>
+                <artifactId>nifi-social-media-nar</artifactId>
+                <version>0.1.0-incubating-SNAPSHOT</version>
+                <type>nar</type>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.nifi</groupId>
+                <artifactId>nifi-hl7-nar</artifactId>
+                <version>0.1.0-incubating-SNAPSHOT</version>
+                <type>nar</type>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.nifi</groupId>
+                <artifactId>nifi-language-translation-nar</artifactId>
+                <version>0.1.0-incubating-SNAPSHOT</version>
+                <type>nar</type>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.nifi</groupId>
+                <artifactId>nifi-geo-nar</artifactId>
+                <version>0.1.0-incubating-SNAPSHOT</version>
+                <type>nar</type>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.nifi</groupId>
                 <artifactId>nifi-properties</artifactId>
                 <version>0.1.0-incubating-SNAPSHOT</version>
             </dependency>


[42/50] [abbrv] incubator-nifi git commit: NIFI-520 Added documentation on the new Controller Services and Reporting Tasks features to the User Guide.

Posted by jo...@apache.org.
NIFI-520 Added documentation on the new Controller Services and Reporting Tasks features to the User Guide.


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/78431322
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/78431322
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/78431322

Branch: refs/heads/NIFI-271
Commit: 7843132228522fb2192e3078e512cefc1e4d2156
Parents: 8270791
Author: Jenn Barnabee <je...@gmail.com>
Authored: Wed Apr 15 07:45:29 2015 -0400
Committer: Jenn Barnabee <je...@gmail.com>
Committed: Wed Apr 15 07:45:29 2015 -0400

----------------------------------------------------------------------
 .../images/add-controller-service-window.png    | Bin 0 -> 155417 bytes
 .../configure-controller-service-properties.png | Bin 0 -> 107830 bytes
 .../configure-controller-service-settings.png   | Bin 0 -> 79718 bytes
 .../configure-reporting-task-properties.png     | Bin 0 -> 58292 bytes
 .../configure-reporting-task-settings.png       | Bin 0 -> 80213 bytes
 .../images/controller-services-edit-buttons.png | Bin 0 -> 5049 bytes
 .../asciidoc/images/controller-services-tab.png | Bin 0 -> 166310 bytes
 .../images/controller-settings-button.png       | Bin 0 -> 32341 bytes
 .../images/create-service-ssl-context.png       | Bin 0 -> 142764 bytes
 .../images/reporting-tasks-edit-buttons.png     | Bin 0 -> 5049 bytes
 .../asciidoc/images/reporting-tasks-tab.png     | Bin 0 -> 158876 bytes
 .../asciidoc/images/settings-general-tab.png    | Bin 0 -> 129148 bytes
 .../nifi-docs/src/main/asciidoc/user-guide.adoc |  98 ++++++++++++++++---
 13 files changed, 82 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/images/add-controller-service-window.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/images/add-controller-service-window.png b/nifi/nifi-docs/src/main/asciidoc/images/add-controller-service-window.png
new file mode 100644
index 0000000..a692d5d
Binary files /dev/null and b/nifi/nifi-docs/src/main/asciidoc/images/add-controller-service-window.png differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/images/configure-controller-service-properties.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/images/configure-controller-service-properties.png b/nifi/nifi-docs/src/main/asciidoc/images/configure-controller-service-properties.png
new file mode 100644
index 0000000..c0b4d83
Binary files /dev/null and b/nifi/nifi-docs/src/main/asciidoc/images/configure-controller-service-properties.png differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/images/configure-controller-service-settings.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/images/configure-controller-service-settings.png b/nifi/nifi-docs/src/main/asciidoc/images/configure-controller-service-settings.png
new file mode 100644
index 0000000..d97d5a1
Binary files /dev/null and b/nifi/nifi-docs/src/main/asciidoc/images/configure-controller-service-settings.png differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/images/configure-reporting-task-properties.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/images/configure-reporting-task-properties.png b/nifi/nifi-docs/src/main/asciidoc/images/configure-reporting-task-properties.png
new file mode 100644
index 0000000..cb303a1
Binary files /dev/null and b/nifi/nifi-docs/src/main/asciidoc/images/configure-reporting-task-properties.png differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/images/configure-reporting-task-settings.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/images/configure-reporting-task-settings.png b/nifi/nifi-docs/src/main/asciidoc/images/configure-reporting-task-settings.png
new file mode 100644
index 0000000..0f9474d
Binary files /dev/null and b/nifi/nifi-docs/src/main/asciidoc/images/configure-reporting-task-settings.png differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/images/controller-services-edit-buttons.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/images/controller-services-edit-buttons.png b/nifi/nifi-docs/src/main/asciidoc/images/controller-services-edit-buttons.png
new file mode 100644
index 0000000..9b721da
Binary files /dev/null and b/nifi/nifi-docs/src/main/asciidoc/images/controller-services-edit-buttons.png differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/images/controller-services-tab.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/images/controller-services-tab.png b/nifi/nifi-docs/src/main/asciidoc/images/controller-services-tab.png
new file mode 100644
index 0000000..0656c7c
Binary files /dev/null and b/nifi/nifi-docs/src/main/asciidoc/images/controller-services-tab.png differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/images/controller-settings-button.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/images/controller-settings-button.png b/nifi/nifi-docs/src/main/asciidoc/images/controller-settings-button.png
new file mode 100644
index 0000000..a4f7e92
Binary files /dev/null and b/nifi/nifi-docs/src/main/asciidoc/images/controller-settings-button.png differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/images/create-service-ssl-context.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/images/create-service-ssl-context.png b/nifi/nifi-docs/src/main/asciidoc/images/create-service-ssl-context.png
new file mode 100644
index 0000000..8db2ea6
Binary files /dev/null and b/nifi/nifi-docs/src/main/asciidoc/images/create-service-ssl-context.png differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/images/reporting-tasks-edit-buttons.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/images/reporting-tasks-edit-buttons.png b/nifi/nifi-docs/src/main/asciidoc/images/reporting-tasks-edit-buttons.png
new file mode 100644
index 0000000..f115bd4
Binary files /dev/null and b/nifi/nifi-docs/src/main/asciidoc/images/reporting-tasks-edit-buttons.png differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/images/reporting-tasks-tab.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/images/reporting-tasks-tab.png b/nifi/nifi-docs/src/main/asciidoc/images/reporting-tasks-tab.png
new file mode 100644
index 0000000..edf9794
Binary files /dev/null and b/nifi/nifi-docs/src/main/asciidoc/images/reporting-tasks-tab.png differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/images/settings-general-tab.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/images/settings-general-tab.png b/nifi/nifi-docs/src/main/asciidoc/images/settings-general-tab.png
new file mode 100644
index 0000000..2b9189a
Binary files /dev/null and b/nifi/nifi-docs/src/main/asciidoc/images/settings-general-tab.png differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/78431322/nifi/nifi-docs/src/main/asciidoc/user-guide.adoc
----------------------------------------------------------------------
diff --git a/nifi/nifi-docs/src/main/asciidoc/user-guide.adoc b/nifi/nifi-docs/src/main/asciidoc/user-guide.adoc
index e13aaac..e94af74 100644
--- a/nifi/nifi-docs/src/main/asciidoc/user-guide.adoc
+++ b/nifi/nifi-docs/src/main/asciidoc/user-guide.adoc
@@ -61,24 +61,28 @@ Terminology
 
 *Relationship*: Each Processor has zero or more Relationships defined for it. These Relationships are named to indicate the result of processing a FlowFile.
 	After a Processor has finished processing a FlowFile, it will route (or “transfer”) the FlowFile to one of the Relationships.
-	A DataFlow Manager is then able to connect each of these Relationships to other components in order to specify where the FlowFile should
+	A DFM is then able to connect each of these Relationships to other components in order to specify where the FlowFile should
 	go next under each potential processing result.
 
-*Connection*: A DataFlow Manager creates an automated dataflow by dragging components from the Components part of the NiFi toolbar to the canvas
+*Connection*: A DFM creates an automated dataflow by dragging components from the Components part of the NiFi toolbar to the canvas
 	and then connecting the components together via Connections. Each connection consists of one or more Relationships.
-	For each Connection that is drawn, a DataFlow Manager can determine which Relationships should be used for the Connection.
+	For each Connection that is drawn, a DFM can determine which Relationships should be used for the Connection.
 	This allows data to be routed in different ways based on its processing outcome. Each connection houses a FlowFile Queue.
 	When a FlowFile is transferred to a particular Relationship, it is added to the queue belonging to the associated Connection.
 
+*Controller Service*: Controller Services are extension points that, after being added and configured by a DFM in the User Interface, will start up when NiFi starts up and provide information for use by other components (processors). A common Controller Service used by several processors is the StandardSSLContextService. It provides the ability to configure keystore and/or truststore properties once and reuse that configuration throughout the application. The idea is that, rather than configure this information in every processor that might need it, the controller service provides it for any processor to use as needed.
+
+*Reporting Task*: Reporting Tasks run in the background to provide statistical reports about what is happening in the NiFi instance. The DFM adds and configures Reporting Tasks in the User Interface as desired. Common reporting tasks include the ControllerStatusReportingTask, MonitorDiskUsage reporting task, MonitorMemory reporting task, and the StandardGangliaReporter.
+
 *Funnel*: A funnel is a NiFi component that is used to combine the data from several Connections into a single Connection.
 
 *Process Group*: When a dataflow becomes complex, it often is beneficial to reason about the dataflow at a higher, more abstract level.
 	NiFi allows multiple components, such as Processors, to be grouped together into a Process Group.
-	The NiFi User Interface then makes it easy for a DataFlow Manager to connect together multiple Process Groups into a logical dataflow,
-	as well as allowing the DataFlow Manager to enter a Process Group in order to see and manipulate the components within the Process Group.
+	The NiFi User Interface then makes it easy for a DFM to connect together multiple Process Groups into a logical dataflow,
+	as well as allowing the DFM to enter a Process Group in order to see and manipulate the components within the Process Group.
 
 *Port*: Dataflows that are constructed using one or more Process Groups need a way to connect a Process Group to other dataflow components.
-	This is achieved by using Ports. A DataFlow Manager can add any number of Input Ports and Output Ports to a Process Group and name these ports appropriately.
+	This is achieved by using Ports. A DFM can add any number of Input Ports and Output Ports to a Process Group and name these ports appropriately.
 
 *Remote Process Group*: Just as data is transferred into and out of a Process Group, it is sometimes necessary to transfer data from one instance of NiFi to another.
 	While NiFi provides many different mechanisms for transferring data from one system to another, Remote Process Groups are often the easiest way to accomplish
@@ -91,7 +95,7 @@ Terminology
 	as well as the message of the Bulletin.
 	Bulletins from all components can also be viewed and filtered in the Bulletin Board Page, available in the Management Toolbar.
 
-*Template*: Often times, a dataflow is comprised of many sub-flows that could be reused. NiFi allows DataFlow Managers to select a part of the dataflow
+*Template*: Often times, a dataflow is comprised of many sub-flows that could be reused. NiFi allows DFMs to select a part of the dataflow
 	(or the entire dataflow) and create a Template. This Template is given a name and can then be dragged onto the canvas just like the other components.
 	As a result, several components may be combined together to make a larger building block from which to create a dataflow.
 	These templates can also be exported as XML and imported into another NiFi instance, allowing these building blocks to be shared.
@@ -111,7 +115,7 @@ When the application is started, the user is able to navigate to the User Interf
 `http://<hostname>:8080/nifi` in a web browser. There are no permissions configured by default, so anyone is
 able to view and modify the dataflow. For information on securing the system, see the Systems Administrator guide.
 
-When a DataFlow Manager navigates to the UI for the first time, a blank canvas is provided on which a dataflow can be built:
+When a DFM navigates to the UI for the first time, a blank canvas is provided on which a dataflow can be built:
 
 image::new-flow.png["Empty Flow"]
 
@@ -124,7 +128,7 @@ Search field that allows users to easily find components on the graph. Users are
 type, identifier, configuration properties, and their values.
 
 The Management Toolbar sits to the right-hand side of the screen. This toolbar consists of buttons that are
-used by DataFlow Managers to manage the flow as well as by administrators who manage user access
+used by DFMs to manage the flow as well as by administrators who manage user access
 and configure system properties, such as how many system resources should be provided to the application.
 
 image::nifi-toolbar-components.png["NiFi Components Toolbar"]
@@ -155,7 +159,7 @@ image::status-bar.png["NiFi Status Bar"]
 Building a DataFlow
 -------------------
 
-A DataFlow Manager (DFM) is able to build an automated dataflow using the NiFi User Interface (UI). Simply drag components from the toolbar to the canvas, configure the components to meet specific needs, and connect
+A DFM is able to build an automated dataflow using the NiFi User Interface (UI). Simply drag components from the toolbar to the canvas, configure the components to meet specific needs, and connect
 the components together.
 
 
@@ -240,7 +244,7 @@ one Connection, rather than prioritizing the data on each Connection independent
 
 
 image:iconTemplate.png["Template", width=32]
-*Template*: Templates can be created by DataFlow Managers from sections of the flow, or they can be imported from other
+*Template*: Templates can be created by DFMs from sections of the flow, or they can be imported from other
 dataflows. These Templates provide larger building blocks for creating a  complex flow quickly. When the Template is
 dragged onto the canvas, the DFM is provided a dialog to choose which Template to add to the canvas:
 
@@ -420,6 +424,10 @@ image:iconDelete.png["Delete Icon"]
 
 Some processors also have an Advanced User Interface (UI) built into them. For example, the UpdateAttribute processor has an Advanced UI. To access the Advanced UI, click the `Advanced` button that appears at the bottom of the Configure Processor window. Only processors that have an Advanced UI will have this button. 
 
+Some processors have properties that refer to other components, such as Controller Services, which also need to be configured. For example, the GetHTTP processor has an SSLContextService property, which refers to the StandardSSLContextService controller service. When DFMs want to configure this property but have not yet created and configured the controller service, they have the option to create the service on the spot, as depicted in the image below. For more information about configuring Controller Services, see the <<Controller_Services_and_Reporting_Tasks>> section.
+
+image:create-service-ssl-context.png["Create Service", width=700]
+
 ==== Comments Tab
 
 The last tab in the Processor configuration dialog is the Comments tab. This tab simply provides an area for users to include
@@ -436,6 +444,64 @@ corner of the User Interface will provide a Help page with all of the documentat
 for all the Processors that are available. Clicking on the desired Processor in the list will display its usage documentation.
 
 
+
+[[Controller_Services_and_Reporting_Tasks]]
+=== Controller Services and Reporting Tasks
+
+While DFMs have the ability to create Controller Services from the Configure Processor window, there is also a central place within the User Interface for adding and configuring both Controller Services and Reporting Tasks. To get there, click on the Controller Settings button in the Management section of the toolbar.
+
+image:controller-settings-button.png["Controller Settings Button", width=200]
+
+The Controller Settings window has three tabs across the top: General, Controller Services, and Reporting Tasks. The General tab is for settings that pertain to general information about the NiFi instance. For example, here, the DFM can provide a unique name for the overall dataflow, as well as comments that describe the flow. Be aware that this information is visible to any other NiFi instance that connects remotely to this instance (using Remote Process Groups, a.k.a., Site-to-Site).
+
+The General tab also provides settings for the overall maximum thread counts of the instance, as well as the ability to click "Back-up flow" to create a backup copy of the current flow, which is saved by default in the /conf/archive directory.
+
+image:settings-general-tab.png["Controller Settings General Tab", width=700]
+
+To the right of the General tab is the Controller Services tab. From this tab, the DFM may click the "+" button in the upper-right corner to create a new Controller Service.
+
+image:controller-services-tab.png["Controller Services Tab", width=900]
+
+The Add Controller Service window opens. This window is similar to the Add Processor window. It provides a list of the available Controller Services on the right and a tag cloud, showing the most common catagory tags used for Controller Services, on the left. The DFM may click any tag in the tag cloud in order to narrow down the list of Controller Services to those that fit the categories desired. The DFM may also use the Filter field at the top of the window to search for the desired Contoller Service. Upon selecting a Controller Service from the list, the DFM can see a description of the the service below. Select the desired controller service and click Add, or simply double-click the name of the service to add it.
+
+image:add-controller-service-window.png["Add Controller Service Window", width=700]
+
+Once a Controller Service has been added, the DFM may configure it by clicking the Edit button (pencil icon) in the far-right column. Other buttons in this column include the Enable button (to enable a configured service), the Remove button, and the Usage button, which links to the documentation for the particular Controller Service.
+
+image:controller-services-edit-buttons.png["Controller Services Buttons"]
+
+When the DFM clicks the Edit button, a Configure Controller Service window opens. It has three tabs: Settings, Properties, and Comments. This window is similar to the Configure Processor window. The Settings tab provides a place for the DFM to give the Controller Service a unique name (if desired). It also lists the UUID for the service and provides a list of other components (processors or other controller services) that reference the service.
+
+image:configure-controller-service-settings.png["Configure Controller Service Settings", width=700]
+
+The Properties tab lists the various properties that apply to the particular controller service. As with configuring processors, the DFM may hover the mouse over the question mark icons to see more information about each property.
+
+image:configure-controller-service-properties.png["Configure Controller Service Properties", width=700]
+
+The Comments tab is just an open-text field, where the DFM may include comments about the service. After configuring a Controller Service, click the Apply button to apply the configuration and close the window, or click the Cancel button to cancel the changes and close the window.
+
+The Reporting Tasks tab behaves exactly the same way as the Controller Services tab. The DFM has the option to add Reporting Tasks and configure them in the same way as Controller Services.
+
+image:reporting-tasks-tab.png["Reporting Tasks Tab", width=900]
+
+Once a Reporting Task has been added, the DFM may configure it by clicking the Edit (pencil icon) in the far-right column. Other buttons in this column include the Start button, Remove button, and Usage button, which links to the documentation for the particular Reporting Task.
+
+image:reporting-tasks-edit-buttons.png["Reporting Tasks Buttons"]
+
+When the DFM clicks the Edit button, a Configure Reporting Task window opens. It has three tabs: Settings, Properties, and Comments. This window is also similar to the Configure Processor window. The Settings tab provides a place for the DFM to give the Reporting Task a unique name (if desired). It also lists a UUID for the Reporting Task and provides settings for the task's Scheduling Strategy and Run Schedule (similar to the same settings in a processor). The DFM may hover the mouse over the question mark icons to see more information about each setting.
+
+image:configure-reporting-task-settings.png["Configure Reporting Task Settings", width=700]
+
+The Properties tab for a Reporting Task lists the properties that may be configured for the task. The DFM may hover the mouse over the question mark icons to see more information about each property.
+
+image:configure-reporting-task-properties.png["Configure Reporting Task Properties", width=700]
+
+The Comments tab is just an open-text field, where the DFM may include comments about the task. After configuring the Reporting Task, click the Apply button to apply the configuration and close the window, or click Cancel to cancel the changes and close the window.
+
+When you want to run the Reporting Task, click the Start button in the far-right column of the Reporting Tasks tab.
+
+
+
 === Connecting Components
 
 Once processors and other components have been added to the graph and configured, the next step is to connect them
@@ -720,7 +786,7 @@ The image outlines the following elements:
 	Processor writes a FlowFile to disk - or ``Puts'' a FlowFile to a File.
 	
 - *Bulletin Indicator*: When a Processor logs that some event has occurred, it generates a Bulletin to notify
-	those who are monitoring NiFi via the User Interface. The DataFlow Manager is able to configure which
+	those who are monitoring NiFi via the User Interface. The DFM is able to configure which
 	bulletins should be displayed in the User Interface by updating the ``Bulletin level'' field in the
 	``Settings'' tab of the Processor configuration dialog. The default value is `WARN`, which means that only
 	warnings and errors will be displayed in the UI. This icon is not present unless a Bulletin exists for this
@@ -1094,7 +1160,7 @@ will remove the selection.
 
 [[templates]]
 == Templates
-DataFlow Managers have the ability to build very large and complex DataFlows using NiFi. This is achieved
+DFMs have the ability to build very large and complex DataFlows using NiFi. This is achieved
 by using the basic components: Processor, Funnel, Input/Output Port, Process Group, and Remote Process Group. These
 can be thought of as the most basic building blocks for constructing a DataFlow. At times, though, using these
 small building blocks can become tedious if the same logic needs to be repeated several times.
@@ -1245,7 +1311,7 @@ image:event-attributes.png["Event Attributes", width=700]
 
 === Replaying a FlowFile
 
-A Dataflow Manager may need to inspect a FlowFile's content at some point in the dataflow to ensure that it is being processed as expected. And if it
+A DFM may need to inspect a FlowFile's content at some point in the dataflow to ensure that it is being processed as expected. And if it
 is not being processed properly, the DFM may need to make adjustments to the dataflow and replay the FlowFile again. The Content tab of the View Details dialog window is where the DFM can do these things. The Content tab shows information about the FlowFile's content, such as its location in the Content Repository
 and its size. In addition, it is here that the user may click the `Download` button in order to download a copy of the FlowFile's content as it existed
 at this point in the flow. The user may also click the `Submit` button to replay the FlowFile at this point in the flow. Upon clicking `Submit`, 
@@ -1287,9 +1353,9 @@ image:expanded-events.png["Expanded Events", width=300]
 Other Management Features
 -------------------------
 
-In addition to the Summary Page, Data Provenance Page, Template Management Page, and Bulletin Board Page, there are other tools in the Management Toolbar (See <<User_Interface>>) that are useful to the Dataflow Manager. The Flow Configuration History, which is available by clicking on the clock icon ( image:iconFlowHistory.png["Flow History", width=28] ) in the Management Toolbar, shows all the changes that have been made to the dataflow graph. The history can aid in troubleshooting if a recent change to the dataflow has caused a problem and needs to be fixed. While NiFi does not have an "undo" feature, the DataFlow Manager can make new changes to the dataflow that will fix the problem.
+In addition to the Summary Page, Data Provenance Page, Template Management Page, and Bulletin Board Page, there are other tools in the Management Toolbar (See <<User_Interface>>) that are useful to the DFM. The Flow Configuration History, which is available by clicking on the clock icon ( image:iconFlowHistory.png["Flow History", width=28] ) in the Management Toolbar, shows all the changes that have been made to the dataflow graph. The history can aid in troubleshooting, such as if a recent change to the dataflow has caused a problem and needs to be fixed. The DFM can see what changes have been made and adjust the flow as needed to fix the problem. While NiFi does not have an "undo" feature, the DFM can make new changes to the dataflow that will fix the problem.
 
-Two other tools in the Management Toolbar are used primarily by Administrators. These are the Flow Settings page ( image:iconSettings.png["Flow Settings", width=28] ) and the Users page ( image:iconUsers.png["Users", width=28] ). The Flow Settings page provides the ability to change the name of the NiFi instance, add comments describing the NiFi instance, set the maximum number of threads that are available to the application, and create a back-up copy of the dataflow(s) currently on the graph. The Users page is used to manage user access, which is described in the Admin Guide. 
+Two other tools in the Management Toolbar are the Controller Settings page ( image:iconSettings.png["Settings", width=28] ) and the Users page ( image:iconUsers.png["Users", width=28] ). The Controller Settings page provides the ability to change the name of the NiFi instance, add comments describing the NiFi instance, set the maximum number of threads that are available to the application, and create a back-up copy of the dataflow(s) currently on the graph. It also provides tabs where DFMs may add and configure Controller Services and Reporting Tasks (see <<Controller_Services_and_Reporting_Tasks>>). The Users page is used to manage user access, which is described in the Admin Guide. 
 
 
 


[19/50] [abbrv] incubator-nifi git commit: NIFI-244: Fixed copy/paste error that called out website as http://http://... instead of just http://...

Posted by jo...@apache.org.
NIFI-244: Fixed copy/paste error that called out website as http://http://... instead of just http://...


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/10d002c7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/10d002c7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/10d002c7

Branch: refs/heads/NIFI-271
Commit: 10d002c78a7fbd31669d840199f3138d715d6189
Parents: b682b6f
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 10 08:40:22 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 10 08:40:22 2015 -0400

----------------------------------------------------------------------
 nifi/nifi-assembly/NOTICE | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/10d002c7/nifi/nifi-assembly/NOTICE
----------------------------------------------------------------------
diff --git a/nifi/nifi-assembly/NOTICE b/nifi/nifi-assembly/NOTICE
index d95e2ff..9da37ae 100644
--- a/nifi/nifi-assembly/NOTICE
+++ b/nifi/nifi-assembly/NOTICE
@@ -605,8 +605,8 @@ Mozilla Public License v1.1
 
 The following binary components are provided under the Mozilla Public License v1.1.  See project link for details.
 
-    (MPL 1.1) HAPI Base (ca.uhn.hapi:hapi-base:2.2 - http://http://hl7api.sourceforge.net/)
-    (MPL 1.1) HAPI Structures (ca.uhn.hapi:hapi-structures-v*:2.2 - http://http://hl7api.sourceforge.net/)
+    (MPL 1.1) HAPI Base (ca.uhn.hapi:hapi-base:2.2 - http://hl7api.sourceforge.net/)
+    (MPL 1.1) HAPI Structures (ca.uhn.hapi:hapi-structures-v*:2.2 - http://hl7api.sourceforge.net/)
 
 *****************
 Public Domain


[03/50] [abbrv] incubator-nifi git commit: NIFI-493: - Fixing the number of documented components. - Fixing unordered list creation.

Posted by jo...@apache.org.
NIFI-493:
- Fixing the number of documented components.
- Fixing unordered list creation.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/d769b50e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/d769b50e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/d769b50e

Branch: refs/heads/NIFI-271
Commit: d769b50e39a7802dad55544f56759b976f162f70
Parents: 7369730
Author: Matt Gilman <ma...@gmail.com>
Authored: Wed Apr 8 08:39:05 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Wed Apr 8 08:39:05 2015 -0400

----------------------------------------------------------------------
 .../nifi/web/docs/DocumentationController.java    |  5 ++++-
 .../src/main/webapp/WEB-INF/jsp/documentation.jsp | 18 +++++++++---------
 2 files changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d769b50e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/java/org/apache/nifi/web/docs/DocumentationController.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/java/org/apache/nifi/web/docs/DocumentationController.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/java/org/apache/nifi/web/docs/DocumentationController.java
index a5428cd..7d8ec6c 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/java/org/apache/nifi/web/docs/DocumentationController.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/java/org/apache/nifi/web/docs/DocumentationController.java
@@ -39,6 +39,9 @@ import org.apache.commons.lang3.StringUtils;
 @WebServlet(name = "DocumenationController", urlPatterns = {"/*"})
 public class DocumentationController extends HttpServlet {
 
+    private static final int GENERAL_LINK_COUNT = 4;
+    private static final int DEVELOPER_LINK_COUNT = 2;
+    
     // context for accessing the extension mapping
     private ServletContext servletContext;
 
@@ -82,7 +85,7 @@ public class DocumentationController extends HttpServlet {
         request.setAttribute("processors", processors);
         request.setAttribute("controllerServices", controllerServices);
         request.setAttribute("reportingTasks", reportingTasks);
-        request.setAttribute("totalComponents", processors.size() + controllerServices.size() + reportingTasks.size());
+        request.setAttribute("totalComponents", GENERAL_LINK_COUNT + processors.size() + controllerServices.size() + reportingTasks.size() + DEVELOPER_LINK_COUNT);
 
         // forward appropriately
         request.getRequestDispatcher("/WEB-INF/jsp/documentation.jsp").forward(request, response);

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d769b50e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp
index d2397de..aea08d0 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp
@@ -55,11 +55,11 @@
                 <div id="processor-links" class="component-links">
                     <c:choose>
                         <c:when test="${not empty processors}">
+                            <ul>
                             <c:forEach var="entry" items="${processors}">
-                                <ul>
-                                    <li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
-                                </ul>
+                                <li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
                             </c:forEach>
+                            </ul>
                             <span class="no-matching no-components hidden">No matching processors</span>
                         </c:when>
                         <c:otherwise>
@@ -73,11 +73,11 @@
                 <div id="controller-service-links" class="component-links">
                     <c:choose>
                         <c:when test="${not empty controllerServices}">
+                            <ul>
                             <c:forEach var="entry" items="${controllerServices}">
-                                <ul>
-                                    <li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
-                                </ul>
+                                <li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
                             </c:forEach>
+                            </ul>
                             <span class="no-matching no-components hidden">No matching controller services</span>
                         </c:when>
                         <c:otherwise>
@@ -91,11 +91,11 @@
                 <div id="reporting-task-links" class="component-links">
                     <c:choose>
                         <c:when test="${not empty reportingTasks}">
+                            <ul>
                             <c:forEach var="entry" items="${reportingTasks}">
-                                <ul>
-                                    <li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
-                                </ul>
+                                <li class="component-item"><a class="component-link" href="components/${entry.value}/index.html" target="component-usage">${entry.key}</a></li>
                             </c:forEach>
+                            </ul>
                             <span class="no-matching no-components hidden">No matching reporting tasks</span>
                         </c:when>
                         <c:otherwise>


[30/50] [abbrv] incubator-nifi git commit: NIFI-510: - Only reacting to window resize events when the target of the event is the window.

Posted by jo...@apache.org.
NIFI-510:
- Only reacting to window resize events when the target of the event is the window.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/df575551
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/df575551
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/df575551

Branch: refs/heads/NIFI-271
Commit: df5755514c43bc297295ac8d39c650ab2aa381db
Parents: cd845c0
Author: Matt Gilman <ma...@gmail.com>
Authored: Fri Apr 10 14:48:01 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Fri Apr 10 14:48:01 2015 -0400

----------------------------------------------------------------------
 .../src/main/webapp/js/nf/canvas/nf-canvas.js          |  8 +++++---
 .../src/main/webapp/js/application.js                  | 13 +++++++++----
 2 files changed, 14 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/df575551/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index 6fda984..38894d8 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -529,9 +529,11 @@ nf.Canvas = (function () {
         };
 
         // listen for browser resize events to reset the graph size
-        $(window).on('resize', function () {
-            updateGraphSize();
-            nf.Settings.resetTableSize();
+        $(window).on('resize', function (e) {
+            if (e.target === window) {
+                updateGraphSize();
+                nf.Settings.resetTableSize();
+            }
         }).on('keydown', function (evt) {
             var isCtrl = evt.ctrlKey || evt.metaKey;
             

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/df575551/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js
index eb7bdfb..80a3df8 100644
--- a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js
+++ b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js
@@ -14,6 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+/* global Slick */
+
 $(document).ready(function () {
     ua.editable = $('#attribute-updater-editable').text() === 'true';
     ua.init();
@@ -43,10 +46,12 @@ var ua = {
         var actionsGrid = ua.initActionsGrid();
 
         // enable grid resizing
-        $(window).resize(function () {
-            conditionsGrid.resizeCanvas();
-            actionsGrid.resizeCanvas();
-            ua.resizeSelectedRuleNameField();
+        $(window).resize(function (e) {
+            if (e.target === window) {
+                conditionsGrid.resizeCanvas();
+                actionsGrid.resizeCanvas();
+                ua.resizeSelectedRuleNameField();
+            }
         });
 
         // initialize the rule list


[05/50] [abbrv] incubator-nifi git commit: NIFI-475: - Adding support to create controller services inline when editing a components properties.

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
index 0e60b2c..c7b2b65 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
@@ -168,34 +168,6 @@ nf.Settings = (function () {
     };
 
     /**
-     * Determines if all of the ancestors of the specified item are expanded.
-     * 
-     * @param {type} item
-     * @returns {Boolean}
-     */
-    var areAncestorsExpanded = function (item) {
-        var documentedType = item;
-        while (documentedType.parent !== null) {
-            if (documentedType.parent.collapsed === true) {
-                return false;
-            }
-            documentedType = documentedType.parent;
-        }
-
-        return true;
-    };
-
-    /**
-     * Determines if the specified item is an ancestor.
-     * 
-     * @param {type} item
-     * @returns {Boolean}
-     */
-    var isAncestor = function (item) {
-        return item.children.length > 0;
-    };
-
-    /**
      * Hides the selected controller service.
      */
     var clearSelectedControllerService = function () {
@@ -232,27 +204,6 @@ nf.Settings = (function () {
      * @returns {Boolean}       Whether or not to include the item
      */
     var filterControllerServiceTypes = function (item, args) {
-        if (!areAncestorsExpanded(item)) {
-            // if this item is currently selected and its parent is not collapsed
-            if ($('#selected-controller-service-type').text() === item['type']) {
-                clearControllerServiceSelection();
-            }
-
-            // update visibility flag
-            item.visible = false;
-
-            return false;
-        }
-
-        // don't allow ancestors to be filtered out (unless any of their ancestors
-        // are collapsed)
-        if (isAncestor(item)) {
-            // update visibility flag
-            item.visible = false;
-
-            return true;
-        }
-
         // determine if the item matches the filter
         var matchesFilter = matchesRegex(item, args);
 
@@ -274,9 +225,6 @@ nf.Settings = (function () {
             clearControllerServiceSelection();
         }
 
-        // update visibility flag
-        item.visible = matches;
-
         return matches;
     };
 
@@ -331,64 +279,6 @@ nf.Settings = (function () {
     };
 
     /**
-     * Formats the type by introducing expand/collapse where appropriate.
-     * 
-     * @param {type} row
-     * @param {type} cell
-     * @param {type} value
-     * @param {type} columnDef
-     * @param {type} dataContext
-     */
-    var expandableTypeFormatter = function (row, cell, value, columnDef, dataContext) {
-        var markup = '';
-
-        var indent = 0;
-        var documentedType = dataContext;
-        while (documentedType.parent !== null) {
-            indent += 20;
-            documentedType = documentedType.parent;
-        }
-
-        var padding = 3;
-
-        // create the markup for the row
-        if (dataContext.children.length > 0) {
-            // determine how to render the expansion button
-            var expansionStyle = 'expanded';
-            if (dataContext.collapsed === true) {
-                expansionStyle = 'collapsed';
-            }
-
-            // calculate the number of visible/total children
-            var visibleChildren = 0;
-            var totalChildren = 0;
-            var countChildren = function (item) {
-                $.each(item.children, function (_, child) {
-                    if (child.children.length > 0) {
-                        countChildren(child);
-                    } else {
-                        if (child.visible) {
-                            visibleChildren++;
-                        }
-                        totalChildren++;
-                    }
-                });
-            };
-            countChildren(dataContext);
-
-            markup += ('<span style="margin-top: 5px; margin-left: ' + indent + 'px;" class="expansion-button ' + expansionStyle + '"></span><span class="ancestor-type" style="margin-left: ' + padding + 'px;">' + value + '</span><span class="ancestor-type-rollup">(' + visibleChildren + ' of ' + totalChildren + ')</span>');
-        } else {
-            if (dataContext.parent === null) {
-                padding = 0;
-            }
-
-            markup += ('<span style="margin-left: ' + (indent + padding) + 'px;">' + value + '</span>');
-        }
-
-        return markup;
-    };
-
-    /**
      * Adds a new controller service of the specified type.
      * 
      * @param {string} controllerServiceType
@@ -431,6 +321,7 @@ nf.Settings = (function () {
             // select the new controller service
             var row = controllerServicesData.getRowById(controllerService.id);
             controllerServicesGrid.setSelectedRows([row]);
+            controllerServicesGrid.scrollRowIntoView(row);
         }).fail(nf.Common.handleAjaxError);
 
         // hide the dialog
@@ -488,7 +379,7 @@ nf.Settings = (function () {
 
         // initialize the processor type table
         var controllerServiceTypesColumns = [
-            {id: 'type', name: 'Type', field: 'label', formatter: expandableTypeFormatter, sortable: false, resizable: true},
+            {id: 'type', name: 'Type', field: 'label', sortable: false, resizable: true},
             {id: 'tags', name: 'Tags', field: 'tags', sortable: false, resizable: true}
         ];
 
@@ -502,32 +393,6 @@ nf.Settings = (function () {
             property: $('#controller-service-type-filter-options').combo('getSelectedOption').value
         });
         controllerServiceTypesData.setFilter(filterControllerServiceTypes);
-        controllerServiceTypesData.getItemMetadata = function (index) {
-            var item = controllerServiceTypesData.getItem(index);
-            if (item && item.children.length > 0) {
-                return {
-                    selectable: false,
-                    columns: {
-                        0: {
-                            colspan: '*'
-                        }
-                    }
-                };
-            } else {
-                return {};
-            }
-        };
-
-        var getVisibleControllerServiceCount = function () {
-            var count = 0;
-            for (var i = 0; i < controllerServiceTypesData.getLength(); i++) {
-                var item = controllerServiceTypesData.getItem(i);
-                if (item.children.length === 0) {
-                    count++;
-                }
-            }
-            return count;
-        };
 
         // initialize the grid
         var controllerServiceTypesGrid = new Slick.Grid('#controller-service-types-table', controllerServiceTypesData, controllerServiceTypesColumns, gridOptions);
@@ -539,41 +404,20 @@ nf.Settings = (function () {
                 var controllerServiceTypeIndex = args.rows[0];
                 var controllerServiceType = controllerServiceTypesGrid.getDataItem(controllerServiceTypeIndex);
 
-                // only allow selection of service implementations
-                if (controllerServiceType.children.length === 0) {
-                    // set the controller service type description
-                    if (nf.Common.isBlank(controllerServiceType.description)) {
-                        $('#controller-service-type-description').attr('title', '').html('<span class="unset">No description specified</span>');
-                    } else {
-                        $('#controller-service-type-description').html(controllerServiceType.description).ellipsis();
-                    }
-
-                    // populate the dom
-                    $('#controller-service-type-name').text(controllerServiceType.label).ellipsis();
-                    $('#selected-controller-service-name').text(controllerServiceType.label);
-                    $('#selected-controller-service-type').text(controllerServiceType.type);
-
-                    // show the selected controller service
-                    $('#controller-service-description-container').show();
-                }
-            }
-        });
-        controllerServiceTypesGrid.onClick.subscribe(function (e, args) {
-            var item = controllerServiceTypesData.getItem(args.row);
-            if (item && item.children.length > 0) {
-                // update the grid
-                item.collapsed = !item.collapsed;
-                controllerServiceTypesData.updateItem(item.id, item);
-
-                // update any affected ancestors
-                var parent = item.parent;
-                while (parent !== null) {
-                    controllerServiceTypesData.updateItem(parent.id, parent);
-                    parent = parent.parent;
+                // set the controller service type description
+                if (nf.Common.isBlank(controllerServiceType.description)) {
+                    $('#controller-service-type-description').attr('title', '').html('<span class="unset">No description specified</span>');
+                } else {
+                    $('#controller-service-type-description').html(controllerServiceType.description).ellipsis();
                 }
 
-                // prevent selection within slickgrid
-                e.stopImmediatePropagation();
+                // populate the dom
+                $('#controller-service-type-name').text(controllerServiceType.label).ellipsis();
+                $('#selected-controller-service-name').text(controllerServiceType.label);
+                $('#selected-controller-service-type').text(controllerServiceType.type);
+
+                // show the selected controller service
+                $('#controller-service-description-container').show();
             }
         });
         controllerServiceTypesGrid.onDblClick.subscribe(function (e, args) {
@@ -587,7 +431,7 @@ nf.Settings = (function () {
             controllerServiceTypesGrid.render();
 
             // update the total number of displayed processors
-            $('#displayed-controller-service-types').text(getVisibleControllerServiceCount());
+            $('#displayed-controller-service-types').text(args.current);
         });
         controllerServiceTypesData.onRowsChanged.subscribe(function (e, args) {
             controllerServiceTypesGrid.invalidateRows(args.rows);
@@ -610,46 +454,28 @@ nf.Settings = (function () {
             // begin the update
             controllerServiceTypesData.beginUpdate();
 
-            var addType = function (parentItem, documentedType) {
-                var item = {
+            // go through each controller service type
+            $.each(response.controllerServiceTypes, function (i, documentedType) {
+                // add the documented type
+                controllerServiceTypesData.addItem({
                     id: id++,
                     label: nf.Common.substringAfterLast(documentedType.type, '.'),
                     type: documentedType.type,
                     description: nf.Common.escapeHtml(documentedType.description),
-                    tags: documentedType.tags.join(', '),
-                    parent: parentItem,
-                    children: [],
-                    collapsed: false,
-                    visible: true
-                };
-
-                // add the documented type
-                controllerServiceTypesData.addItem(item);
+                    tags: documentedType.tags.join(', ')
+                });
 
                 // count the frequency of each tag for this type
                 $.each(documentedType.tags, function (i, tag) {
                     tags.push(tag.toLowerCase());
                 });
-
-                // add each of its children
-                $.each(documentedType.childTypes, function (_, documentedChildType) {
-                    var childItem = addType(item, documentedChildType);
-                    item.children.push(childItem);
-                });
-
-                return item;
-            };
-
-            // go through each controller service type
-            $.each(response.controllerServiceTypes, function (i, documentedType) {
-                addType(null, documentedType);
             });
 
             // end the udpate
             controllerServiceTypesData.endUpdate();
             
             // set the total number of processors
-            $('#total-controller-service-types, #displayed-controller-service-types').text(getVisibleControllerServiceCount());
+            $('#total-controller-service-types, #displayed-controller-service-types').text(response.controllerServiceTypes.length);
 
             // create the tag cloud
             $('#controller-service-tag-cloud').tagcloud({
@@ -1098,9 +924,6 @@ nf.Settings = (function () {
             clearReportingTaskSelection();
         }
 
-        // update visibility flag
-        item.visible = matches;
-
         return matches;
     };
 
@@ -1147,6 +970,7 @@ nf.Settings = (function () {
             // select the new reporting task
             var row = reportingTaskData.getRowById(reportingTask.id);
             reportingTaskGrid.setSelectedRows([row]);
+            reportingTaskGrid.scrollRowIntoView(row);
         }).fail(nf.Common.handleAjaxError);
 
         // hide the dialog
@@ -1287,10 +1111,7 @@ nf.Settings = (function () {
                     label: nf.Common.substringAfterLast(documentedType.type, '.'),
                     type: documentedType.type,
                     description: nf.Common.escapeHtml(documentedType.description),
-                    tags: documentedType.tags.join(', '),
-                    children: [],
-                    collapsed: false,
-                    visible: true
+                    tags: documentedType.tags.join(', ')
                 });
 
                 // count the frequency of each tag for this type


[41/50] [abbrv] incubator-nifi git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop

Posted by jo...@apache.org.
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/8270791b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8270791b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8270791b

Branch: refs/heads/NIFI-271
Commit: 8270791b1dd857f32e9f0dd02aa02ddca035a857
Parents: b2a806a 8bcaca7
Author: Matt Gilman <ma...@gmail.com>
Authored: Sat Apr 11 20:47:38 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Sat Apr 11 20:47:38 2015 -0400

----------------------------------------------------------------------
 .../src/test/resources/hyperglycemia                      | 10 +++++-----
 .../src/test/resources/hypoglycemia                       | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------



[17/50] [abbrv] incubator-nifi git commit: NIFI-74, NIFI-345, NIFI-495: Fixed several site-to-site related bugs

Posted by jo...@apache.org.
NIFI-74, NIFI-345, NIFI-495: Fixed several site-to-site related bugs


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/b682b6fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/b682b6fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/b682b6fa

Branch: refs/heads/NIFI-271
Commit: b682b6fab543cabeb3a321d6e5cf22f7ce9968c1
Parents: e9cb3b3
Author: Mark Payne <ma...@hotmail.com>
Authored: Thu Apr 9 17:59:02 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Thu Apr 9 17:59:02 2015 -0400

----------------------------------------------------------------------
 .../client/socket/EndpointConnectionPool.java   | 43 ++++++++++++++++----
 .../nifi/remote/client/socket/SocketClient.java |  3 +-
 .../protocol/socket/SocketClientProtocol.java   |  8 +++-
 .../socket/SocketClientTransaction.java         | 25 ++++++++----
 .../nifi/remote/StandardRemoteGroupPort.java    |  1 +
 5 files changed, 61 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b682b6fa/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
index 1a6dfd5..1b5412c 100644
--- a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
+++ b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
@@ -88,6 +88,7 @@ import org.apache.nifi.web.api.dto.ControllerDTO;
 import org.apache.nifi.web.api.dto.PortDTO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.helpers.MessageFormatter;
 
 public class EndpointConnectionPool {
     public static final long PEER_REFRESH_PERIOD = 60000L;
@@ -202,6 +203,28 @@ public class EndpointConnectionPool {
     	}, 5, 5, TimeUnit.SECONDS);
     }
     
+    void warn(final String msg, final Object... args) {
+    	logger.warn(msg, args);
+    	if ( eventReporter != null ) {
+    		eventReporter.reportEvent(Severity.WARNING, "Site-to-Site", MessageFormatter.arrayFormat(msg, args).getMessage());
+    	}
+    }
+    
+    void warn(final String msg, final Throwable t) {
+    	logger.warn(msg, t);
+    	
+    	if ( eventReporter != null ) {
+    		eventReporter.reportEvent(Severity.WARNING, "Site-to-Site", msg + ": " + t.toString());
+    	}
+    }
+    
+    void error(final String msg, final Object... args) {
+    	logger.error(msg, args);
+    	if ( eventReporter != null ) {
+    		eventReporter.reportEvent(Severity.ERROR, "Site-to-Site", MessageFormatter.arrayFormat(msg, args).getMessage());
+    	}
+    }
+    
     private String getPortIdentifier(final TransferDirection transferDirection) throws IOException {
         if ( remoteDestination.getIdentifier() != null ) {
             return remoteDestination.getIdentifier();
@@ -271,6 +294,7 @@ public class EndpointConnectionPool {
                     logger.debug("{} No Connection available for Port {}; creating new Connection", this, portId);
                     protocol = new SocketClientProtocol();
                     protocol.setDestination(new IdEnrichedRemoteDestination(remoteDestination, portId));
+                    protocol.setEventReporter(eventReporter);
 
                     final long penalizationMillis = remoteDestination.getYieldPeriod(TimeUnit.MILLISECONDS);
                     try {
@@ -312,7 +336,9 @@ public class EndpointConnectionPool {
                         
                         // handle error cases
                         if ( protocol.isDestinationFull() ) {
-                            logger.warn("{} {} indicates that port's destination is full; penalizing peer", this, peer);
+                            logger.warn("{} {} indicates that port {}'s destination is full; penalizing peer", 
+                            		this, peer, config.getPortName() == null ? config.getPortIdentifier() : config.getPortName());
+                            
                             penalize(peer, penalizationMillis);
                             try {
                             	peer.close();
@@ -341,7 +367,7 @@ public class EndpointConnectionPool {
                         cleanup(protocol, peer);
                         
                         final String message = String.format("%s failed to communicate with %s due to %s", this, peer == null ? clusterUrl : peer, e.toString());
-                        logger.error(message);
+                        error(message);
                         if ( logger.isDebugEnabled() ) {
                             logger.error("", e);
                         }
@@ -463,7 +489,7 @@ public class EndpointConnectionPool {
                         peerList = createPeerStatusList(direction);
                     } catch (final Exception e) {
                         final String message = String.format("%s Failed to update list of peers due to %s", this, e.toString());
-                        logger.warn(message);
+                        warn(message);
                         if ( logger.isDebugEnabled() ) {
                             logger.warn("", e);
                         }
@@ -503,7 +529,7 @@ public class EndpointConnectionPool {
     }
     
     private boolean isPenalized(final PeerStatus peerStatus) {
-        final Long expirationEnd = peerTimeoutExpirations.get(peerStatus);
+        final Long expirationEnd = peerTimeoutExpirations.get(peerStatus.getPeerDescription());
         return (expirationEnd == null ? false : expirationEnd > System.currentTimeMillis() );
     }
     
@@ -587,7 +613,7 @@ public class EndpointConnectionPool {
             clientProtocol.shutdown(peer);
         } catch (final IOException e) {
             final String message = String.format("%s Failed to shutdown protocol when updating list of peers due to %s", this, e.toString());
-            logger.warn(message);
+            warn(message);
             if (logger.isDebugEnabled()) {
                 logger.warn("", e);
             }
@@ -597,7 +623,7 @@ public class EndpointConnectionPool {
             peer.close();
         } catch (final IOException e) {
             final String message = String.format("%s Failed to close resources when updating list of peers due to %s", this, e.toString());
-            logger.warn(message);
+            warn(message);
             if (logger.isDebugEnabled()) {
                 logger.warn("", e);
             }
@@ -622,7 +648,8 @@ public class EndpointConnectionPool {
             }
 
         } catch (final IOException e) {
-            logger.error("Failed to persist list of Peers due to {}; if restarted and peer's NCM is down, may be unable to transfer data until communications with NCM are restored", e.toString(), e);
+            error("Failed to persist list of Peers due to {}; if restarted and peer's NCM is down, may be unable to transfer data until communications with NCM are restored", e.toString());
+            logger.error("", e);
         }
     }
 
@@ -818,7 +845,7 @@ public class EndpointConnectionPool {
             peerStatusCache = new PeerStatusCache(statuses);
             logger.info("{} Successfully refreshed Peer Status; remote instance consists of {} peers", this, statuses.size());
         } catch (Exception e) {
-            logger.warn("{} Unable to refresh Remote Group's peers due to {}", this, e);
+            warn("{} Unable to refresh Remote Group's peers due to {}", this, e);
             if (logger.isDebugEnabled()) {
                 logger.warn("", e);
             }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b682b6fa/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/SocketClient.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/SocketClient.java b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/SocketClient.java
index ed54ccb..4aab3f7 100644
--- a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/SocketClient.java
+++ b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/SocketClient.java
@@ -84,6 +84,7 @@ public class SocketClient implements SiteToSiteClient {
 		    logger.debug("Unable to resolve port [{}] to an identifier", portName);
 		} else {
 		    logger.debug("Resolved port [{}] to identifier [{}]", portName, portId);
+		    this.portIdentifier = portId;
 		}
 		
 		return portId;
@@ -136,7 +137,7 @@ public class SocketClient implements SiteToSiteClient {
 				connectionState.getPeer(), connectionState.getCodec(), direction);
 		} catch (final Throwable t) {
 			pool.terminate(connectionState);
-			throw t;
+			throw new IOException("Unable to create Transaction to communicate with " + connectionState.getPeer(), t);
 		}
 		
 		// Wrap the transaction in a new one that will return the EndpointConnectionState back to the pool whenever

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b682b6fa/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/protocol/socket/SocketClientProtocol.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/protocol/socket/SocketClientProtocol.java b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/protocol/socket/SocketClientProtocol.java
index c3275ea..83c5305 100644
--- a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/protocol/socket/SocketClientProtocol.java
+++ b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/protocol/socket/SocketClientProtocol.java
@@ -27,6 +27,7 @@ import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.nifi.events.EventReporter;
 import org.apache.nifi.flowfile.FlowFile;
 import org.apache.nifi.flowfile.attributes.CoreAttributes;
 import org.apache.nifi.processor.ProcessContext;
@@ -75,6 +76,7 @@ public class SocketClientProtocol implements ClientProtocol {
     private int batchCount;
     private long batchSize;
     private long batchMillis;
+    private EventReporter eventReporter;
 
     private static final long BATCH_SEND_NANOS = TimeUnit.SECONDS.toNanos(5L); // send batches of up to 5 seconds
     
@@ -93,6 +95,10 @@ public class SocketClientProtocol implements ClientProtocol {
         this.batchMillis = millis;
     }
     
+    public void setEventReporter(final EventReporter eventReporter) {
+    	this.eventReporter = eventReporter;
+    }
+    
     public void setDestination(final RemoteDestination destination) {
         this.destination = destination;
         this.useCompression = destination.isUseCompression();
@@ -272,7 +278,7 @@ public class SocketClientProtocol implements ClientProtocol {
         }
         
         return new SocketClientTransaction(versionNegotiator.getVersion(), destination.getIdentifier(), peer, codec, 
-        		direction, useCompression, (int) destination.getYieldPeriod(TimeUnit.MILLISECONDS));
+        		direction, useCompression, (int) destination.getYieldPeriod(TimeUnit.MILLISECONDS), eventReporter);
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b682b6fa/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/protocol/socket/SocketClientTransaction.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/protocol/socket/SocketClientTransaction.java b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/protocol/socket/SocketClientTransaction.java
index a1ce07e..e69104f 100644
--- a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/protocol/socket/SocketClientTransaction.java
+++ b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/protocol/socket/SocketClientTransaction.java
@@ -27,6 +27,7 @@ import java.util.zip.CRC32;
 import java.util.zip.CheckedInputStream;
 import java.util.zip.CheckedOutputStream;
 
+import org.apache.nifi.events.EventReporter;
 import org.apache.nifi.remote.Communicant;
 import org.apache.nifi.remote.Peer;
 import org.apache.nifi.remote.Transaction;
@@ -39,6 +40,7 @@ import org.apache.nifi.remote.io.CompressionOutputStream;
 import org.apache.nifi.remote.protocol.DataPacket;
 import org.apache.nifi.remote.protocol.RequestType;
 import org.apache.nifi.remote.util.StandardDataPacket;
+import org.apache.nifi.reporting.Severity;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -56,6 +58,7 @@ public class SocketClientTransaction implements Transaction {
 	private final Peer peer;
 	private final int penaltyMillis;
 	private final String destinationId;
+	private final EventReporter eventReporter;
 	
 	private boolean dataAvailable = false;
 	private int transfers = 0;
@@ -63,7 +66,7 @@ public class SocketClientTransaction implements Transaction {
 	private TransactionState state;
 	
 	SocketClientTransaction(final int protocolVersion, final String destinationId, final Peer peer, final FlowFileCodec codec, 
-			final TransferDirection direction, final boolean useCompression, final int penaltyMillis) throws IOException {
+			final TransferDirection direction, final boolean useCompression, final int penaltyMillis, final EventReporter eventReporter) throws IOException {
 		this.protocolVersion = protocolVersion;
 		this.destinationId = destinationId;
 		this.peer = peer;
@@ -74,6 +77,7 @@ public class SocketClientTransaction implements Transaction {
 		this.compress = useCompression;
 		this.state = TransactionState.TRANSACTION_STARTED;
 		this.penaltyMillis = penaltyMillis;
+		this.eventReporter = eventReporter;
 		
 		initialize();
 	}
@@ -116,11 +120,11 @@ public class SocketClientTransaction implements Transaction {
 	    try {
 	        try {
         		if ( state != TransactionState.DATA_EXCHANGED && state != TransactionState.TRANSACTION_STARTED) {
-        			throw new IllegalStateException("Cannot receive data because Transaction State is " + state);
+        			throw new IllegalStateException("Cannot receive data from " + peer + " because Transaction State is " + state);
         		}
         		
             	if ( direction == TransferDirection.SEND ) {
-            	    throw new IllegalStateException("Attempting to receive data but started a SEND Transaction");
+            	    throw new IllegalStateException("Attempting to receive data from " + peer + " but started a SEND Transaction");
             	}
             	
             	// if we already know there's no data, just return null
@@ -142,7 +146,7 @@ public class SocketClientTransaction implements Transaction {
                             this.dataAvailable = false;
                             break;
                         default:
-                            throw new ProtocolException("Got unexpected response when asking for data: " + dataAvailableCode);
+                            throw new ProtocolException("Got unexpected response from " + peer + " when asking for data: " + dataAvailableCode);
                     }
                 }
             	
@@ -184,11 +188,11 @@ public class SocketClientTransaction implements Transaction {
 	    try {
 	        try {
         		if ( state != TransactionState.DATA_EXCHANGED && state != TransactionState.TRANSACTION_STARTED) {
-        			throw new IllegalStateException("Cannot send data because Transaction State is " + state);
+        			throw new IllegalStateException("Cannot send data to " + peer + " because Transaction State is " + state);
         		}
         
                 if ( direction == TransferDirection.RECEIVE ) {
-                    throw new IllegalStateException("Attempting to send data but started a RECEIVE Transaction");
+                    throw new IllegalStateException("Attempting to send data to " + peer + " but started a RECEIVE Transaction");
                 }
         
         		if ( transfers > 0 ) {
@@ -242,7 +246,7 @@ public class SocketClientTransaction implements Transaction {
 	    try {
 	        try {
         		if ( state != TransactionState.TRANSACTION_CONFIRMED ) {
-        			throw new IllegalStateException("Cannot complete transaction because state is " + state + 
+        			throw new IllegalStateException("Cannot complete transaction with " + peer + " because state is " + state + 
         					"; Transaction can only be completed when state is " + TransactionState.TRANSACTION_CONFIRMED);
         		}
         		
@@ -272,7 +276,7 @@ public class SocketClientTransaction implements Transaction {
                         peer.penalize(destinationId, penaltyMillis);
                         backoff = true;
                     } else if ( transactionResponse.getCode() != ResponseCode.TRANSACTION_FINISHED ) {
-                        throw new ProtocolException("After sending data, expected TRANSACTION_FINISHED response but got " + transactionResponse);
+                        throw new ProtocolException("After sending data to " + peer + ", expected TRANSACTION_FINISHED response but got " + transactionResponse);
                     }
                     
                     state = TransactionState.TRANSACTION_COMPLETED;
@@ -324,7 +328,10 @@ public class SocketClientTransaction implements Transaction {
                     try {
                         confirmTransactionResponse = Response.read(dis);
                     } catch (final IOException ioe) {
-                        logger.error("Failed to receive response code from {} when expected confirmation of transaction", peer);
+                        logger.error("Failed to receive response code from {} when expecting confirmation of transaction", peer);
+                        if ( eventReporter != null ) {
+                        	eventReporter.reportEvent(Severity.ERROR, "Site-to-Site", "Failed to receive response code from " + peer + " when expecting confirmation of transaction");
+                        }
                         throw ioe;
                     }
                     

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b682b6fa/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
index 69ba0fd..eec6ed5 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
@@ -183,6 +183,7 @@ public class StandardRemoteGroupPort extends RemoteGroupPort {
             remoteGroup.getEventReporter().reportEvent(Severity.ERROR, CATEGORY, message);
             return;
         } catch (final IOException e) {
+        	context.yield();
             final String message = String.format("%s failed to communicate with %s due to %s", this, url, e.toString());
             logger.error(message);
             if ( logger.isDebugEnabled() ) {


[06/50] [abbrv] incubator-nifi git commit: NIFI-475: - Adding support to create controller services inline when editing a components properties.

Posted by jo...@apache.org.
NIFI-475:
- Adding support to create controller services inline when editing a components properties.

NIFI-475:
- Adding support to create controller services inline when editing a components properties.

NIFI-475:
- Prompting the user to save changes before navigating to the controller service definition.

NIFI-475:
- Adding support to create controller services inline when editing a components properties.

NIFI-475:
- Adding support to create controller services inline when editing a components properties.

NIFI-475:
- Prompting the user to save changes before navigating to the controller service definition.

NIFI-475:
- Prompting the user to save changes before navigating to the controller service definition.

NIFI-475:
- Prompting the user to save changes before navigating to the controller service definition.

NIFI-475:
- Only providing the option to go to the service if the dialog is originating from the canvas (not for instance the summary page).

NIFI-475:
- Removing the children from the documented types. This prevents conveying the documented type hierarchies but that isn't necessary given the support for creating instances inline when editing properties.

NIFI-475:
- Removing the type hierarchies from the new controller service dialog.

NIFI-475:
- Including the controller service description in the inline controller service dialog.


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/2154b822
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/2154b822
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/2154b822

Branch: refs/heads/NIFI-271
Commit: 2154b822bf32b661c80bb41d96d569ee3491a41b
Parents: e456ea3
Author: Matt Gilman <ma...@gmail.com>
Authored: Mon Apr 6 16:29:07 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Wed Apr 8 12:25:48 2015 -0400

----------------------------------------------------------------------
 .../nifi/web/api/dto/DocumentedTypeDTO.java     |  14 -
 .../nifi/web/api/dto/PropertyDescriptorDTO.java |   9 +-
 .../org/apache/nifi/web/NiFiServiceFacade.java  |   3 +-
 .../nifi/web/StandardNiFiServiceFacade.java     |   4 +-
 .../apache/nifi/web/api/ControllerResource.java |   7 +-
 .../org/apache/nifi/web/api/dto/DtoFactory.java | 135 +--------
 .../nifi/web/controller/ControllerFacade.java   |  43 ++-
 .../org/apache/nifi/web/util/SnippetUtils.java  |   6 +-
 .../src/main/webapp/css/settings.css            |  15 -
 .../propertytable/jquery.propertytable.css      |  43 +++
 .../propertytable/jquery.propertytable.js       | 289 +++++++++++++++++--
 .../js/nf/canvas/nf-controller-service.js       | 186 ++++++------
 .../js/nf/canvas/nf-processor-configuration.js  | 136 +++++----
 .../webapp/js/nf/canvas/nf-reporting-task.js    | 135 +++++----
 .../src/main/webapp/js/nf/canvas/nf-settings.js | 227 ++-------------
 15 files changed, 657 insertions(+), 595 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/DocumentedTypeDTO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/DocumentedTypeDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/DocumentedTypeDTO.java
index 7cf1b84..6e4aeb9 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/DocumentedTypeDTO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/DocumentedTypeDTO.java
@@ -26,7 +26,6 @@ import javax.xml.bind.annotation.XmlType;
 public class DocumentedTypeDTO {
 
     private String type;
-    private Set<DocumentedTypeDTO> childTypes;
     private String description;
     private Set<String> tags;
 
@@ -69,17 +68,4 @@ public class DocumentedTypeDTO {
         this.tags = tags;
     }
 
-    /**
-     * Child types for this type.
-     * 
-     * @return 
-     */
-    public Set<DocumentedTypeDTO> getChildTypes() {
-        return childTypes;
-    }
-
-    public void setChildTypes(Set<DocumentedTypeDTO> childTypes) {
-        this.childTypes = childTypes;
-    }
-    
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/PropertyDescriptorDTO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/PropertyDescriptorDTO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/PropertyDescriptorDTO.java
index d10a324..ecde255 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/PropertyDescriptorDTO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/PropertyDescriptorDTO.java
@@ -34,7 +34,7 @@ public class PropertyDescriptorDTO {
     private boolean sensitive;
     private boolean dynamic;
     private boolean supportsEl;
-    private boolean identifiesControllerService;
+    private String identifiesControllerService;
 
     /**
      * The set of allowable values for this property. If empty then the
@@ -158,15 +158,16 @@ public class PropertyDescriptorDTO {
     }
 
     /**
-     * Whether this descriptor represents a controller service.
+     * If this property identifies a controller service, this returns the 
+     * fully qualified type, null otherwise.
      * 
      * @return 
      */
-    public boolean isIdentifiesControllerService() {
+    public String getIdentifiesControllerService() {
         return identifiesControllerService;
     }
 
-    public void setIdentifiesControllerService(boolean identifiesControllerService) {
+    public void setIdentifiesControllerService(String identifiesControllerService) {
         this.identifiesControllerService = identifiesControllerService;
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.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/NiFiServiceFacade.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java
index e3afbf9..8d9dade 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java
@@ -252,9 +252,10 @@ public interface NiFiServiceFacade {
     /**
      * Returns the list of controller service types.
      * 
+     * @param serviceType Filters only service types that implement this type
      * @return The list of available controller types
      */
-    Set<DocumentedTypeDTO> getControllerServiceTypes();
+    Set<DocumentedTypeDTO> getControllerServiceTypes(String serviceType);
     
     /**
      * Returns the list of reporting task types.

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.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/StandardNiFiServiceFacade.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
index 086c46b..88637b4 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
@@ -1718,8 +1718,8 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
     }
 
     @Override
-    public Set<DocumentedTypeDTO> getControllerServiceTypes() {
-        return controllerFacade.getControllerServiceTypes();
+    public Set<DocumentedTypeDTO> getControllerServiceTypes(final String serviceType) {
+        return controllerFacade.getControllerServiceTypes(serviceType);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.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/ControllerResource.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java
index 98f17d5..c0b4cd7 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java
@@ -737,6 +737,7 @@ public class ControllerResource extends ApplicationResource {
      * @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 serviceType Returns only services that implement this type
      * @return A controllerServicesTypesEntity.
      */
     @GET
@@ -744,7 +745,9 @@ public class ControllerResource extends ApplicationResource {
     @Path("/controller-service-types")
     @PreAuthorize("hasAnyRole('ROLE_MONITOR', 'ROLE_DFM', 'ROLE_ADMIN')")
     @TypeHint(ControllerServiceTypesEntity.class)
-    public Response getControllerServiceTypes(@QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) ClientIdParameter clientId) {
+    public Response getControllerServiceTypes(
+            @QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) ClientIdParameter clientId,
+            @QueryParam("serviceType") String serviceType) {
 
         // replicate if cluster manager
         if (properties.isClusterManager()) {
@@ -758,7 +761,7 @@ public class ControllerResource extends ApplicationResource {
         // create response entity
         final ControllerServiceTypesEntity entity = new ControllerServiceTypesEntity();
         entity.setRevision(revision);
-        entity.setControllerServiceTypes(serviceFacade.getControllerServiceTypes());
+        entity.setControllerServiceTypes(serviceFacade.getControllerServiceTypes(serviceType));
 
         // generate the response
         return clusterContext(generateOkResponse(entity)).build();

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.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/dto/DtoFactory.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
index 7fe76ad..4e83ac5 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
@@ -1384,135 +1384,6 @@ public final class DtoFactory {
     }
     
     /**
-     * Identifies all baseTypes for the specified type that are assignable to the specified baseType.
-     * 
-     * @param baseType
-     * @param type
-     * @param baseTypes 
-     */
-    private void identifyBaseTypes(final Class baseType, final Class type, final Set<Class> baseTypes, final  boolean recurse) {
-        final Class[] interfaces = type.getInterfaces();
-        for (final Class i : interfaces) {
-            if (baseType.isAssignableFrom(i) && !baseType.equals(i)) {
-                baseTypes.add(i);
-            }
-        }
-        
-        if (recurse) {
-            if (type.getSuperclass() != null) {
-                identifyBaseTypes(baseType, type.getSuperclass(), baseTypes, recurse);
-            }
-        }
-    }
-    
-    /**
-     * Gets the DocumentedTypeDTOs from the specified classes for the specified baseClass.
-     *
-     * @param baseClass
-     * @param classes
-     * @return
-     */
-    public Set<DocumentedTypeDTO> fromDocumentedTypes(final Class baseClass, final Set<Class> classes) {
-        final Set<DocumentedTypeDTO> types = new LinkedHashSet<>();
-        final Set<Class> sortedClasses = new TreeSet<>(CLASS_NAME_COMPARATOR);
-        sortedClasses.addAll(classes);
-        
-        // identify all interfaces that extend baseClass for all classes
-        final Set<Class> interfaces = new HashSet<>();
-        for (final Class<?> cls : sortedClasses) {
-            identifyBaseTypes(baseClass, cls, interfaces, true);
-        }
-        
-        // build a lookup of all interfaces
-        final Map<Class, DocumentedTypeDTO> lookup = new HashMap<>();
-        
-        // convert the interfaces to DTO form
-        for (final Class<?> i : interfaces) {
-            final DocumentedTypeDTO type = new DocumentedTypeDTO();
-            type.setType(i.getName());
-            type.setDescription(getCapabilityDescription(i));
-            type.setTags(getTags(i));
-            type.setChildTypes(new LinkedHashSet<DocumentedTypeDTO>());
-            lookup.put(i, type);
-        }
-        
-        // move the interfaces into the appropriate hierarchy
-        final Collection<Class> rootTypes = new ArrayList<>();
-        for (final Class<?> i : interfaces) {
-            rootTypes.add(i);
-            
-            // identify the base types
-            final Set<Class> baseTypes = new LinkedHashSet<>();
-            identifyBaseTypes(baseClass, i, baseTypes, false);
-            
-            // move this interfaces into the hierarchy where appropriate
-            if (!baseTypes.isEmpty()) {
-                // get the DTO for each base type
-                for (final Class baseType : baseTypes) {
-                    final DocumentedTypeDTO parentInteface = lookup.get(baseType);
-                    final DocumentedTypeDTO childInterface = lookup.get(i);
-                    
-                    // include all parent tags in the respective children
-                    childInterface.getTags().addAll(parentInteface.getTags());
-                    
-                    // update the hierarchy
-                    parentInteface.getChildTypes().add(childInterface);
-                }
-                
-                // remove this interface from the lookup (this will only
-                // leave the interfaces that are ancestor roots)
-                rootTypes.remove(i);
-            }
-        }
-
-        // include the interfaces
-        sortedClasses.addAll(rootTypes);
-        
-        // get the DTO form for all interfaces and classes
-        for (final Class<?> cls : sortedClasses) {
-            boolean add = false;
-            
-            final DocumentedTypeDTO type;
-            if (rootTypes.contains(cls)) {
-                type = lookup.get(cls);
-                add = true;
-            } else {
-                type = new DocumentedTypeDTO();
-                type.setType(cls.getName());
-                type.setDescription(getCapabilityDescription(cls));
-                type.setTags(getTags(cls));
-            }
-            
-            // identify the base types
-            final Set<Class> baseTypes = new LinkedHashSet<>();
-            identifyBaseTypes(baseClass, cls, baseTypes, false);
-            
-            // include this type if it doesn't belong to another hierarchy
-            if (baseTypes.isEmpty()) {
-                add = true;
-            } else {
-                // get the DTO for each base type
-                for (final Class baseType : baseTypes) {
-                    final DocumentedTypeDTO parentInterface = lookup.get(baseType);
-
-                    // include all parent tags in the respective children
-                    type.getTags().addAll(parentInterface.getTags());
-
-                    // update the hierarchy
-                    parentInterface.getChildTypes().add(type);
-                }
-            }
-            
-            // add if appropriate
-            if (add) {
-                types.add(type);
-            }
-        }
-
-        return types;
-    }
-
-    /**
      * Creates a ProcessorDTO from the specified ProcessorNode.
      *
      * @param node
@@ -1958,7 +1829,11 @@ public final class DtoFactory {
         dto.setDescription(propertyDescriptor.getDescription());
         dto.setDefaultValue(propertyDescriptor.getDefaultValue());
         dto.setSupportsEl(propertyDescriptor.isExpressionLanguageSupported());
-        dto.setIdentifiesControllerService(propertyDescriptor.getControllerServiceDefinition() != null);
+        
+        // set the identifies controller service is applicable
+        if (propertyDescriptor.getControllerServiceDefinition() != null) {
+            dto.setIdentifiesControllerService(propertyDescriptor.getControllerServiceDefinition().getName());
+        }
 
         final Class<? extends ControllerService> serviceDefinition = propertyDescriptor.getControllerServiceDefinition();
         if (propertyDescriptor.getAllowableValues() == null) {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.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/controller/ControllerFacade.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java
index a373f05..b5e6f7e 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java
@@ -108,6 +108,7 @@ import org.apache.nifi.web.api.dto.status.ProcessGroupStatusDTO;
 import org.apache.nifi.web.api.dto.status.StatusHistoryDTO;
 import org.apache.nifi.web.DownloadableContent;
 import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.ClassUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.nifi.admin.service.UserService;
 import org.apache.nifi.authorization.DownloadAuthorization;
@@ -348,12 +349,48 @@ public class ControllerFacade {
     }
     
     /**
+     * Returns whether the specified type implements the specified serviceType.
+     * 
+     * @param baseType
+     * @param type
+     * @return
+     */
+    private boolean implementsServiceType(final String serviceType, final Class type) {
+        final List<Class<?>> interfaces = ClassUtils.getAllInterfaces(type);
+        for (final Class i : interfaces) {
+            if (ControllerService.class.isAssignableFrom(i) && i.getName().equals(serviceType)) {
+                return true;
+            }
+        }
+        
+        return false;
+    }
+    
+    /**
      * Gets the ControllerService types that this controller supports.
      * 
+     * @param serviceType
      * @return 
      */
-    public Set<DocumentedTypeDTO> getControllerServiceTypes() {
-        return dtoFactory.fromDocumentedTypes(ControllerService.class, ExtensionManager.getExtensions(ControllerService.class));
+    public Set<DocumentedTypeDTO> getControllerServiceTypes(final String serviceType) { 
+        final Set<Class> serviceImplementations = ExtensionManager.getExtensions(ControllerService.class);
+        
+        // identify the controller services that implement the specified serviceType if applicable
+        final Set<Class> matchingServiceImplementions;
+        if (serviceType != null) {
+            matchingServiceImplementions = new HashSet<>();
+            
+            // check each type and remove those that aren't in the specified ancestry
+            for (final Class type : serviceImplementations) {
+                if (implementsServiceType(serviceType, type)) {
+                    matchingServiceImplementions.add(type);
+                }
+            }
+        } else {
+            matchingServiceImplementions = serviceImplementations;
+        }
+        
+        return dtoFactory.fromDocumentedTypes(matchingServiceImplementions);
     }
     
     /**
@@ -362,7 +399,7 @@ public class ControllerFacade {
      * @return 
      */
     public Set<DocumentedTypeDTO> getReportingTaskTypes() {
-        return dtoFactory.fromDocumentedTypes(ReportingTask.class, ExtensionManager.getExtensions(ReportingTask.class));
+        return dtoFactory.fromDocumentedTypes(ExtensionManager.getExtensions(ReportingTask.class));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.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/util/SnippetUtils.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
index fa9bc41..40e5730 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
@@ -222,7 +222,7 @@ public final class SnippetUtils {
                 }
                 
                 final PropertyDescriptorDTO propertyDescriptorDto = descriptors.get(propName);
-                if ( propertyDescriptorDto != null && propertyDescriptorDto.isIdentifiesControllerService() ) {
+                if ( propertyDescriptorDto != null && propertyDescriptorDto.getIdentifiesControllerService() != null ) {
                     final ControllerServiceNode serviceNode = flowController.getControllerServiceNode(propValue);
                     if ( serviceNode != null ) {
                         addControllerServicesToSnippet(snippet, serviceNode);
@@ -363,7 +363,7 @@ public final class SnippetUtils {
                 final Map<String, PropertyDescriptorDTO> descriptors = serviceDTO.getDescriptors();
                 if ( properties != null && descriptors != null ) {
                     for ( final PropertyDescriptorDTO descriptor : descriptors.values() ) {
-                        if ( descriptor.isIdentifiesControllerService() ) {
+                        if ( descriptor.getIdentifiesControllerService() != null ) {
                             final String currentServiceId = properties.get(descriptor.getName());
                             if ( currentServiceId == null ) {
                                 continue;
@@ -558,7 +558,7 @@ public final class SnippetUtils {
         final Map<String, PropertyDescriptorDTO> descriptors = configDto.getDescriptors();
         if ( properties != null && descriptors != null ) {
             for ( final PropertyDescriptorDTO descriptor : descriptors.values() ) {
-                if ( descriptor.isIdentifiesControllerService() ) {
+                if ( descriptor.getIdentifiesControllerService() != null ) {
                     final String currentServiceId = properties.get(descriptor.getName());
                     if ( currentServiceId == null ) {
                         continue;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/settings.css
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/settings.css b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/settings.css
index 91805e1..ae93bcc 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/settings.css
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/settings.css
@@ -43,21 +43,6 @@
     cursor: pointer;
 }
 
-span.expansion-button {
-    width: 10px;
-    height: 10px;
-    float: left;
-}
-
-span.ancestor-type {
-    font-weight: bold;
-}
-
-span.ancestor-type-rollup {
-    margin-left: 3px;
-    color: #aaa;
-}
-
 /* settings tabs */
 
 #settings-tabs-container {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css
index 74b6f4c..d1f22b2 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css
@@ -104,6 +104,49 @@ div.new-property-button-container {
 }
 
 /*
+    New inline controller service dialog
+*/
+
+div.new-inline-controller-service-dialog {
+    z-index: 1301;
+    display: none;
+    padding: 10px;
+    border: 3px solid #365C6A;
+    box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.9);
+    cursor: move;
+    width: 350px;
+    height: 250px;
+}
+
+div.new-inline-controller-service-combo {
+    height: 18px;
+    width: 340px;
+    margin-bottom: 10px;
+}
+
+div.new-inline-controller-service-tags {
+    height: 18px;
+    width: 340px;
+    margin-bottom: 10px;
+    overflow: hidden;
+    white-space: nowrap;
+}
+
+div.new-inline-controller-service-description {
+    height: 115px;
+    width: 340px;
+    overflow: auto;
+}
+
+div.new-inline-controller-service-button-container {
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    padding: 0 8px 10px;
+}
+
+/*
     Styles for the property editor.
 */
 

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
index bbafc60..c0b8884 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
@@ -23,7 +23,17 @@
  *
  * {
  *   readOnly: true,
- *   newPropertyDialogContainer: 'body'
+ *   dialogContainer: 'body',
+ *   descriptorDeferred: function () {
+ *      return $.Deferred(function (deferred) {
+ *          deferred.resolve();
+ *      }).promise;
+ *   },
+ *   goToServiceDeferred: function () {
+ *      return $.Deferred(function (deferred) {
+ *          deferred.resolve();
+ *      }).promise;
+ *   }
  * }
  */
 
@@ -443,6 +453,10 @@
             var gridContainer = $(args.grid.getContainerNode());
             var descriptors = gridContainer.data('descriptors');
             propertyDescriptor = descriptors[args.item.property];
+            
+            // get the options
+            var propertyContainer = gridContainer.closest('.property-container');
+            var configurationOptions = propertyContainer.data('options');
 
             // create the wrapper
             wrapper = $('<div></div>').css({
@@ -490,6 +504,15 @@
                     disabled: true
                 });
             }
+            
+            // if this descriptor identifies a controller service, provide a way to create one
+            if (nf.Common.isDefinedAndNotNull(propertyDescriptor.identifiesControllerService)) {
+                options.push({
+                    text: 'Create new service...',
+                    value: undefined,
+                    optionClass: 'unset'
+                });
+            }
 
             // determine the max height
             var position = args.position;
@@ -499,7 +522,16 @@
             // build the combo field
             combo = $('<div class="value-combo combo"></div>').combo({
                 options: options,
-                maxHeight: maxHeight
+                maxHeight: maxHeight,
+                select: function (option) {
+                    if (typeof option.value === 'undefined') {
+                        // cancel the current edit
+                        scope.cancel();
+                        
+                        // prompt for the new service type
+                        promptForNewControllerService(gridContainer, args.grid, args.item, propertyDescriptor.identifiesControllerService, configurationOptions);
+                    }
+                }
             }).width(position.width - 16).appendTo(wrapper);
 
             // add buttons for handling user input
@@ -744,6 +776,154 @@
             }
         }
     };
+    
+    /**
+     * Gets the available controller services that implement the specified type and
+     * prompts the user to create one.
+     * 
+     * @param {jQuery} gridContainer The grid container
+     * @param {slickgrid} grid The grid
+     * @param {object} item The item
+     * @param {type} serviceType The type of service to create
+     * @param {object} configurationOptions The configuration options
+     */
+    var promptForNewControllerService = function (gridContainer, grid, item, serviceType, configurationOptions) {
+        $.ajax({
+            type: 'GET',
+            url: '../nifi-api/controller/controller-service-types',
+            data: {
+                serviceType: serviceType
+            },
+            dataType: 'json'
+        }).done(function (response) {
+            var options = [];
+            $.each(response.controllerServiceTypes, function (i, controllerServiceType) {
+                options.push({
+                    text: nf.Common.substringAfterLast(controllerServiceType.type, '.'),
+                    value: controllerServiceType.type,
+                    description: nf.Common.escapeHtml(controllerServiceType.description)
+                });
+            });
+            
+            // ensure there are some applicable controller services
+            if (options.length === 0) {
+                nf.Dialog.showOkDialog({
+                    dialogContent: 'No controller service types found that are applicable for this property.',
+                    overlayBackground: false
+                });
+            } else {
+                var newControllerServiceDialogMarkup = 
+                        '<div class="new-inline-controller-service-dialog dialog cancellable">' +
+                            '<div>' +
+                                '<div class="setting-name">Controller Service</div>' +
+                                '<div class="setting-field">' +
+                                    '<div class="new-inline-controller-service-combo"></div>' +
+                                '</div>' +
+                            '</div>' +
+                            '<div>' +
+                                '<div class="setting-name">Tags</div>' +
+                                '<div class="setting-field">' +
+                                    '<div class="new-inline-controller-service-tags"></div>' +
+                                '</div>' +
+                            '</div>' +
+                            '<div>' +
+                                '<div class="setting-name">Description</div>' +
+                                '<div class="setting-field">' +
+                                    '<div class="new-inline-controller-service-description"></div>' +
+                                '</div>' +
+                            '</div>' +
+                            '<div class="new-inline-controller-service-button-container">' +
+                                '<div class="new-inline-controller-service-create button button-normal">Create</div>' +
+                                '<div class="new-inline-controller-service-cancel button button-normal">Cancel</div>' +
+                                '<div class="clear"></div>' +
+                            '</div>' +
+                        '</div>';
+
+                var newControllerServiceDialog = $(newControllerServiceDialogMarkup).appendTo(configurationOptions.dialogContainer);
+                var newControllerServiceCombo = newControllerServiceDialog.find('div.new-inline-controller-service-combo');
+                var newControllerServiceTags = newControllerServiceDialog.find('div.new-inline-controller-service-tags');
+                var newControllerServiceDescription = newControllerServiceDialog.find('div.new-inline-controller-service-description');
+                
+                // build the combo field
+                newControllerServiceCombo.combo({
+                    options: options,
+                    select: function (option) {
+                        var service;
+                        $.each(response.controllerServiceTypes, function (i, controllerServiceType) {
+                            if (controllerServiceType.type === option.value) {
+                                service = controllerServiceType;
+                                return false;
+                            }
+                        });
+                        
+                        // set the service details
+                        newControllerServiceTags.text(service.tags.join(', ')).ellipsis();
+                        newControllerServiceDescription.text(service.description);
+                    }
+                });
+                
+                var create = function () {
+                    var newControllerServiceType = newControllerServiceCombo.combo('getSelectedOption').value;
+
+                    // create service of the specified type
+                    var revision = nf.Client.getRevision();
+
+                    // add the new controller service
+                    $.ajax({
+                        type: 'POST',
+                        url: '../nifi-api/controller/controller-services/node',
+                        data: {
+                            version: revision.version,
+                            clientId: revision.clientId,
+                            type: newControllerServiceType
+                        },
+                        dataType: 'json'
+                    }).done(function (response) {
+                        // update the revision
+                        nf.Client.setRevision(response.revision);
+
+                        $.Deferred(function (deferred) {
+                            // load the property descriptor if possible
+                            if (typeof configurationOptions.descriptorDeferred === 'function') {
+                                configurationOptions.descriptorDeferred(item.property).done(function(response) {
+                                    var descriptor = response.propertyDescriptor;
+
+                                    // store the descriptor for use later
+                                    var descriptors = gridContainer.data('descriptors');
+                                    if (!nf.Common.isUndefined(descriptors)) {
+                                        descriptors[descriptor.name] = descriptor;
+                                    }
+
+                                    deferred.resolve();
+                                });
+                            } else {
+                                deferred.resolve();
+                            }
+                        }).done(function() {
+                            // add a row for the new property
+                            var data = grid.getData();
+                            data.updateItem(item.id, $.extend(item, {
+                                value: response.controllerService.id
+                            }));
+
+                            // close the dialog
+                            newControllerServiceDialog.hide();
+                        });
+                    }).fail(nf.Common.handleAjaxError);
+                };
+
+                var cancel = function () {
+                    newControllerServiceDialog.hide();
+                };
+
+                // make the new property dialog draggable
+                newControllerServiceDialog.draggable({
+                    cancel: 'input, textarea, pre, .button, .' + editorClass,
+                    containment: 'body'
+                }).on('click', 'div.new-inline-controller-service-create', create).on('click', 'div.new-inline-controller-service-cancel', cancel).modal('show');
+            }
+        }).fail(nf.Common.handleAjaxError);
+    };
 
     var initPropertiesTable = function (table, options) {
         // function for formatting the property name
@@ -826,20 +1006,37 @@
             {id: 'value', field: 'value', name: 'Value', sortable: false, resizable: true, cssClass: 'pointer', rerenderOnResize: true, formatter: valueFormatter}
         ];
 
-        if (options.readOnly !== true) {
-            // custom formatter for the actions column
-            var actionFormatter = function (row, cell, value, columnDef, dataContext) {
-                var markup = '';
+        // custom formatter for the actions column
+        var actionFormatter = function (row, cell, value, columnDef, dataContext) {
+            var markup = '';
 
-                // allow user defined properties to be removed
-                if (dataContext.type === 'userDefined') {
-                    markup = '<img src="images/iconDelete.png" title="Delete" class="delete-property pointer" style="margin-top: 2px" />';
-                }
+            // get the property descriptor
+            var descriptors = table.data('descriptors');
+            var propertyDescriptor = descriptors[dataContext.property];
+            
+            var identifiesControllerService = nf.Common.isDefinedAndNotNull(propertyDescriptor.identifiesControllerService);
+            var isConfigured = nf.Common.isDefinedAndNotNull(dataContext.value);
+            var isOnCanvas = nf.Common.isDefinedAndNotNull(nf.Canvas);
+            
+            // check to see if we should provide a button for going to a controller service
+            if (identifiesControllerService && isConfigured && isOnCanvas) {
+                // ensure the configured value is referencing a valid service
+                $.each(propertyDescriptor.allowableValues, function (_, allowableValue) {
+                    if (allowableValue.value === dataContext.value) {
+                        markup = '<img src="images/iconGoTo.png" title="Go To" class="go-to-service pointer" style="margin-top: 2px" />';
+                        return false;
+                    }
+                });
+            }
 
-                return markup;
-            };
-            propertyColumns.push({id: "actions", name: "&nbsp;", minWidth: 20, width: 20, formatter: actionFormatter});
-        }
+            // allow user defined properties to be removed
+            if (options.readOnly !== true && dataContext.type === 'userDefined') {
+                markup = '<img src="images/iconDelete.png" title="Delete" class="delete-property pointer" style="margin-top: 2px" />';
+            }
+
+            return markup;
+        };
+        propertyColumns.push({id: "actions", name: "&nbsp;", minWidth: 20, width: 20, formatter: actionFormatter});
 
         var propertyConfigurationOptions = {
             forceFitColumns: true,
@@ -899,6 +1096,39 @@
                 }
             }
         };
+        
+        var goToControllerService = function (property) {
+            // close the dialog
+            var dialog = table.closest('.dialog');
+            if (dialog.hasClass('modal')) {
+                dialog.modal('hide');
+            } else {
+                dialog.hide();
+            }
+
+            $.Deferred(function (deferred) {
+                if ($('#settings').is(':visible')) {
+                    deferred.resolve();
+                } else {
+                    // reload the settings and show
+                    nf.Settings.loadSettings().done(function () {
+                        nf.Settings.showSettings();
+                        deferred.resolve();
+                    });
+                }
+            }).done(function () {
+                var controllerServiceGrid = $('#controller-services-table').data('gridInstance');
+                var controllerServiceData = controllerServiceGrid.getData();
+
+                // select the desired service
+                var row = controllerServiceData.getRowById(property.value);
+                controllerServiceGrid.setSelectedRows([row]);
+                controllerServiceGrid.scrollRowIntoView(row);
+
+                // select the controller services tab
+                $('#settings-tabs').find('li:eq(1)').click();
+            });
+        };
 
         // initialize the grid
         var propertyGrid = new Slick.Grid(table, propertyData, propertyColumns, propertyConfigurationOptions);
@@ -916,10 +1146,11 @@
                 // prevents standard edit logic
                 e.stopImmediatePropagation();
             } else if (propertyGrid.getColumns()[args.cell].id === 'actions') {
+                var property = propertyData.getItem(args.row);
+                
                 var target = $(e.target);
                 if (target.hasClass('delete-property')) {
                     // mark the property in question for removal
-                    var property = propertyData.getItem(args.row);
                     property.hidden = true;
 
                     // refresh the table
@@ -927,6 +1158,17 @@
 
                     // prevents standard edit logic
                     e.stopImmediatePropagation();
+                } else if (target.hasClass('go-to-service')) {
+                    if (options.readOnly === true) {
+                        goToControllerService(property);
+                    } else {
+                        // load the property descriptor if possible
+                        if (typeof options.goToServiceDeferred === 'function') {
+                            options.goToServiceDeferred().done(function() {
+                                goToControllerService(property);
+                            });
+                        }
+                    }
                 }
             }
         });
@@ -1076,8 +1318,8 @@
             nf.Common.removeAllPropertyDetailDialogs();
         } else {
             // clear any existing new property dialogs
-            if (nf.Common.isDefinedAndNotNull(options.newPropertyDialogContainer)) {
-                $(options.newPropertyDialogContainer).children('div.new-property-dialog').hide();
+            if (nf.Common.isDefinedAndNotNull(options.dialogContainer)) {
+                $(options.dialogContainer).children('div.new-property-dialog').hide();
             }
         }
 
@@ -1108,7 +1350,7 @@
                     var propertyTableContainer = $(this);
 
                     // clear any current contents, remote events, and store options
-                    propertyTableContainer.empty().unbind().data('options', options);
+                    propertyTableContainer.empty().unbind().addClass('property-container').data('options', options);
 
                     // build the component
                     var header = $('<div class="properties-header"></div>').appendTo(propertyTableContainer);
@@ -1118,7 +1360,7 @@
                     var table = $('<div class="property-table"></div>').appendTo(propertyTableContainer);
 
                     // optionally add a add new property button
-                    if (options.readOnly !== true && nf.Common.isDefinedAndNotNull(options.newPropertyDialogContainer)) {
+                    if (options.readOnly !== true && nf.Common.isDefinedAndNotNull(options.dialogContainer)) {
                         // build the new property dialog
                         var newPropertyDialogMarkup = 
                                 '<div class="new-property-dialog dialog cancellable">' +
@@ -1135,7 +1377,7 @@
                                     '</div>' +
                                 '</div>';
 
-                        var newPropertyDialog = $(newPropertyDialogMarkup).appendTo(options.newPropertyDialogContainer);
+                        var newPropertyDialog = $(newPropertyDialogMarkup).appendTo(options.dialogContainer);
                         var newPropertyNameField = newPropertyDialog.find('input.new-property-name');
 
                         var add = function () {
@@ -1295,8 +1537,9 @@
                 clear(propertyTableContainer);
                 
                 // clear any existing new property dialogs
-                if (nf.Common.isDefinedAndNotNull(options.newPropertyDialogContainer)) {
-                    $(options.newPropertyDialogContainer).children('div.new-property-dialog').remove();
+                if (nf.Common.isDefinedAndNotNull(options.dialogContainer)) {
+                    $(options.dialogContainer).children('div.new-property-dialog').remove();
+                    $(options.dialogContainer).children('div.new-inline-controller-service-dialog').remove();
                 }
             });
         },
@@ -1372,4 +1615,4 @@
             return methods.init.apply(this, arguments);
         }
     };
-})(jQuery);
\ No newline at end of file
+})(jQuery);

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
index 26b7253..39bbe64 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
@@ -374,6 +374,7 @@ nf.ControllerService = (function () {
                     // select the selected row
                     var row = controllerServiceData.getRowById(referencingComponent.id);
                     controllerServiceGrid.setSelectedRows([row]);
+                    controllerServiceGrid.scrollRowIntoView(row);
                     
                     // close the dialog and shell
                     referenceContainer.closest('.dialog').modal('hide');
@@ -419,6 +420,7 @@ nf.ControllerService = (function () {
                     // select the selected row
                     var row = reportingTaskData.getRowById(referencingComponent.id);
                     reportingTaskGrid.setSelectedRows([row]);
+                    reportingTaskGrid.scrollRowIntoView(row);
                     
                     // select the reporting task tab
                     $('#settings-tabs').find('li:last').click();
@@ -1070,6 +1072,83 @@ nf.ControllerService = (function () {
     };
     
     /**
+     * Goes to a service configuration from the property table.
+     */
+    var goToServiceFromProperty = function () {
+        return $.Deferred(function (deferred) {
+            // close all fields currently being edited
+            $('#controller-service-properties').propertytable('saveRow');
+
+            // determine if changes have been made
+            if (isSaveRequired()) {
+                // see if those changes should be saved
+                nf.Dialog.showYesNoDialog({
+                    dialogContent: 'Save changes before going to this Controller Service?',
+                    overlayBackground: false,
+                    noHandler: function () {
+                        deferred.resolve();
+                    },
+                    yesHandler: function () {
+                        var controllerService = $('#controller-service-configuration').data('controllerServiceDetails');
+                        saveControllerService(controllerService).done(function () {
+                            deferred.resolve();
+                        }).fail(function () {
+                            deferred.reject();
+                        });
+                    }
+                });
+            } else {
+                deferred.resolve();
+            }
+        }).promise();
+    };
+    
+    var saveControllerService = function (controllerService) {
+        // marshal the settings and properties and update the controller service
+        var updatedControllerService = marshalDetails();
+
+        // ensure details are valid as far as we can tell
+        if (validateDetails(updatedControllerService)) {
+            var previouslyReferencedServiceIds = [];
+            $.each(identifyReferencedServiceDescriptors(controllerService), function (_, descriptor) {
+                var modifyingService = !nf.Common.isUndefined(updatedControllerService.controllerService.properties) && !nf.Common.isUndefined(updatedControllerService.controllerService.properties[descriptor.name]);
+                var isCurrentlyConfigured = nf.Common.isDefinedAndNotNull(controllerService.properties[descriptor.name]);
+
+                // if we are attempting to update a controller service reference
+                if (modifyingService && isCurrentlyConfigured) {
+
+                    // record the current value if set
+                    previouslyReferencedServiceIds.push(controllerService.properties[descriptor.name]);
+                }
+            });
+
+            // update the selected component
+            return $.ajax({
+                type: 'PUT',
+                data: JSON.stringify(updatedControllerService),
+                url: controllerService.uri,
+                dataType: 'json',
+                processData: false,
+                contentType: 'application/json'
+            }).done(function (response) {
+                if (nf.Common.isDefinedAndNotNull(response.controllerService)) {
+                    // update the revision
+                    nf.Client.setRevision(response.revision);
+
+                    // reload all previously referenced controller services
+                    $.each(previouslyReferencedServiceIds, function(_, oldServiceReferenceId) {
+                        reloadControllerService(oldServiceReferenceId);
+                    });
+                }
+            }).fail(handleControllerServiceConfigurationError);
+        } else {
+            return $.Deferred(function (deferred) {
+                deferred.reject();
+            }).promise();
+        }
+    };
+    
+    /**
      * Identifies the descriptors that identify controller services.
      * 
      * @param {object} component
@@ -1078,7 +1157,7 @@ nf.ControllerService = (function () {
         var referencedServiceDescriptors = [];
         
         $.each(component.descriptors, function(_, descriptor) {
-            if (descriptor.identifiesControllerService === true) {
+            if (nf.Common.isDefinedAndNotNull(descriptor.identifiesControllerService)) {
                 referencedServiceDescriptors.push(descriptor);
             }
         });
@@ -1180,8 +1259,9 @@ nf.ControllerService = (function () {
             // initialize the property table
             $('#controller-service-properties').propertytable({
                 readOnly: false,
-                newPropertyDialogContainer: '#new-controller-service-property-container',
-                descriptorDeferred: getControllerServicePropertyDescriptor
+                dialogContainer: '#new-controller-service-property-container',
+                descriptorDeferred: getControllerServicePropertyDescriptor,
+                goToServiceDeferred: goToServiceFromProperty
             });
             
             // initialize the disable service dialog
@@ -1324,8 +1404,9 @@ nf.ControllerService = (function () {
                 // initialize the property table
                 $('#controller-service-properties').propertytable('destroy').propertytable({
                     readOnly: false,
-                    newPropertyDialogContainer: '#new-controller-service-property-container',
-                    descriptorDeferred: getControllerServicePropertyDescriptor
+                    dialogContainer: '#new-controller-service-property-container',
+                    descriptorDeferred: getControllerServicePropertyDescriptor,
+                    goToServiceDeferred: goToServiceFromProperty
                 });
                 
                 // update the mode
@@ -1392,49 +1473,15 @@ nf.ControllerService = (function () {
                                 // close all fields currently being edited
                                 $('#controller-service-properties').propertytable('saveRow');
 
-                                // marshal the settings and properties and update the controller service
-                                var updatedControllerService = marshalDetails();
-
-                                // ensure details are valid as far as we can tell
-                                if (validateDetails(updatedControllerService)) {
-                                    var previouslyReferencedServiceIds = [];
-                                    $.each(identifyReferencedServiceDescriptors(controllerService), function (_, descriptor) {
-                                        var modifyingService = !nf.Common.isUndefined(updatedControllerService.controllerService.properties) && !nf.Common.isUndefined(updatedControllerService.controllerService.properties[descriptor.name]);
-                                        var isCurrentlyConfigured = nf.Common.isDefinedAndNotNull(controllerService.properties[descriptor.name]);
-                                        
-                                        // if we are attempting to update a controller service reference
-                                        if (modifyingService && isCurrentlyConfigured) {
-                                            // record the current value if set
-                                            previouslyReferencedServiceIds.push(controllerService.properties[descriptor.name]);
-                                        }
-                                    });
+                                // save the controller service
+                                saveControllerService(controllerService).done(function (response) {
+                                    // reload the controller service
+                                    renderControllerService(response.controllerService);
+                                    reloadControllerServiceReferences(response.controllerService);
                                     
-                                    // update the selected component
-                                    $.ajax({
-                                        type: 'PUT',
-                                        data: JSON.stringify(updatedControllerService),
-                                        url: controllerService.uri,
-                                        dataType: 'json',
-                                        processData: false,
-                                        contentType: 'application/json'
-                                    }).done(function (response) {
-                                        if (nf.Common.isDefinedAndNotNull(response.controllerService)) {
-                                            nf.Client.setRevision(response.revision);
-
-                                            // reload the controller service
-                                            renderControllerService(response.controllerService);
-                                            reloadControllerServiceReferences(response.controllerService);
-                                            
-                                            // reload all previously referenced controller services
-                                            $.each(previouslyReferencedServiceIds, function(_, oldServiceReferenceId) {
-                                                reloadControllerService(oldServiceReferenceId);
-                                            });
-
-                                            // close the details panel
-                                            controllerServiceDialog.modal('hide');
-                                        }
-                                    }).fail(handleControllerServiceConfigurationError);
-                                }
+                                    // close the details panel
+                                    controllerServiceDialog.modal('hide');
+                                });
                             }
                         }
                     }, {
@@ -1480,47 +1527,10 @@ nf.ControllerService = (function () {
                                         overlayBackground: false,
                                         noHandler: openCustomUi,
                                         yesHandler: function () {
-                                            // marshal the settings and properties and update the controller service
-                                            var updatedControllerService = marshalDetails();
-
-                                            // ensure details are valid as far as we can tell
-                                            if (validateDetails(updatedControllerService)) {
-                                                var previouslyReferencedServiceIds = [];
-                                                $.each(identifyReferencedServiceDescriptors(controllerService), function (_, descriptor) {
-                                                    var modifyingService = !nf.Common.isUndefined(updatedControllerService.controllerService.properties) && !nf.Common.isUndefined(updatedControllerService.controllerService.properties[descriptor.name]);
-                                                    var isCurrentlyConfigured = nf.Common.isDefinedAndNotNull(controllerService.properties[descriptor.name]);
-
-                                                    // if we are attempting to update a controller service reference
-                                                    if (modifyingService && isCurrentlyConfigured) {
-                                                        
-                                                        // record the current value if set
-                                                        previouslyReferencedServiceIds.push(controllerService.properties[descriptor.name]);
-                                                    }
-                                                });
-
-                                                // update the selected component
-                                                $.ajax({
-                                                    type: 'PUT',
-                                                    data: JSON.stringify(updatedControllerService),
-                                                    url: controllerService.uri,
-                                                    dataType: 'json',
-                                                    processData: false,
-                                                    contentType: 'application/json'
-                                                }).done(function (response) {
-                                                    if (nf.Common.isDefinedAndNotNull(response.controllerService)) {
-                                                        // update the revision
-                                                        nf.Client.setRevision(response.revision);
-
-                                                        // reload all previously referenced controller services
-                                                        $.each(previouslyReferencedServiceIds, function(_, oldServiceReferenceId) {
-                                                            reloadControllerService(oldServiceReferenceId);
-                                                        });
-
-                                                        // open the custom ui
-                                                        openCustomUi();
-                                                    }
-                                                }).fail(handleControllerServiceConfigurationError);
-                                            }
+                                            saveControllerService(controllerService).done(function () {
+                                                // open the custom ui
+                                                openCustomUi();
+                                            });
                                         }
                                     });
                                 } else {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
index 4e828df..2e48579 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
@@ -380,6 +380,70 @@ nf.ProcessorConfiguration = (function () {
             }
         });
     };
+    
+    /**
+     * Goes to a service configuration from the property table.
+     */
+    var goToServiceFromProperty = function () {
+        return $.Deferred(function (deferred) {
+            // close all fields currently being edited
+            $('#processor-properties').propertytable('saveRow');
+
+            // determine if changes have been made
+            if (isSaveRequired()) {
+                // see if those changes should be saved
+                nf.Dialog.showYesNoDialog({
+                    dialogContent: 'Save changes before going to this Controller Service?',
+                    overlayBackground: false,
+                    noHandler: function () {
+                        deferred.resolve();
+                    },
+                    yesHandler: function () {
+                        var processor = $('#processor-configuration').data('processorDetails');
+                        saveProcessor(processor).done(function () {
+                            deferred.resolve();
+                        }).fail(function () {
+                            deferred.reject();
+                        });
+                    }
+                });
+            } else {
+                deferred.resolve();
+            }
+        }).promise();
+    };
+    
+    /**
+     * 
+     * @param {type} processor
+     * @returns {undefined}
+     */
+    var saveProcessor = function (processor) {
+        // marshal the settings and properties and update the processor
+        var updatedProcessor = marshalDetails();
+
+        // ensure details are valid as far as we can tell
+        if (validateDetails(updatedProcessor)) {
+            // update the selected component
+            return $.ajax({
+                type: 'PUT',
+                data: JSON.stringify(updatedProcessor),
+                url: processor.uri,
+                dataType: 'json',
+                processData: false,
+                contentType: 'application/json'
+            }).done(function (response) {
+                if (nf.Common.isDefinedAndNotNull(response.processor)) {
+                    // update the revision
+                    nf.Client.setRevision(response.revision);
+                }
+            }).fail(handleProcessorConfigurationError);
+        } else {
+            return $.Deferred(function (deferred) {
+                deferred.reject();
+            }).promise();
+        }
+    };
 
     return {
         /**
@@ -470,7 +534,7 @@ nf.ProcessorConfiguration = (function () {
             // initialize the property table
             $('#processor-properties').propertytable({
                 readOnly: false,
-                newPropertyDialogContainer: '#new-processor-property-container',
+                dialogContainer: '#new-processor-property-container',
                 descriptorDeferred: function(propertyName) {
                     var processor = $('#processor-configuration').data('processorDetails');
                     return $.ajax({
@@ -481,7 +545,8 @@ nf.ProcessorConfiguration = (function () {
                         },
                         dataType: 'json'
                     }).fail(nf.Common.handleAjaxError);
-                }
+                },
+                goToServiceDeferred: goToServiceFromProperty
             });
         },
         
@@ -625,35 +690,17 @@ nf.ProcessorConfiguration = (function () {
                                     // close all fields currently being edited
                                     $('#processor-properties').propertytable('saveRow');
 
-                                    // marshal the settings and properties and update the processor
-                                    var updatedProcessor = marshalDetails();
-
-                                    // ensure details are valid as far as we can tell
-                                    if (validateDetails(updatedProcessor)) {
-                                        // update the selected component
-                                        $.ajax({
-                                            type: 'PUT',
-                                            data: JSON.stringify(updatedProcessor),
-                                            url: processor.uri,
-                                            dataType: 'json',
-                                            processData: false,
-                                            contentType: 'application/json'
-                                        }).done(function (response) {
-                                            if (nf.Common.isDefinedAndNotNull(response.processor)) {
-                                                // update the revision
-                                                nf.Client.setRevision(response.revision);
-
-                                                // set the new processor state based on the response
-                                                nf.Processor.set(response.processor);
-
-                                                // reload the processor's outgoing connections
-                                                reloadProcessorConnections(processor);
-
-                                                // close the details panel
-                                                $('#processor-configuration').modal('hide');
-                                            }
-                                        }).fail(handleProcessorConfigurationError);
-                                    }
+                                    // save the processor
+                                    saveProcessor(processor).done(function (response) {
+                                        // set the new processor state based on the response
+                                        nf.Processor.set(response.processor);
+
+                                        // reload the processor's outgoing connections
+                                        reloadProcessorConnections(processor);
+
+                                        // close the details panel
+                                        $('#processor-configuration').modal('hide');
+                                    });
                                 }
                             }
                         }, {
@@ -696,29 +743,10 @@ nf.ProcessorConfiguration = (function () {
                                             overlayBackground: false,
                                             noHandler: openCustomUi,
                                             yesHandler: function () {
-                                                // marshal the settings and properties and update the processor
-                                                var updatedProcessor = marshalDetails();
-
-                                                // ensure details are valid as far as we can tell
-                                                if (validateDetails(updatedProcessor)) {
-                                                    // update the selected component
-                                                    $.ajax({
-                                                        type: 'PUT',
-                                                        data: JSON.stringify(updatedProcessor),
-                                                        url: processor.uri,
-                                                        dataType: 'json',
-                                                        processData: false,
-                                                        contentType: 'application/json'
-                                                    }).done(function (response) {
-                                                        if (nf.Common.isDefinedAndNotNull(response.processor)) {
-                                                            // update the revision
-                                                            nf.Client.setRevision(response.revision);
-
-                                                            // open the custom ui
-                                                            openCustomUi();
-                                                        }
-                                                    }).fail(handleProcessorConfigurationError);
-                                                }
+                                                saveProcessor(processor).done(function (deferred) {
+                                                    // open the custom ui
+                                                    openCustomUi();
+                                                });
                                             }
                                         });
                                     } else {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2154b822/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
index ed13f10..998213e 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
@@ -207,6 +207,70 @@ nf.ReportingTask = (function () {
     };
     
     /**
+     * Goes to a service configuration from the property table.
+     */
+    var goToServiceFromProperty = function () {
+        return $.Deferred(function (deferred) {
+            // close all fields currently being edited
+            $('#reporting-task-properties').propertytable('saveRow');
+
+            // determine if changes have been made
+            if (isSaveRequired()) {
+                // see if those changes should be saved
+                nf.Dialog.showYesNoDialog({
+                    dialogContent: 'Save changes before going to this Controller Service?',
+                    overlayBackground: false,
+                    noHandler: function () {
+                        deferred.resolve();
+                    },
+                    yesHandler: function () {
+                        var reportingTask = $('#reporting-task-configuration').data('reportingTaskDetails');
+                        saveReportingTask(reportingTask).done(function () {
+                            deferred.resolve();
+                        }).fail(function () {
+                            deferred.reject();
+                        });
+                    }
+                });
+            } else {
+                deferred.resolve();
+            }
+        }).promise();
+    };
+    
+    /**
+     * Saves the specified reporting task.
+     * 
+     * @param {type} reportingTask
+     */
+    var saveReportingTask = function (reportingTask) {
+        // marshal the settings and properties and update the reporting task
+        var updatedReportingTask = marshalDetails();
+
+        // ensure details are valid as far as we can tell
+        if (validateDetails(updatedReportingTask)) {
+            // update the selected component
+            return $.ajax({
+                type: 'PUT',
+                data: JSON.stringify(updatedReportingTask),
+                url: reportingTask.uri,
+                dataType: 'json',
+                processData: false,
+                contentType: 'application/json'
+            }).done(function (response) {
+                if (nf.Common.isDefinedAndNotNull(response.reportingTask)) {
+                    // update the revision
+                    nf.Client.setRevision(response.revision);
+                }
+            }).fail(handleReportingTaskConfigurationError);
+        } else {
+            return $.Deferred(function (deferred) {
+                deferred.reject();
+            }).promise();
+        }
+    };
+    
+    /**
      * Gets a property descriptor for the controller service currently being configured.
      * 
      * @param {type} propertyName
@@ -288,8 +352,9 @@ nf.ReportingTask = (function () {
             // initialize the property table
             $('#reporting-task-properties').propertytable({
                 readOnly: false,
-                newPropertyDialogContainer: '#new-reporting-task-property-container',
-                deferredDescriptor: getReportingTaskPropertyDescriptor
+                dialogContainer: '#new-reporting-task-property-container',
+                deferredDescriptor: getReportingTaskPropertyDescriptor,
+                goToServiceDeferred: goToServiceFromProperty
             });
         },
         
@@ -308,8 +373,9 @@ nf.ReportingTask = (function () {
                 // initialize the property table
                 $('#reporting-task-properties').propertytable('destroy').propertytable({
                     readOnly: false,
-                    newPropertyDialogContainer: '#new-reporting-task-property-container',
-                    deferredDescriptor: getReportingTaskPropertyDescriptor
+                    dialogContainer: '#new-reporting-task-property-container',
+                    deferredDescriptor: getReportingTaskPropertyDescriptor,
+                    goToServiceDeferred: goToServiceFromProperty
                 });
                 
                 // update the mode
@@ -407,33 +473,15 @@ nf.ReportingTask = (function () {
                                 // close all fields currently being edited
                                 $('#reporting-task-properties').propertytable('saveRow');
 
-                                // marshal the settings and properties and update the reporting task
-                                var updatedReportingTask = marshalDetails();
-
-                                // ensure details are valid as far as we can tell
-                                if (validateDetails(updatedReportingTask)) {
-                                    // update the selected component
-                                    $.ajax({
-                                        type: 'PUT',
-                                        data: JSON.stringify(updatedReportingTask),
-                                        url: reportingTask.uri,
-                                        dataType: 'json',
-                                        processData: false,
-                                        contentType: 'application/json'
-                                    }).done(function (response) {
-                                        if (nf.Common.isDefinedAndNotNull(response.reportingTask)) {
-                                            // update the revision
-                                            nf.Client.setRevision(response.revision);
-
-                                            // reload the reporting task
-                                            renderReportingTask(response.reportingTask);
-                                            nf.ControllerService.reloadReferencedServices(response.reportingTask);
+                                // save the reporting task
+                                saveReportingTask(reportingTask).done(function (response) {
+                                    // reload the reporting task
+                                    renderReportingTask(response.reportingTask);
+                                    nf.ControllerService.reloadReferencedServices(response.reportingTask);
 
-                                            // close the details panel
-                                            $('#reporting-task-configuration').modal('hide');
-                                        }
-                                    }).fail(handleReportingTaskConfigurationError);
-                                }
+                                    // close the details panel
+                                    $('#reporting-task-configuration').modal('hide');
+                                });
                             }
                         }
                     }, {
@@ -481,29 +529,10 @@ nf.ReportingTask = (function () {
                                         overlayBackground: false,
                                         noHandler: openCustomUi,
                                         yesHandler: function () {
-                                            // marshal the settings and properties and update the reporting task
-                                            var updatedReportingTask = marshalDetails();
-
-                                            // ensure details are valid as far as we can tell
-                                            if (validateDetails(updatedReportingTask)) {
-                                                // update the selected component
-                                                $.ajax({
-                                                    type: 'PUT',
-                                                    data: JSON.stringify(updatedReportingTask),
-                                                    url: reportingTask.uri,
-                                                    dataType: 'json',
-                                                    processData: false,
-                                                    contentType: 'application/json'
-                                                }).done(function (response) {
-                                                    if (nf.Common.isDefinedAndNotNull(response.reportingTask)) {
-                                                        // update the revision
-                                                        nf.Client.setRevision(response.revision);
-
-                                                        // open the custom ui
-                                                        openCustomUi();
-                                                    }
-                                                }).fail(handleReportingTaskConfigurationError);
-                                            }
+                                            saveReportingTask(reportingTask).done(function () {
+                                                // open the custom ui
+                                                openCustomUi();
+                                            });
                                         }
                                     });
                                 } else {


[24/50] [abbrv] incubator-nifi git commit: NIFI-459: - Fixing the label for the units in the hex view label.

Posted by jo...@apache.org.
NIFI-459:
- Fixing the label for the units in the hex view label.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/322be256
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/322be256
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/322be256

Branch: refs/heads/NIFI-271
Commit: 322be256b561cd4e2af84118c64eb594ccafd285
Parents: c1959b3
Author: Matt Gilman <ma...@gmail.com>
Authored: Fri Apr 10 11:03:05 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Fri Apr 10 11:03:05 2015 -0400

----------------------------------------------------------------------
 .../src/main/webapp/WEB-INF/jsp/hexview.jsp                        | 2 +-
 .../nifi-web/nifi-web-content-viewer/src/main/webapp/css/main.css  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/322be256/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/hexview.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/hexview.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/hexview.jsp
index c6e7f38..f4e9fd2 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/hexview.jsp
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/hexview.jsp
@@ -29,4 +29,4 @@
         <input type="hidden" name="caption" value="" />
     </form>
 </div>
-<div id="trancation-message">Showing up to 1.5kb</div>
\ No newline at end of file
+<div id="truncation-message">Showing up to 1.5 KB</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/322be256/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/css/main.css
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/css/main.css b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/css/main.css
index a66198d..fe68b62 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/css/main.css
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/css/main.css
@@ -87,7 +87,7 @@
     padding: 2px;
 }
 
-#trancation-message {
+#truncation-message {
     position: absolute;
     left: 100px;
     bottom: 35px;


[31/50] [abbrv] incubator-nifi git commit: NIFI-505: Added more legit unit tests

Posted by jo...@apache.org.
NIFI-505: Added more legit unit tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/1963c274
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/1963c274
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/1963c274

Branch: refs/heads/NIFI-271
Commit: 1963c27409d99d2a05a68a8ed5ededd076bf0da7
Parents: c83c7af
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 10 14:51:27 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 10 14:51:27 2015 -0400

----------------------------------------------------------------------
 .../nifi/processors/yandex/YandexTranslate.java |  32 +++--
 .../processors/yandex/TestYandexTranslate.java  | 135 +++++++++++++++----
 2 files changed, 130 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1963c274/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 a5eecc6..bd83a8a 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
@@ -92,7 +92,7 @@ public class YandexTranslate extends AbstractProcessor {
 		.name("Input Language")
 		.description("The language of incoming data")
 		.required(true)
-		.defaultValue("sp")
+		.defaultValue("es")
 		.expressionLanguageSupported(true)
 		.addValidator(new LanguageNameValidator())
 		.build();
@@ -213,6 +213,24 @@ public class YandexTranslate extends AbstractProcessor {
     	}
     }
     
+    
+    protected WebResource.Builder prepareResource(final String key, final List<String> text, final String sourceLanguage, final String destLanguage) {
+		WebResource webResource = client.resource(URL);
+		
+		final MultivaluedMap<String, String> paramMap = new MultivaluedMapImpl();
+		paramMap.put("text", text);
+		paramMap.add("key", key);
+		paramMap.add("lang", sourceLanguage + "-" + destLanguage);
+		
+		WebResource.Builder builder = webResource
+				.accept(MediaType.APPLICATION_JSON)
+				.type(MediaType.APPLICATION_FORM_URLENCODED);
+		builder = builder.entity(paramMap);
+		
+		return builder;
+    }
+    
+    
     @Override
     public void onTrigger(final ProcessContext context, final ProcessSession session) throws ProcessException {
 		FlowFile flowFile = session.get();
@@ -247,17 +265,7 @@ public class YandexTranslate extends AbstractProcessor {
 			textValues.add(content);
 		}
 		
-		WebResource webResource = client.resource(URL);
-		
-		final MultivaluedMap<String, String> paramMap = new MultivaluedMapImpl();
-		paramMap.put("text", textValues);
-		paramMap.add("key", key);
-		paramMap.add("lang", sourceLanguage + "-" + targetLanguage);
-		
-		WebResource.Builder builder = webResource
-				.accept(MediaType.APPLICATION_JSON)
-				.type(MediaType.APPLICATION_FORM_URLENCODED);
-		builder = builder.entity(paramMap);
+		final WebResource.Builder builder = prepareResource(key, textValues, sourceLanguage, targetLanguage);
 		
 		final ClientResponse response;
 		try {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1963c274/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/test/java/org/apache/nifi/processors/yandex/TestYandexTranslate.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/test/java/org/apache/nifi/processors/yandex/TestYandexTranslate.java b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/test/java/org/apache/nifi/processors/yandex/TestYandexTranslate.java
index 4f82049..7b38b8b 100644
--- a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/test/java/org/apache/nifi/processors/yandex/TestYandexTranslate.java
+++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/test/java/org/apache/nifi/processors/yandex/TestYandexTranslate.java
@@ -18,41 +18,100 @@ package org.apache.nifi.processors.yandex;
 
 import static org.junit.Assert.assertEquals;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
-import org.apache.nifi.processors.yandex.YandexTranslate;
+import javax.ws.rs.core.Response.Status.Family;
+import javax.ws.rs.core.Response.StatusType;
+
+import org.apache.nifi.processors.yandex.model.Translation;
 import org.apache.nifi.util.MockFlowFile;
 import org.apache.nifi.util.TestRunner;
 import org.apache.nifi.util.TestRunners;
-import org.junit.Before;
-import org.junit.Ignore;
+import org.junit.BeforeClass;
 import org.junit.Test;
+import org.mockito.Mockito;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.WebResource;
+import com.sun.jersey.api.client.WebResource.Builder;
 
-@Ignore("For local testing only; requires local file to be populated with Yandex API Key")
 public class TestYandexTranslate {
 
-    private TestRunner testRunner;
-    private String apiKey;
+	private static final Map<String, String> translations = new HashMap<>();
+	
+	@BeforeClass
+	public static void setupTranslationMap() {
+		translations.put("bonjour", "hello");
+		translations.put("traduire", "translate");
+		translations.put("amusant", "fun");
+		translations.put("ordinateur", "computer");
+	}
+	
+    private TestRunner createTestRunner(final int statusCode) {
+    	return TestRunners.newTestRunner(new YandexTranslate() {
+        	@Override
+        	protected Builder prepareResource(final String key, final List<String> text, final String sourceLanguage, final String destLanguage) {
+        		final WebResource.Builder builder = Mockito.mock(WebResource.Builder.class);
+        		
+        		Mockito.doAnswer(new Answer<ClientResponse>() {
+					@Override
+					public ClientResponse answer(final InvocationOnMock invocation) throws Throwable {
+						final ClientResponse response = Mockito.mock(ClientResponse.class);
 
-    @Before
-    public void init() throws IOException {
-        testRunner = TestRunners.newTestRunner(YandexTranslate.class);
-        
-        final Properties properties = new Properties();
-        try (final InputStream in = new FileInputStream(new File("C:/dev/notes/yandex-info.txt"))) {
-        	properties.load(in);
-        }
-        apiKey = properties.getProperty("api_key").trim();
+						final StatusType statusType = new StatusType() {
+							@Override
+							public int getStatusCode() {
+								return statusCode;
+							}
+							
+							@Override
+							public String getReasonPhrase() {
+								return String.valueOf(statusCode);
+							}
+							
+							@Override
+							public Family getFamily() {
+								return statusCode == 200 ? Family.SUCCESSFUL : Family.SERVER_ERROR;
+							}
+						};
+						
+						Mockito.when(response.getStatus()).thenReturn(statusCode);
+						Mockito.when(response.getStatusInfo()).thenReturn(statusType);
+						
+						if ( statusCode == 200 ) {
+							final Translation translation = new Translation();
+							translation.setCode(statusCode);
+							translation.setLang(destLanguage);
+							
+							final List<String> translationList = new ArrayList<>();
+							for ( final String original : text ) {
+								final String translated = translations.get(original);
+								translationList.add(translated == null ? original : translated);
+							}
+							
+							translation.setText(translationList);
+							
+							Mockito.when(response.getEntity(Translation.class)).thenReturn(translation);
+						}
+						
+						return response;
+					}
+        		}).when(builder).post(ClientResponse.class);
+        		return builder;
+        	}
+        });
     }
-
+    
     
     @Test
     public void testTranslateContent() {
-    	testRunner.setProperty(YandexTranslate.KEY, apiKey);
+    	final TestRunner testRunner = createTestRunner(200);
+    	testRunner.setProperty(YandexTranslate.KEY, "a");
     	testRunner.setProperty(YandexTranslate.SOURCE_LANGUAGE, "fr");
     	testRunner.setProperty(YandexTranslate.TARGET_LANGUAGE, "en");
     	testRunner.setProperty(YandexTranslate.TRANSLATE_CONTENT, "true");
@@ -71,7 +130,9 @@ public class TestYandexTranslate {
     
     @Test
     public void testTranslateSingleAttribute() {
-    	testRunner.setProperty(YandexTranslate.KEY, apiKey);
+    	final TestRunner testRunner = createTestRunner(200);
+
+    	testRunner.setProperty(YandexTranslate.KEY, "A");
     	testRunner.setProperty(YandexTranslate.SOURCE_LANGUAGE, "fr");
     	testRunner.setProperty(YandexTranslate.TARGET_LANGUAGE, "en");
     	testRunner.setProperty(YandexTranslate.TRANSLATE_CONTENT, "false");
@@ -90,7 +151,9 @@ public class TestYandexTranslate {
     
     @Test
     public void testTranslateMultipleAttributes() {
-    	testRunner.setProperty(YandexTranslate.KEY, apiKey);
+    	final TestRunner testRunner = createTestRunner(200);
+
+    	testRunner.setProperty(YandexTranslate.KEY, "A");
     	testRunner.setProperty(YandexTranslate.SOURCE_LANGUAGE, "fr");
     	testRunner.setProperty(YandexTranslate.TARGET_LANGUAGE, "en");
     	testRunner.setProperty(YandexTranslate.TRANSLATE_CONTENT, "false");
@@ -114,7 +177,9 @@ public class TestYandexTranslate {
     
     @Test
     public void testTranslateContentAndMultipleAttributes() {
-    	testRunner.setProperty(YandexTranslate.KEY, apiKey);
+    	final TestRunner testRunner = createTestRunner(200);
+
+    	testRunner.setProperty(YandexTranslate.KEY, "A");
     	testRunner.setProperty(YandexTranslate.SOURCE_LANGUAGE, "fr");
     	testRunner.setProperty(YandexTranslate.TARGET_LANGUAGE, "en");
     	testRunner.setProperty(YandexTranslate.TRANSLATE_CONTENT, "true");
@@ -137,5 +202,25 @@ public class TestYandexTranslate {
     	out.assertAttributeEquals("fun", "fun");
     	out.assertAttributeEquals("nifi", "nifi");
     }
+    
+    @Test
+    public void testFailureResponse() {
+    	final TestRunner testRunner = createTestRunner(403);
+
+    	testRunner.setProperty(YandexTranslate.KEY, "A");
+    	testRunner.setProperty(YandexTranslate.SOURCE_LANGUAGE, "fr");
+    	testRunner.setProperty(YandexTranslate.TARGET_LANGUAGE, "en");
+    	testRunner.setProperty(YandexTranslate.TRANSLATE_CONTENT, "true");
+    	testRunner.setProperty(YandexTranslate.CHARACTER_SET, "UTF-8");
+    	testRunner.setProperty("hello", "bonjour");
+    	testRunner.setProperty("translate", "traduire");
+    	testRunner.setProperty("fun", "amusant");
+    	testRunner.setProperty("nifi", "nifi");
+    	
+    	testRunner.enqueue("ordinateur".getBytes());
+    	testRunner.run();
+    	
+    	testRunner.assertAllFlowFilesTransferred(YandexTranslate.REL_TRANSLATION_FAILED, 1);
+    }
 
 }


[02/50] [abbrv] incubator-nifi git commit: NIFI-492: When attempting to get a connection from the pool, if we create a new one and encounter an error, should ensure we close the new connection

Posted by jo...@apache.org.
NIFI-492: When attempting to get a connection from the pool, if we create a new one and encounter an error, should ensure we close the new connection


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8d20b820
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8d20b820
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8d20b820

Branch: refs/heads/NIFI-271
Commit: 8d20b82095857e06ee58ae892039a5f10613b125
Parents: 39735c3
Author: Mark Payne <ma...@hotmail.com>
Authored: Tue Apr 7 14:16:54 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Tue Apr 7 14:16:54 2015 -0400

----------------------------------------------------------------------
 .../remote/client/socket/EndpointConnectionPool.java  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8d20b820/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
index daf52b4..1a6dfd5 100644
--- a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
+++ b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
@@ -314,6 +314,11 @@ public class EndpointConnectionPool {
                         if ( protocol.isDestinationFull() ) {
                             logger.warn("{} {} indicates that port's destination is full; penalizing peer", this, peer);
                             penalize(peer, penalizationMillis);
+                            try {
+                            	peer.close();
+                            } catch (final IOException ioe) {
+                            }
+                            
                             continue;
                         } else if ( protocol.isPortInvalid() ) {
                         	penalize(peer, penalizationMillis);
@@ -359,6 +364,15 @@ public class EndpointConnectionPool {
                     }
                 }
             } while ( connection == null || codec == null || commsSession == null || protocol == null );
+        } catch (final Throwable t) {
+        	if ( commsSession != null ) {
+        		try {
+        			commsSession.close();
+        		} catch (final IOException ioe) {
+        		}
+        	}
+        	
+        	throw t;
         } finally {
             if ( !addBack.isEmpty() ) {
                 connectionQueue.addAll(addBack);


[15/50] [abbrv] incubator-nifi git commit: NIFI-505: Initial import of language translation nar

Posted by jo...@apache.org.
NIFI-505: Initial import of language translation nar


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/178c5cd2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/178c5cd2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/178c5cd2

Branch: refs/heads/NIFI-271
Commit: 178c5cd287eed734bd3d93665df27682db941a8b
Parents: ff0bd2c
Author: Mark Payne <ma...@hotmail.com>
Authored: Thu Apr 9 17:55:33 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Thu Apr 9 17:55:33 2015 -0400

----------------------------------------------------------------------
 .../nifi-language-translation-nar/pom.xml       |  36 ++
 .../nifi-yandex-processors/.gitignore           |   1 +
 .../nifi-yandex-processors/pom.xml              |  63 ++++
 .../nifi/processors/yandex/YandexTranslate.java | 325 +++++++++++++++++++
 .../processors/yandex/model/Translation.java    |  52 +++
 .../nifi/processors/yandex/util/Languages.java  |  86 +++++
 .../yandex/util/ObjectMapperResolver.java       |  48 +++
 .../org.apache.nifi.processor.Processor         |  16 +
 .../processors/yandex/TestYandexTranslate.java  | 141 ++++++++
 .../nifi-language-translation-bundle/pom.xml    |  48 +++
 10 files changed, 816 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/178c5cd2/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-language-translation-nar/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-language-translation-nar/pom.xml b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-language-translation-nar/pom.xml
new file mode 100644
index 0000000..4d8b790
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-language-translation-nar/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-language-translation-bundle</artifactId>
+        <version>0.1.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-language-translation-nar</artifactId>
+    <packaging>nar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-yandex-processors</artifactId>
+            <version>0.1.0-incubating-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/178c5cd2/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/.gitignore
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/.gitignore b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/.gitignore
@@ -0,0 +1 @@
+/target/

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/178c5cd2/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
new file mode 100644
index 0000000..a5f9f0e
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-language-translation-bundle</artifactId>
+        <version>0.1.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-yandex-processors</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-processor-utils</artifactId>
+        </dependency>
+        
+        <dependency>
+        	<groupId>com.sun.jersey</groupId>
+        	<artifactId>jersey-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-json</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-mock</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/178c5cd2/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
new file mode 100644
index 0000000..a5eecc6
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/YandexTranslate.java
@@ -0,0 +1,325 @@
+/*
+ * 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.yandex;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.charset.Charset;
+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 javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+
+import org.apache.nifi.annotation.behavior.DynamicProperty;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.annotation.lifecycle.OnStopped;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.ValidationContext;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.components.Validator;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.io.InputStreamCallback;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.yandex.model.Translation;
+import org.apache.nifi.processors.yandex.util.Languages;
+import org.apache.nifi.processors.yandex.util.ObjectMapperResolver;
+import org.apache.nifi.stream.io.StreamUtils;
+import org.apache.nifi.util.StopWatch;
+
+import com.sun.jersey.api.client.Client;
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.ClientResponse.Status;
+import com.sun.jersey.api.client.WebResource;
+import com.sun.jersey.api.client.config.ClientConfig;
+import com.sun.jersey.api.client.config.DefaultClientConfig;
+import com.sun.jersey.api.json.JSONConfiguration;
+import com.sun.jersey.core.util.MultivaluedMapImpl;
+
+@SupportsBatching
+@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")
+})
+@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(StandardValidators.NON_EMPTY_VALIDATOR)
+        .required(true)
+        .build();
+    public static final PropertyDescriptor SOURCE_LANGUAGE = new PropertyDescriptor.Builder()
+		.name("Input Language")
+		.description("The language of incoming data")
+		.required(true)
+		.defaultValue("sp")
+		.expressionLanguageSupported(true)
+		.addValidator(new LanguageNameValidator())
+		.build();
+    public static final PropertyDescriptor TARGET_LANGUAGE = new PropertyDescriptor.Builder()
+		.name("Target Language")
+		.description("The language to translate the text into")
+		.required(true)
+		.defaultValue("en")
+		.expressionLanguageSupported(true)
+		.addValidator(new LanguageNameValidator())
+		.build();
+    public static final PropertyDescriptor TRANSLATE_CONTENT = new PropertyDescriptor.Builder()
+	    .name("Translate Content")
+	    .description("Specifies whether or not the content should be translated. If false, only the text specified by user-defined properties will be translated.")
+	    .required(true)
+	    .allowableValues("true", "false")
+	    .defaultValue("false")
+	    .build();
+    public static final PropertyDescriptor CHARACTER_SET = new PropertyDescriptor.Builder()
+		.name("Character Set")
+		.description("Specifies the character set of the data to be translated")
+		.required(true)
+		.defaultValue("UTF-8")
+		.expressionLanguageSupported(true)
+		.addValidator(StandardValidators.CHARACTER_SET_VALIDATOR)
+		.build();
+
+    public static final Relationship REL_SUCCESS = new Relationship.Builder()
+	    .name("success")
+	    .description("This relationship is used when the translation is successful")
+	    .build();
+    public static final Relationship REL_COMMS_FAILURE = new Relationship.Builder()
+    	.name("comms.failure")
+    	.description("This relationship is used when the translation fails due to a problem such as a network failure, and for which the translation should be attempted again")
+    	.build();
+    public static final Relationship REL_TRANSLATION_FAILED = new Relationship.Builder()
+    	.name("translation.failure")
+    	.description("This relationship is used if the translation cannot be performed for some reason other than communications failure")
+    	.build();
+
+    private List<PropertyDescriptor> descriptors;
+    private Set<Relationship> relationships;
+    
+    private volatile Client client;
+
+    private static final String URL = "https://translate.yandex.net/api/v1.5/tr.json/translate";
+    
+    @Override
+    protected void init(final ProcessorInitializationContext context) {
+        final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
+        descriptors.add(KEY);
+        descriptors.add(SOURCE_LANGUAGE);
+        descriptors.add(TARGET_LANGUAGE);
+        descriptors.add(TRANSLATE_CONTENT);
+        descriptors.add(CHARACTER_SET);
+        this.descriptors = Collections.unmodifiableList(descriptors);
+
+        final Set<Relationship> relationships = new HashSet<Relationship>();
+        relationships.add(REL_SUCCESS);
+        relationships.add(REL_COMMS_FAILURE);
+        relationships.add(REL_TRANSLATION_FAILED);
+        this.relationships = Collections.unmodifiableSet(relationships);
+    }
+
+    @Override
+    public Set<Relationship> getRelationships() {
+        return this.relationships;
+    }
+
+    @Override
+    public final List<PropertyDescriptor> getSupportedPropertyDescriptors() {
+        return descriptors;
+    }
+    
+    @Override
+    protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
+    	return new PropertyDescriptor.Builder()
+    		.name(propertyDescriptorName)
+    		.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+    		.expressionLanguageSupported(true)
+    		.dynamic(true)
+    		.build();
+    }
+
+    @Override
+    protected Collection<ValidationResult> customValidate(final ValidationContext validationContext) {
+    	final List<ValidationResult> results = new ArrayList<>();
+    	if ( validationContext.getProperty(TRANSLATE_CONTENT).asBoolean().equals(Boolean.FALSE) ) {
+    		boolean foundDynamic = false;
+    		for ( final PropertyDescriptor descriptor : validationContext.getProperties().keySet() ) {
+    			if ( descriptor.isDynamic() ) {
+    				foundDynamic = true;
+    				break;
+    			}
+    		}
+    		
+    		if ( !foundDynamic ) {
+    			results.add(new ValidationResult.Builder().subject("Text to translate").input("<none>").valid(false).explanation("Must either set 'Translate Content' to true or add at least one user-defined property").build());
+    		}
+    	}
+    	
+    	return results;
+    }
+    
+    @OnScheduled
+    public void onScheduled(final ProcessContext context) {
+    	final ClientConfig config = new DefaultClientConfig();
+        config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);
+        config.getClasses().add(ObjectMapperResolver.class);
+
+    	client = Client.create(config);
+    }
+
+    @OnStopped
+    public void destroyClient() {
+    	if ( client != null ) {
+    		client.destroy();
+    	}
+    }
+    
+    @Override
+    public void onTrigger(final ProcessContext context, final ProcessSession session) throws ProcessException {
+		FlowFile flowFile = session.get();
+		if ( flowFile == null ) {
+			return;
+		}
+
+		final StopWatch stopWatch = new StopWatch(true);
+		final String key = context.getProperty(KEY).getValue();
+		final String sourceLanguage = context.getProperty(SOURCE_LANGUAGE).evaluateAttributeExpressions(flowFile).getValue();
+		final String targetLanguage = context.getProperty(TARGET_LANGUAGE).evaluateAttributeExpressions(flowFile).getValue();
+		final String encoding = context.getProperty(CHARACTER_SET).evaluateAttributeExpressions(flowFile).getValue();
+		
+		final List<String> attributeNames = new ArrayList<>();
+		final List<String> textValues = new ArrayList<>();
+		for ( final PropertyDescriptor descriptor : context.getProperties().keySet() ) {
+			if ( descriptor.isDynamic() ) {
+				attributeNames.add(descriptor.getName());	// add to list so that we know the order when the translations come back.
+				textValues.add(context.getProperty(descriptor).evaluateAttributeExpressions(flowFile).getValue());
+			}
+		}
+		
+		if ( context.getProperty(TRANSLATE_CONTENT).asBoolean() ) {
+			final byte[] buff = new byte[(int) flowFile.getSize()];
+			session.read(flowFile, new InputStreamCallback() {
+				@Override
+				public void process(final InputStream in) throws IOException {
+					StreamUtils.fillBuffer(in, buff);
+				}
+			});
+			final String content = new String(buff, Charset.forName(encoding));
+			textValues.add(content);
+		}
+		
+		WebResource webResource = client.resource(URL);
+		
+		final MultivaluedMap<String, String> paramMap = new MultivaluedMapImpl();
+		paramMap.put("text", textValues);
+		paramMap.add("key", key);
+		paramMap.add("lang", sourceLanguage + "-" + targetLanguage);
+		
+		WebResource.Builder builder = webResource
+				.accept(MediaType.APPLICATION_JSON)
+				.type(MediaType.APPLICATION_FORM_URLENCODED);
+		builder = builder.entity(paramMap);
+		
+		final ClientResponse response;
+		try {
+			response = builder.post(ClientResponse.class);
+		} catch (final Exception e) {
+			getLogger().error("Failed to make request to Yandex to transate text for {} due to {}; routing to comms.failure", new Object[] {flowFile, e});
+			session.transfer(flowFile, REL_COMMS_FAILURE);
+			return;
+		}
+		
+		if ( response.getStatus() != Status.OK.getStatusCode() ) {
+			getLogger().error("Failed to translate text using Yandex for {}; response was {}: {}; routing to {}", new Object[] {
+					flowFile, response.getStatus(), response.getStatusInfo().getReasonPhrase(), REL_TRANSLATION_FAILED.getName()});
+			flowFile = session.putAttribute(flowFile, "yandex.translate.failure.reason", response.getStatusInfo().getReasonPhrase());
+			session.transfer(flowFile, REL_TRANSLATION_FAILED);
+			return;
+		}
+		
+		final Map<String, String> newAttributes = new HashMap<>();
+		final Translation translation = response.getEntity(Translation.class);
+		final List<String> texts = translation.getText();
+		for (int i=0; i < texts.size(); i++) {
+			final String text = texts.get(i);
+			if ( i < attributeNames.size() ) {
+				final String attributeName = attributeNames.get(i);
+				newAttributes.put(attributeName, text);
+			} else {
+				flowFile = session.write(flowFile, new OutputStreamCallback() {
+					@Override
+					public void process(final OutputStream out) throws IOException {
+						out.write(text.getBytes(encoding));
+					}
+				});
+				
+				newAttributes.put("language", targetLanguage);
+			}
+		}
+		
+		if ( !newAttributes.isEmpty() ) {
+			flowFile = session.putAllAttributes(flowFile, newAttributes);
+		}
+		
+		stopWatch.stop();
+		session.transfer(flowFile, REL_SUCCESS);
+		getLogger().info("Successfully translated {} items for {} from {} to {} in {}; routing to success", new Object[] {texts.size(), flowFile, sourceLanguage, targetLanguage, stopWatch.getDuration()});
+    }
+
+    
+    private static class LanguageNameValidator implements Validator {
+    	
+		@Override
+		public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
+			if ( context.isExpressionLanguagePresent(input) ) {
+				return new ValidationResult.Builder().subject(subject).input(input).valid(true).explanation("Expression Language Present").build();
+			}
+
+			if ( Languages.getLanguageMap().keySet().contains(input.toLowerCase()) ) {
+				return new ValidationResult.Builder().subject(subject).input(input).valid(true).build();
+			}
+			
+			return new ValidationResult.Builder().subject(subject).input(input).valid(false).explanation(input + " is not a language that is supported by Yandex").build();
+		}
+    	
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/178c5cd2/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/model/Translation.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/model/Translation.java b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/model/Translation.java
new file mode 100644
index 0000000..eeb7c3f
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/model/Translation.java
@@ -0,0 +1,52 @@
+/*
+ * 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.yandex.model;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "translation")
+public class Translation {
+	private int code;
+	private String lang;
+	private List<String> text;
+	
+	public int getCode() {
+		return code;
+	}
+	
+	public void setCode(final int code) {
+		this.code = code;
+	}
+	
+	public String getLang() {
+		return lang;
+	}
+	
+	public void setLang(final String lang) {
+		this.lang = lang;
+	}
+	
+	public List<String> getText() {
+		return text;
+	}
+	
+	public void setText(final List<String> text) {
+		this.text = text;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/178c5cd2/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/util/Languages.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/util/Languages.java b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/util/Languages.java
new file mode 100644
index 0000000..791d6a3
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/util/Languages.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.yandex.util;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+public class Languages {
+	private static final Map<String, String> languageAbbreviationMap = new HashMap<>();
+	
+	static {
+		languageAbbreviationMap.put("ar", "arabic");
+		languageAbbreviationMap.put("az", "azerbaijani");
+		languageAbbreviationMap.put("be", "belarusian");
+		languageAbbreviationMap.put("bg", "bulgarian");
+		languageAbbreviationMap.put("bs", "bosnian");
+		languageAbbreviationMap.put("ca", "catalan");
+		languageAbbreviationMap.put("cs", "czech");
+		languageAbbreviationMap.put("da", "danish");
+		languageAbbreviationMap.put("de", "german");
+		languageAbbreviationMap.put("el", "greek");
+		languageAbbreviationMap.put("en", "english");
+		languageAbbreviationMap.put("es", "spanish");
+		languageAbbreviationMap.put("et", "estonian");
+		languageAbbreviationMap.put("fi", "finnish");
+		languageAbbreviationMap.put("fr", "french");
+		languageAbbreviationMap.put("he", "hebrew");
+		languageAbbreviationMap.put("hr", "croatian");
+		languageAbbreviationMap.put("hu", "hungarian");
+		languageAbbreviationMap.put("hy", "armenian");
+		languageAbbreviationMap.put("id", "indonesian");
+		languageAbbreviationMap.put("is", "icelandic");
+		languageAbbreviationMap.put("it", "italian");
+		languageAbbreviationMap.put("ja", "japanese");
+		languageAbbreviationMap.put("ka", "georgian");
+		languageAbbreviationMap.put("ko", "korean");
+		languageAbbreviationMap.put("lt", "lithuanian");
+		languageAbbreviationMap.put("lv", "latvian");
+		languageAbbreviationMap.put("mk", "macedonian");
+		languageAbbreviationMap.put("ms", "malay");
+		languageAbbreviationMap.put("mt", "maltese");
+		languageAbbreviationMap.put("nl", "dutch");
+		languageAbbreviationMap.put("no", "norwegian");
+		languageAbbreviationMap.put("pl", "polish");
+		languageAbbreviationMap.put("pt", "portuguese");
+		languageAbbreviationMap.put("ro", "romanian");
+		languageAbbreviationMap.put("ru", "russian");
+		languageAbbreviationMap.put("sk", "slovak");
+		languageAbbreviationMap.put("sl", "slovenian");
+		languageAbbreviationMap.put("sq", "albanian");
+		languageAbbreviationMap.put("sr", "serbian");
+		languageAbbreviationMap.put("sv", "swedish");
+		languageAbbreviationMap.put("th", "thai");
+		languageAbbreviationMap.put("tr", "turkish");
+		languageAbbreviationMap.put("uk", "ukrainian");
+		languageAbbreviationMap.put("vi", "vietnamese");
+		languageAbbreviationMap.put("zh", "chinese");
+		
+		final Map<String, String> reverseMap = new HashMap<>();
+		for ( final Map.Entry<String, String> entry : languageAbbreviationMap.entrySet() ) {
+			reverseMap.put(entry.getValue(), entry.getKey());
+		}
+		
+		languageAbbreviationMap.putAll(reverseMap);
+	}
+	
+	
+	public static Map<String, String> getLanguageMap() {
+		return Collections.unmodifiableMap(languageAbbreviationMap);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/178c5cd2/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/util/ObjectMapperResolver.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/util/ObjectMapperResolver.java b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/util/ObjectMapperResolver.java
new file mode 100644
index 0000000..085cf7f
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/java/org/apache/nifi/processors/yandex/util/ObjectMapperResolver.java
@@ -0,0 +1,48 @@
+/*
+ * 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.yandex.util;
+
+import javax.ws.rs.ext.ContextResolver;
+import javax.ws.rs.ext.Provider;
+import org.codehaus.jackson.map.AnnotationIntrospector;
+import org.codehaus.jackson.map.DeserializationConfig;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+import org.codehaus.jackson.xc.JaxbAnnotationIntrospector;
+
+@Provider
+public class ObjectMapperResolver implements ContextResolver<ObjectMapper> {
+
+    private final ObjectMapper mapper;
+
+    public ObjectMapperResolver() throws Exception {
+        mapper = new ObjectMapper();
+
+        final AnnotationIntrospector jaxbIntrospector = new JaxbAnnotationIntrospector();
+        final SerializationConfig serializationConfig = mapper.getSerializationConfig();
+        final DeserializationConfig deserializationConfig = mapper.getDeserializationConfig();
+
+        mapper.setSerializationConfig(serializationConfig.withSerializationInclusion(Inclusion.NON_NULL).withAnnotationIntrospector(jaxbIntrospector));
+        mapper.setDeserializationConfig(deserializationConfig.withAnnotationIntrospector(jaxbIntrospector));
+    }
+
+    @Override
+    public ObjectMapper getContext(Class<?> objectType) {
+        return mapper;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/178c5cd2/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
new file mode 100644
index 0000000..dc81439
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+org.apache.nifi.processors.yandex.YandexTranslate
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/178c5cd2/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/test/java/org/apache/nifi/processors/yandex/TestYandexTranslate.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/test/java/org/apache/nifi/processors/yandex/TestYandexTranslate.java b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/test/java/org/apache/nifi/processors/yandex/TestYandexTranslate.java
new file mode 100644
index 0000000..4f82049
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/src/test/java/org/apache/nifi/processors/yandex/TestYandexTranslate.java
@@ -0,0 +1,141 @@
+/*
+ * 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.yandex;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.apache.nifi.processors.yandex.YandexTranslate;
+import org.apache.nifi.util.MockFlowFile;
+import org.apache.nifi.util.TestRunner;
+import org.apache.nifi.util.TestRunners;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+@Ignore("For local testing only; requires local file to be populated with Yandex API Key")
+public class TestYandexTranslate {
+
+    private TestRunner testRunner;
+    private String apiKey;
+
+    @Before
+    public void init() throws IOException {
+        testRunner = TestRunners.newTestRunner(YandexTranslate.class);
+        
+        final Properties properties = new Properties();
+        try (final InputStream in = new FileInputStream(new File("C:/dev/notes/yandex-info.txt"))) {
+        	properties.load(in);
+        }
+        apiKey = properties.getProperty("api_key").trim();
+    }
+
+    
+    @Test
+    public void testTranslateContent() {
+    	testRunner.setProperty(YandexTranslate.KEY, apiKey);
+    	testRunner.setProperty(YandexTranslate.SOURCE_LANGUAGE, "fr");
+    	testRunner.setProperty(YandexTranslate.TARGET_LANGUAGE, "en");
+    	testRunner.setProperty(YandexTranslate.TRANSLATE_CONTENT, "true");
+    	testRunner.setProperty(YandexTranslate.CHARACTER_SET, "UTF-8");
+    	
+    	testRunner.enqueue("bonjour".getBytes());
+    	testRunner.run();
+    	
+    	testRunner.assertAllFlowFilesTransferred(YandexTranslate.REL_SUCCESS, 1);
+    	final MockFlowFile out = testRunner.getFlowFilesForRelationship(YandexTranslate.REL_SUCCESS).get(0);
+    	
+    	final String outText = new String(out.toByteArray());
+    	assertEquals("hello", outText);
+    }
+
+    
+    @Test
+    public void testTranslateSingleAttribute() {
+    	testRunner.setProperty(YandexTranslate.KEY, apiKey);
+    	testRunner.setProperty(YandexTranslate.SOURCE_LANGUAGE, "fr");
+    	testRunner.setProperty(YandexTranslate.TARGET_LANGUAGE, "en");
+    	testRunner.setProperty(YandexTranslate.TRANSLATE_CONTENT, "false");
+    	testRunner.setProperty(YandexTranslate.CHARACTER_SET, "UTF-8");
+    	testRunner.setProperty("translated", "bonjour");
+    	
+    	testRunner.enqueue(new byte[0]);
+    	testRunner.run();
+    	
+    	testRunner.assertAllFlowFilesTransferred(YandexTranslate.REL_SUCCESS, 1);
+    	final MockFlowFile out = testRunner.getFlowFilesForRelationship(YandexTranslate.REL_SUCCESS).get(0);
+    	
+    	assertEquals(0, out.toByteArray().length);
+    	out.assertAttributeEquals("translated", "hello");
+    }
+    
+    @Test
+    public void testTranslateMultipleAttributes() {
+    	testRunner.setProperty(YandexTranslate.KEY, apiKey);
+    	testRunner.setProperty(YandexTranslate.SOURCE_LANGUAGE, "fr");
+    	testRunner.setProperty(YandexTranslate.TARGET_LANGUAGE, "en");
+    	testRunner.setProperty(YandexTranslate.TRANSLATE_CONTENT, "false");
+    	testRunner.setProperty(YandexTranslate.CHARACTER_SET, "UTF-8");
+    	testRunner.setProperty("hello", "bonjour");
+    	testRunner.setProperty("translate", "traduire");
+    	testRunner.setProperty("fun", "amusant");
+    	
+    	testRunner.enqueue(new byte[0]);
+    	testRunner.run();
+    	
+    	testRunner.assertAllFlowFilesTransferred(YandexTranslate.REL_SUCCESS, 1);
+    	final MockFlowFile out = testRunner.getFlowFilesForRelationship(YandexTranslate.REL_SUCCESS).get(0);
+    	
+    	assertEquals(0, out.toByteArray().length);
+    	out.assertAttributeEquals("hello", "hello");
+    	out.assertAttributeEquals("translate", "translate");
+    	out.assertAttributeEquals("fun", "fun");
+    }
+
+    
+    @Test
+    public void testTranslateContentAndMultipleAttributes() {
+    	testRunner.setProperty(YandexTranslate.KEY, apiKey);
+    	testRunner.setProperty(YandexTranslate.SOURCE_LANGUAGE, "fr");
+    	testRunner.setProperty(YandexTranslate.TARGET_LANGUAGE, "en");
+    	testRunner.setProperty(YandexTranslate.TRANSLATE_CONTENT, "true");
+    	testRunner.setProperty(YandexTranslate.CHARACTER_SET, "UTF-8");
+    	testRunner.setProperty("hello", "bonjour");
+    	testRunner.setProperty("translate", "traduire");
+    	testRunner.setProperty("fun", "amusant");
+    	testRunner.setProperty("nifi", "nifi");
+    	
+    	testRunner.enqueue("ordinateur".getBytes());
+    	testRunner.run();
+    	
+    	testRunner.assertAllFlowFilesTransferred(YandexTranslate.REL_SUCCESS, 1);
+    	final MockFlowFile out = testRunner.getFlowFilesForRelationship(YandexTranslate.REL_SUCCESS).get(0);
+    	
+    	out.assertContentEquals("computer");
+    	
+    	out.assertAttributeEquals("hello", "hello");
+    	out.assertAttributeEquals("translate", "translate");
+    	out.assertAttributeEquals("fun", "fun");
+    	out.assertAttributeEquals("nifi", "nifi");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/178c5cd2/nifi/nifi-nar-bundles/nifi-language-translation-bundle/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-language-translation-bundle/pom.xml b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/pom.xml
new file mode 100644
index 0000000..43573e7
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-language-translation-bundle/pom.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-nar-bundles</artifactId>
+        <version>0.1.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-language-translation-bundle</artifactId>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>nifi-yandex-processors</module>
+        <module>nifi-language-translation-nar</module>
+    </modules>
+
+	<dependencyManagement>
+		<dependencies>
+			<dependency>
+				<groupId>com.sun.jersey</groupId>
+				<artifactId>jersey-client</artifactId>
+				<version>${jersey.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.sun.jersey</groupId>
+				<artifactId>jersey-json</artifactId>
+				<version>${jersey.version}</version>
+			</dependency>
+		</dependencies>
+	</dependencyManagement>
+	
+</project>


[12/50] [abbrv] incubator-nifi git commit: NIFI-506: Initial import of HL7 work

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/NotEqualsEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/NotEqualsEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/NotEqualsEvaluator.java
new file mode 100644
index 0000000..b7c1ce2
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/NotEqualsEvaluator.java
@@ -0,0 +1,32 @@
+/*
+ * 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.hl7.query.evaluator.comparison;
+
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+
+public class NotEqualsEvaluator extends AbstractComparisonEvaluator {
+	
+	public NotEqualsEvaluator(final Evaluator<?> lhs, final Evaluator<?> rhs) {
+		super(lhs, rhs);
+	}
+
+	@Override
+	protected boolean compare(final Object lhs, final Object rhs) {
+		return lhs != null && rhs != null && lhs != rhs && !lhs.equals(rhs) && !lhs.toString().equals(rhs.toString());
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/NotEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/NotEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/NotEvaluator.java
new file mode 100644
index 0000000..58888d9
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/NotEvaluator.java
@@ -0,0 +1,36 @@
+/*
+ * 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.hl7.query.evaluator.comparison;
+
+import java.util.Map;
+
+import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
+
+public class NotEvaluator extends BooleanEvaluator {
+	private final BooleanEvaluator subjectEvaluator;
+	
+	public NotEvaluator(final BooleanEvaluator subjectEvaluator) {
+		this.subjectEvaluator = subjectEvaluator;
+	}
+	
+	@Override
+	public Boolean evaluate(final Map<String, Object> objectMap) {
+		final Boolean subjectValue = subjectEvaluator.evaluate(objectMap);
+		return (subjectValue == null || Boolean.TRUE.equals(subjectValue));
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/NotNullEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/NotNullEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/NotNullEvaluator.java
new file mode 100644
index 0000000..a764fef
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/comparison/NotNullEvaluator.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.hl7.query.evaluator.comparison;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.nifi.hl7.model.HL7Component;
+import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+
+public class NotNullEvaluator extends BooleanEvaluator {
+	private final Evaluator<?> subjectEvaluator;
+	
+	public NotNullEvaluator(final Evaluator<?> subjectEvaluator) {
+		this.subjectEvaluator = subjectEvaluator;
+	}
+	
+	@Override
+	public Boolean evaluate(final Map<String, Object> objectMap) {
+		Object subjectValue = subjectEvaluator.evaluate(objectMap);
+		if ( subjectValue == null ) {
+			return false;
+		}
+		
+		return isNotNull(subjectValue);
+	}
+
+	private boolean isNotNull(Object subjectValue) {
+		if ( subjectValue instanceof HL7Component ) {
+			subjectValue = ((HL7Component) subjectValue).getValue();
+		}
+		
+		if ( subjectValue instanceof Collection ) {
+			final Collection<?> collection = (Collection<?>) subjectValue;
+			if ( collection.isEmpty() ) {
+				return false;
+			}
+			
+			for ( final Object obj : collection ) {
+				if ( isNotNull(obj) ) {
+					return true;
+				}
+			}
+			
+			return false;
+		}
+		
+		return subjectValue != null;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/literal/IntegerLiteralEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/literal/IntegerLiteralEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/literal/IntegerLiteralEvaluator.java
new file mode 100644
index 0000000..c6ff6e4
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/literal/IntegerLiteralEvaluator.java
@@ -0,0 +1,36 @@
+/*
+ * 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.hl7.query.evaluator.literal;
+
+import java.util.Map;
+
+import org.apache.nifi.hl7.query.evaluator.IntegerEvaluator;
+
+public class IntegerLiteralEvaluator extends IntegerEvaluator {
+	private final Integer value;
+	
+	public IntegerLiteralEvaluator(final Integer value) {
+		this.value = value;
+	}
+	
+	
+	@Override
+	public Integer evaluate(final Map<String, Object> objectMap) {
+		return value;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/literal/StringLiteralEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/literal/StringLiteralEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/literal/StringLiteralEvaluator.java
new file mode 100644
index 0000000..3b29611
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/literal/StringLiteralEvaluator.java
@@ -0,0 +1,35 @@
+/*
+ * 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.hl7.query.evaluator.literal;
+
+import java.util.Map;
+
+import org.apache.nifi.hl7.query.evaluator.StringEvaluator;
+
+public class StringLiteralEvaluator extends StringEvaluator {
+	private final String value;
+	
+	public StringLiteralEvaluator(final String value) {
+		this.value = value;
+	}
+	
+	@Override
+	public String evaluate(final Map<String, Object> objectMap) {
+		return value;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/logic/AndEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/logic/AndEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/logic/AndEvaluator.java
new file mode 100644
index 0000000..21f596e
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/logic/AndEvaluator.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.hl7.query.evaluator.logic;
+
+import java.util.Map;
+
+import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
+
+public class AndEvaluator extends BooleanEvaluator {
+	private final BooleanEvaluator lhs;
+	private final BooleanEvaluator rhs;
+	
+	public AndEvaluator(final BooleanEvaluator lhs, final BooleanEvaluator rhs) {
+		this.lhs = lhs;
+		this.rhs = rhs;
+	}
+	
+	@Override
+	public Boolean evaluate(final Map<String, Object> objectMap) {
+		final Boolean lhsValue = lhs.evaluate(objectMap);
+		if ( lhsValue == null || Boolean.FALSE.equals(lhsValue) ) {
+			return false;
+		}
+		
+		final Boolean rhsValue = rhs.evaluate(objectMap);
+		return (rhsValue != null && Boolean.TRUE.equals(rhsValue));
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/logic/OrEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/logic/OrEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/logic/OrEvaluator.java
new file mode 100644
index 0000000..d090946
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/logic/OrEvaluator.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.hl7.query.evaluator.logic;
+
+import java.util.Map;
+
+import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
+
+public class OrEvaluator extends BooleanEvaluator {
+	private final BooleanEvaluator lhs;
+	private final BooleanEvaluator rhs;
+	
+	public OrEvaluator(final BooleanEvaluator lhs, final BooleanEvaluator rhs) {
+		this.lhs = lhs;
+		this.rhs = rhs;
+	}
+	
+	@Override
+	public Boolean evaluate(final Map<String, Object> objectMap) {
+		final Boolean lhsValue = lhs.evaluate(objectMap);
+		if ( lhsValue != null && Boolean.TRUE.equals(lhsValue) ) {
+			return true;
+		}
+		
+		final Boolean rhsValue = rhs.evaluate(objectMap);
+		return (rhsValue != null && Boolean.TRUE.equals(rhsValue));
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/DeclaredReferenceEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/DeclaredReferenceEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/DeclaredReferenceEvaluator.java
new file mode 100644
index 0000000..6afb8d7
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/DeclaredReferenceEvaluator.java
@@ -0,0 +1,42 @@
+/*
+ * 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.hl7.query.evaluator.message;
+
+import java.util.Map;
+
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+import org.apache.nifi.hl7.query.evaluator.StringEvaluator;
+
+public class DeclaredReferenceEvaluator implements Evaluator<Object> {
+	private final StringEvaluator referenceNameEvaluator;
+	
+	public DeclaredReferenceEvaluator(final StringEvaluator referenceNameEvaluator) {
+		this.referenceNameEvaluator = referenceNameEvaluator;
+	}
+	
+	@Override
+	public Object evaluate(final Map<String, Object> objectMap) {
+		final String referenceName = referenceNameEvaluator.evaluate(objectMap);
+		return objectMap.get(referenceName);
+	}
+
+	@Override
+	public Class<? extends Object> getType() {
+		return Object.class;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/DotEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/DotEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/DotEvaluator.java
new file mode 100644
index 0000000..c5fbf41
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/DotEvaluator.java
@@ -0,0 +1,88 @@
+/*
+ * 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.hl7.query.evaluator.message;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.nifi.hl7.model.HL7Component;
+import org.apache.nifi.hl7.model.HL7Message;
+import org.apache.nifi.hl7.model.HL7Segment;
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+import org.apache.nifi.hl7.query.evaluator.IntegerEvaluator;
+
+public class DotEvaluator implements Evaluator<Object> {
+	private final Evaluator<?> lhs;
+	private final IntegerEvaluator rhs;
+	
+	public DotEvaluator(final Evaluator<?> lhs, final IntegerEvaluator rhs) {
+		this.lhs = lhs;
+		this.rhs = rhs;
+	}
+	
+	@Override
+	public Object evaluate(final Map<String, Object> objectMap) {
+		final Object lhsValue = this.lhs.evaluate(objectMap);
+		final Integer rhsValue = this.rhs.evaluate(objectMap);
+		
+		if ( lhsValue == null || rhsValue == null ) {
+			return null;
+		}
+		
+		final List<Object> results = new ArrayList<>();
+		if ( lhsValue instanceof Collection ) {
+			final Collection<?> lhsCollection = (Collection<?>) lhsValue;
+			for ( final Object obj : lhsCollection ) {
+				final Object val = getValue(obj, rhsValue);
+				results.add(val);
+			}
+		} else {
+			final Object val = getValue(lhsValue, rhsValue);
+			return val;
+		}
+		
+		return results;
+	}
+	
+	private Object getValue(final Object lhsValue, final int rhsValue) {
+		final List<?> list;
+		if ( lhsValue instanceof HL7Message ) {
+			list = ((HL7Message) lhsValue).getSegments();
+		} else if ( lhsValue instanceof HL7Segment ) {
+			list = ((HL7Segment) lhsValue).getFields();
+		} else if ( lhsValue instanceof HL7Component ) {
+			list = ((HL7Component) lhsValue).getComponents();
+		} else {
+			return null;
+		}
+		
+		if ( rhsValue > list.size() ) {
+			return null;
+		}
+		
+		// convert from 0-based to 1-based
+		return list.get(rhsValue - 1);
+	}
+
+	@Override
+	public Class<? extends Object> getType() {
+		return Object.class;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/FieldEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/FieldEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/FieldEvaluator.java
new file mode 100644
index 0000000..869c2d0
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/FieldEvaluator.java
@@ -0,0 +1,67 @@
+/*
+ * 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.hl7.query.evaluator.message;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.nifi.hl7.model.HL7Field;
+import org.apache.nifi.hl7.model.HL7Segment;
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+import org.apache.nifi.hl7.query.evaluator.IntegerEvaluator;
+
+@SuppressWarnings("rawtypes")
+public class FieldEvaluator implements Evaluator<List> {
+	private final SegmentEvaluator segmentEvaluator;
+	private final IntegerEvaluator indexEvaluator;
+	
+	public FieldEvaluator(final SegmentEvaluator segmentEvaluator, final IntegerEvaluator indexEvaluator) {
+		this.segmentEvaluator = segmentEvaluator;
+		this.indexEvaluator = indexEvaluator;
+	}
+	
+	public List<HL7Field> evaluate(final Map<String, Object> objectMap) {
+		final List<HL7Segment> segments = segmentEvaluator.evaluate(objectMap);
+		if ( segments == null ) {
+			return Collections.emptyList();
+		}
+		
+		final Integer index = indexEvaluator.evaluate(objectMap);
+		if ( index == null ) {
+			return Collections.emptyList();
+		}
+		
+		final List<HL7Field> fields = new ArrayList<>();
+		for ( final HL7Segment segment : segments ) {
+			final List<HL7Field> segmentFields = segment.getFields();
+			if ( segmentFields.size() <= index ) {
+				continue;
+			}
+			
+			fields.add(segmentFields.get(index));
+		}
+		
+		return fields;
+	}
+
+	public Class<? extends List> getType() {
+		return List.class;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/MessageEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/MessageEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/MessageEvaluator.java
new file mode 100644
index 0000000..5e08961
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/MessageEvaluator.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.hl7.query.evaluator.message;
+
+import java.util.Map;
+
+import org.apache.nifi.hl7.model.HL7Message;
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+
+public class MessageEvaluator implements Evaluator<HL7Message> {
+
+	public HL7Message evaluate(final Map<String, Object> objectMap) {
+		return (HL7Message) objectMap.get(Evaluator.MESSAGE_KEY);
+	}
+
+	public Class<? extends HL7Message> getType() {
+		return HL7Message.class;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/SegmentEvaluator.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/SegmentEvaluator.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/SegmentEvaluator.java
new file mode 100644
index 0000000..1b9782d
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/evaluator/message/SegmentEvaluator.java
@@ -0,0 +1,51 @@
+/*
+ * 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.hl7.query.evaluator.message;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.nifi.hl7.model.HL7Message;
+import org.apache.nifi.hl7.model.HL7Segment;
+import org.apache.nifi.hl7.query.evaluator.Evaluator;
+import org.apache.nifi.hl7.query.evaluator.StringEvaluator;
+
+@SuppressWarnings("rawtypes")
+public class SegmentEvaluator implements Evaluator<List> {
+	private final StringEvaluator segmentTypeEvaluator;
+	
+	public SegmentEvaluator(final StringEvaluator segmentTypeEvaluator) {
+		this.segmentTypeEvaluator = segmentTypeEvaluator;
+	}
+	
+	public List<HL7Segment> evaluate(final Map<String, Object> objectMap) {
+		final String segmentType = segmentTypeEvaluator.evaluate(objectMap);
+		if ( segmentType == null ) {
+			return Collections.emptyList();
+		}
+		
+		final HL7Message message = (HL7Message) objectMap.get(Evaluator.MESSAGE_KEY);
+		final List<HL7Segment> segments = message.getSegments(segmentType);
+		return (segments == null) ? Collections.<HL7Segment>emptyList() : segments;
+	}
+
+	public Class<? extends List> getType() {
+		return List.class;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/exception/HL7QueryParsingException.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/exception/HL7QueryParsingException.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/exception/HL7QueryParsingException.java
new file mode 100644
index 0000000..998f3bc
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/exception/HL7QueryParsingException.java
@@ -0,0 +1,37 @@
+/*
+ * 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.hl7.query.exception;
+
+public class HL7QueryParsingException extends RuntimeException {
+	private static final long serialVersionUID = 1L;
+
+	public HL7QueryParsingException() {
+		super();
+	}
+	
+	public HL7QueryParsingException(final Throwable cause) {
+		super(cause);
+	}
+	
+	public HL7QueryParsingException(final String message) {
+		super(message);
+	}
+	
+	public HL7QueryParsingException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/result/MissedResult.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/result/MissedResult.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/result/MissedResult.java
new file mode 100644
index 0000000..a6b36c8
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/result/MissedResult.java
@@ -0,0 +1,56 @@
+/*
+ * 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.hl7.query.result;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.nifi.hl7.query.QueryResult;
+import org.apache.nifi.hl7.query.ResultHit;
+import org.apache.nifi.hl7.query.Selection;
+
+public class MissedResult implements QueryResult {
+	private final List<Selection> selections;
+	
+	public MissedResult(final List<Selection> selections) {
+		this.selections = selections;
+	}
+	
+	@Override
+	public List<String> getLabels() {
+		final List<String> labels = new ArrayList<>();
+		for ( final Selection selection : selections ) {
+			labels.add(selection.getName());
+		}
+		return labels;
+	}
+
+	@Override
+	public boolean isMatch() {
+		return false;
+	}
+
+	@Override
+	public ResultHit nextHit() {
+		return null;
+	}
+	
+	@Override
+	public int getHitCount() {
+		return 0;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/result/StandardQueryResult.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/result/StandardQueryResult.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/result/StandardQueryResult.java
new file mode 100644
index 0000000..fbc16ca
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/result/StandardQueryResult.java
@@ -0,0 +1,69 @@
+/*
+ * 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.hl7.query.result;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.nifi.hl7.query.QueryResult;
+import org.apache.nifi.hl7.query.ResultHit;
+import org.apache.nifi.hl7.query.Selection;
+
+public class StandardQueryResult implements QueryResult {
+	private final List<Selection> selections;
+	private final Set<Map<String, Object>> hits;
+	private final Iterator<Map<String, Object>> hitIterator;
+	
+	public StandardQueryResult(final List<Selection> selections, final Set<Map<String, Object>> hits) {
+		this.selections = selections;
+		this.hits = hits;
+		
+		hitIterator = hits.iterator();
+	}
+	
+	@Override
+	public boolean isMatch() {
+		return !hits.isEmpty();
+	}
+
+	@Override
+	public List<String> getLabels() {
+		final List<String> labels = new ArrayList<>();
+		for ( final Selection selection : selections ) {
+			labels.add(selection.getName());
+		}
+		return labels;
+	}
+
+	@Override
+	public int getHitCount() {
+		return hits.size();
+	}
+	
+	@Override
+	public ResultHit nextHit() {
+		if ( hitIterator.hasNext() ) {
+			return new StandardResultHit(hitIterator.next());
+		} else {
+			return null;
+		}
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/result/StandardResultHit.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/result/StandardResultHit.java b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/result/StandardResultHit.java
new file mode 100644
index 0000000..944e998
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/java/org/apache/nifi/hl7/query/result/StandardResultHit.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.hl7.query.result;
+
+import java.util.Collections;
+import java.util.Map;
+
+import org.apache.nifi.hl7.query.ResultHit;
+
+public class StandardResultHit implements ResultHit {
+	private final Map<String, Object> values;
+	
+	public StandardResultHit(final Map<String, Object> values) {
+		this.values = values;
+	}
+	
+	@Override
+	public Object getValue(final String label) {
+		return values.get(label);
+	}
+
+	@Override
+	public Map<String, Object> getSelectedValues() {
+		return Collections.unmodifiableMap(values);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/test/java/org/apache/nifi/hl7/query/TestHL7Query.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/java/org/apache/nifi/hl7/query/TestHL7Query.java b/nifi/nifi-commons/nifi-hl7-query-language/src/test/java/org/apache/nifi/hl7/query/TestHL7Query.java
new file mode 100644
index 0000000..fbe4a8d
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/java/org/apache/nifi/hl7/query/TestHL7Query.java
@@ -0,0 +1,352 @@
+/*
+ * 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.hl7.query;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.nifi.hl7.hapi.HapiMessage;
+import org.apache.nifi.hl7.model.HL7Field;
+import org.apache.nifi.hl7.model.HL7Message;
+import org.apache.nifi.hl7.query.HL7Query;
+import org.apache.nifi.hl7.query.QueryResult;
+import org.junit.Test;
+
+import ca.uhn.hl7v2.DefaultHapiContext;
+import ca.uhn.hl7v2.HL7Exception;
+import ca.uhn.hl7v2.HapiContext;
+import ca.uhn.hl7v2.model.Message;
+import ca.uhn.hl7v2.parser.PipeParser;
+import ca.uhn.hl7v2.validation.impl.ValidationContextFactory;
+
+@SuppressWarnings("resource")
+public class TestHL7Query {
+
+	@Test
+	public void testAssignAliases() {
+		final LinkedHashMap<String, List<Object>> possibleValueMap = new LinkedHashMap<>();
+		
+		final List<Object> valuesA = new ArrayList<>();
+		valuesA.add("a");
+		valuesA.add("b");
+		valuesA.add("c");
+		
+		final List<Object> valuesB = new ArrayList<>();
+		valuesB.add("d");
+		
+		final List<Object> valuesC = new ArrayList<>();
+		valuesC.add("e");
+		valuesC.add("f");
+		
+		final List<Object> valuesD = new ArrayList<>();
+		valuesD.add("g");
+		valuesD.add("h");
+		
+		possibleValueMap.put("A", valuesA);
+		possibleValueMap.put("B", valuesB);
+		possibleValueMap.put("C", valuesC);
+		possibleValueMap.put("D", valuesD);
+		
+		for (int i=0; i < valuesA.size() * valuesB.size() * valuesC.size() * valuesD.size(); i++) {
+			System.out.println(i + " : " + HL7Query.assignAliases(possibleValueMap, i));
+		}
+		
+		verifyAssignments(HL7Query.assignAliases(possibleValueMap, 0), "a", "d", "e", "g");
+		verifyAssignments(HL7Query.assignAliases(possibleValueMap, 1), "b", "d", "e", "g");
+		verifyAssignments(HL7Query.assignAliases(possibleValueMap, 2), "c", "d", "e", "g");
+		verifyAssignments(HL7Query.assignAliases(possibleValueMap, 3), "a", "d", "f", "g");
+		verifyAssignments(HL7Query.assignAliases(possibleValueMap, 4), "b", "d", "f", "g");
+		verifyAssignments(HL7Query.assignAliases(possibleValueMap, 5), "c", "d", "f", "g");
+		verifyAssignments(HL7Query.assignAliases(possibleValueMap, 6), "a", "d", "e", "h");
+		verifyAssignments(HL7Query.assignAliases(possibleValueMap, 7), "b", "d", "e", "h");
+		verifyAssignments(HL7Query.assignAliases(possibleValueMap, 8), "c", "d", "e", "h");
+		verifyAssignments(HL7Query.assignAliases(possibleValueMap, 9), "a", "d", "f", "h");
+		verifyAssignments(HL7Query.assignAliases(possibleValueMap, 10), "b", "d", "f", "h");
+		verifyAssignments(HL7Query.assignAliases(possibleValueMap, 11), "c", "d", "f", "h");
+	}
+	
+	private void verifyAssignments(final Map<String, Object> map, final String a, final String b, final String c, final String d) {
+		assertEquals(a, map.get("A"));
+		assertEquals(b, map.get("B"));
+		assertEquals(c, map.get("C"));
+		assertEquals(d, map.get("D"));
+	}
+	
+	@Test
+	public void testSelectMessage() throws HL7Exception, IOException {
+		final HL7Query query = HL7Query.compile("SELECT MESSAGE");
+		final HL7Message msg = createMessage(new File("src/test/resources/vaers-message-long"));
+		final QueryResult result = query.evaluate(msg);
+		assertTrue(result.isMatch());
+		final List<String> labels = result.getLabels();
+		assertEquals(1, labels.size());
+		assertEquals("MESSAGE", labels.get(0));
+		
+		assertEquals(1, result.getHitCount());
+		assertEquals(msg, result.nextHit().getValue("MESSAGE"));
+	}
+	
+	@Test
+	@SuppressWarnings({ "unchecked", "rawtypes" })
+	public void testSelectField() throws HL7Exception, IOException {
+		final HL7Query query = HL7Query.compile("SELECT PID.5");
+		final HL7Message msg = createMessage(new File("src/test/resources/unsolicited-vaccine-update-short"));
+		final QueryResult result = query.evaluate(msg);
+		assertTrue(result.isMatch());
+		final List<String> labels = result.getLabels();
+		assertEquals(1, labels.size());
+		assertEquals(1, result.getHitCount());
+		
+		final Object names = result.nextHit().getValue("PID.5");
+		assertTrue(names instanceof List);
+		final List<Object> nameList = (List) names;
+		assertEquals(1, nameList.size());
+		final HL7Field nameField = (HL7Field) nameList.get(0);
+		assertEquals("KENNEDY^JOHN^FITZGERALD^JR", nameField.getValue());
+	}
+	
+	@Test
+	public void testSelectAbnormalTestResult() throws HL7Exception, IOException {
+		final String query = "DECLARE result AS REQUIRED OBX SELECT result WHERE result.7 != 'N' AND result.1 = 1";
+		
+		final HL7Query hl7Query = HL7Query.compile(query);
+		final QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/vaers-message-long")));
+		assertFalse( result.isMatch() );
+	}
+	
+	
+	@Test
+	public void testFieldEqualsString() throws HL7Exception, IOException {
+		HL7Query hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.7 = 'L'");
+		QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+		
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.7 = 'H'");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertFalse( result.isMatch() );
+	}
+	
+	@Test
+	public void testLessThan() throws HL7Exception, IOException {
+		HL7Query hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.4 < 600");
+		QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+		
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.4 < 59");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertFalse( result.isMatch() );
+	}
+	
+	@Test
+	public void testCompareTwoFields() throws HL7Exception, IOException {
+		HL7Query hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.4 < result.6.2");
+		QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+		
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE NOT(result.4 > result.6.3)");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertFalse( result.isMatch() );
+	}
+	
+	@Test
+	public void testLessThanOrEqual() throws HL7Exception, IOException {
+		HL7Query hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.4 <= 59");
+		QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.4 <= 600");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.4 <= 58");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertFalse( result.isMatch() );
+	}
+	
+	@Test
+	public void testGreaterThanOrEqual() throws HL7Exception, IOException {
+		HL7Query hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.4 >= 59");
+		QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.4 >= 6");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.4 >= 580");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertFalse( result.isMatch() );
+	}
+	
+	@Test
+	public void testGreaterThan() throws HL7Exception, IOException {
+		HL7Query hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.4 > 58");
+		QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.4 > 6");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.4 > 580");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertFalse( result.isMatch() );
+	}
+
+	
+	@Test
+	public void testDistinctValuesReturned() throws HL7Exception, IOException {
+		HL7Query hl7Query = HL7Query.compile("DECLARE result1 AS REQUIRED OBX, result2 AS REQUIRED OBX SELECT MESSAGE WHERE result1.7 = 'L' OR result2.7 != 'H'");
+		QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+		assertEquals(1, result.getHitCount());
+		
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT result WHERE result.1 = 1");
+		HL7Message msg = createMessage(new File("src/test/resources/vaers-message-long"));
+		result = hl7Query.evaluate(msg);
+		assertTrue( result.isMatch() );
+		assertEquals(9, result.getHitCount());
+		
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT result WHERE result.1 = 1 AND result.3.1.1 = '30961-7'");
+		result = hl7Query.evaluate(msg);
+		assertTrue( result.isMatch() );
+		assertEquals(1, result.getHitCount());
+
+	}
+	
+	@Test
+	public void testAndWithParens() throws HL7Exception, IOException {
+		HL7Query hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.7 = 'L' AND result.3.1 = 'GLU'");
+		QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+		
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.7 = 'L' AND result.3.1 = 'GLU'");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hyperglycemia")));
+		assertFalse( result.isMatch() );
+		
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.7 = 'H' AND result.3.1 = 'GLU'");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertFalse( result.isMatch() );
+
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.7 = 'H' AND result.3.1 = 'GLU'");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hyperglycemia")));
+		assertTrue( result.isMatch() );
+
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE (result.7 = 'H') AND (result.3.1 = 'GLU')");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hyperglycemia")));
+		assertTrue( result.isMatch() );
+
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE ((result.7 = 'H') AND (result.3.1 = 'GLU'))");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hyperglycemia")));
+		assertTrue( result.isMatch() );
+
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE (( ((result.7 = 'H')) AND ( ((result.3.1 = 'GLU')) )))");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hyperglycemia")));
+		assertTrue( result.isMatch() );
+
+	}
+	
+	
+	@Test
+	public void testIsNull() throws HL7Exception, IOException {
+		HL7Query hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.999 IS NULL");
+		QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+		
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.1 IS NULL");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertFalse( result.isMatch() );
+		
+		hl7Query = HL7Query.compile("SELECT MESSAGE WHERE ZZZ IS NULL");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+		
+		hl7Query = HL7Query.compile("SELECT MESSAGE WHERE OBX IS NULL");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertFalse( result.isMatch() );
+
+		hl7Query = HL7Query.compile("SELECT MESSAGE WHERE NK1.1 = '1' AND NK1.8 IS NULL");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/unsolicited-vaccine-update-long")));
+		assertTrue( result.isMatch() );
+	}
+	
+	
+	@Test
+	public void testNotNull() throws HL7Exception, IOException {
+		HL7Query hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.999 NOT NULL");
+		QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertFalse( result.isMatch() );
+		
+		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.1 NOT NULL");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+		
+		hl7Query = HL7Query.compile("SELECT MESSAGE WHERE ZZZ NOT NULL");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertFalse( result.isMatch() );
+		
+		hl7Query = HL7Query.compile("SELECT MESSAGE WHERE OBX NOT NULL");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
+
+		hl7Query = HL7Query.compile("SELECT MESSAGE WHERE NK1.1 = '1' AND NK1.33 NOT NULL");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/unsolicited-vaccine-update-long")));
+		assertTrue( result.isMatch() );
+		
+		hl7Query = HL7Query.compile("SELECT MESSAGE WHERE NK1.1 = 1 AND NK1.33 NOT NULL");
+		result = hl7Query.evaluate(createMessage(new File("src/test/resources/unsolicited-vaccine-update-long")));
+		assertTrue( result.isMatch() );
+	}
+	
+	private HL7Message createMessage(final File file) throws HL7Exception, IOException {
+		final byte[] bytes = Files.readAllBytes(file.toPath());
+		final String msgText = new String(bytes, "UTF-8");
+		
+		final HapiContext hapiContext = new DefaultHapiContext();
+		hapiContext.setValidationContext(ValidationContextFactory.noValidation());
+		
+		final PipeParser parser = hapiContext.getPipeParser();
+		final Message message = parser.parse(msgText);
+		return new HapiMessage(message);
+	}
+	
+	@Test
+	@SuppressWarnings("unused")
+	public void createMessage() throws IOException, HL7Exception {
+		final byte[] bytes = Files.readAllBytes(Paths.get("src/test/resources/vaers-message-long"));
+		final String msgText = new String(bytes, "UTF-8");
+		
+		final HapiContext hapiContext = new DefaultHapiContext();
+		hapiContext.setValidationContext(ValidationContextFactory.noValidation());
+		
+		final PipeParser parser = hapiContext.getPipeParser();
+		final Message message = parser.parse(msgText);
+		
+		final HL7Message hl7Msg = new HapiMessage(message);
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia
new file mode 100644
index 0000000..dc44b89
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia
@@ -0,0 +1,5 @@
+MSH|^~\&|CERNER||PriorityHealth||||ORU^R01|Q479004375T431430612|P|2.3|
+PID|||001677980||SMITH^CURTIS||19680219|M||||||||||929645156318|123456789|
+PD1||||1234567890^LAST^FIRST^M^^^^^NPI|
+OBR|1|341856649^HNAM_ORDERID|000002006326002362|648088^Basic Metabolic Panel|||20061122151600|||||||||1620^Hooker^Robert^L||||||20061122154733|||F|||||||||||20061122140000|
+OBX|1|NM|GLU^Glucose Lvl|159|mg/dL|65-99^65^99|H|||F|||20061122154733|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia
new file mode 100644
index 0000000..02e8967
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia
@@ -0,0 +1,5 @@
+MSH|^~\&|CERNER||PriorityHealth||||ORU^R01|Q479004375T431430612|P|2.3|
+PID|||001677980||SMITH^CURTIS||19680219|M||||||||||929645156318|123456789|
+PD1||||1234567890^LAST^FIRST^M^^^^^NPI|
+OBR|1|341856649^HNAM_ORDERID|000002006326002362|648088^Basic Metabolic Panel|||20061122151600|||||||||1620^Hooker^Robert^L||||||20061122154733|||F|||||||||||20061122140000|
+OBX|1|NM|GLU^Glucose Lvl|59|mg/dL|65-99^65^99|L|||F|||20061122154733|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/metabolic-panel
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/metabolic-panel b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/metabolic-panel
new file mode 100644
index 0000000..c62fc45
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/metabolic-panel
@@ -0,0 +1,23 @@
+MSH|^~\&|Lab1^1234^CLIA|^1234^CLIA|ELR^2.16.840.1.113883.19.3.2^ISO|SPH^2.16.840.1.113883.19.3.2^ISO|20110410140502-0500||ORU^R01^ORU_R01|1234567890|P^T|2.5.1|||NE|NE|USA||||USELR1.0^^2.16.840.1.114222.4.10.3^ISO 
+SFT|1|Level Seven Healthcare Software, Inc.^L^^^^&2.16.840.1.113883.19.4.6^ISO^XX^^^1234|1.2|An Lab System|56734||20080817 
+PID|1||36363636^^^MPI&2.16.840.1.113883.19.3.2.1&ISO^MR^A&2.16.840.1.113883.19.3.2.1&ISO~444333333^^^&2.16.840.1.113883.4.1^IS O^SS||Everyman^Adam^A^^^^L^^^^^^^BS|Mum^Martha^M^^^^M|19800602|M||2106-3^White^CDCREC^^^^04/24/2007|2222 Home Street^^Ann Arbor^MI^99999^USA^H||^PRN^PH^^1^555^5552004|^WPN^PH^^1^955^5551009|eng^English^ISO6392^^^^3/29/2007|M^Married^HL70002^^^^2.5.1||||||N^Not Hispanic or Latino^HL70189^^^^2.5.1||||||||N|||200808151000-0700| Reliable^2.16.840.1.113883.19.3.1^ISO 
+ORC|RE|23456^EHR^2.16.840.1.113883.19.3.2.3^ISO|9700123^Lab^2.16.840.1.113883.19.3.1.6^ISO|||||||||1234^Admit^Alan^A^III^Dr^^^&2.16.840.1.113883.19.4.6^ISO^L^^^EI^&2.16.840.1.113883.19.4.6^ISO^^^^^^^^MD||^WPN^PH^^1^555^5551005|||||||Level Seven Healthcare, Inc.^L^^^^&2.16.840.1.113883.19.4.6^ISO^XX^^^1234|1005 Healthcare Drive^^Ann Arbor^MI^99999^USA^B|^WPN^PH^^1^555^5553001|4444 Healthcare Drive^Suite 123^Ann Arbor^MI^99999^USA^B 
+OBR|1|23456^EHR^2.16.840.1.113883.19.3.2.3^ISO|9700123^Lab^2.16.840.1.113883.19.3.1.6^ISO|24323-8^Comprehensive metabolic 2000 panel in Serum or Plasma^LN^3436442^Metaboloic Panel 2000, Comprehensive^99USI|||201104101130-0500||||||angina|||1234^Admit^Alan^A^III^Dr^^^&2.16.840.1.113883.19.4.6^ISO^L^^^EI^&2.16.840.1.113883.19.4.6^ISO^^^^^^^^MD|^WPN^PH^^1^555^5551005|||||201104101405-0500|||F||||||413^Angina pectoris^I9CDX^^^^07/09/2008|1235&Slide&Stan&S&&Dr&MD&&DOC&2.16.840.1.113883.19.4.6&ISO 
+OBX|1|NM|17861-6^Calcium [Mass/volume] in Serum or Plasma^LN||27.3|mg/dL^milligrams per deciliter^UCUM|8.7-10.7|HH|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|2|NM|3094-0^Urea nitrogen [Mass/volume] in Serum of Plasma^LN||15|mg/dL^milligrams per deciliter^UCUM|6 to 23|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|3|NM|2160-0^Creatinine [Mass/volume] in Serum or Plasma^LN||1.8|mg/dL^milligrams per deciliter^UCUM|0.7 to 1.2|H|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|4|NM|3097-3^Urea nitrogen/Creatinine [Mass ratio] in Serum or Plasma^LN||15||6 to 25|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI
+OBX|5|NM|2885-2^Protein [Mass/volume] in Serum or Plasma^LN||8.9|gm/dL^grams per deciliter^UCUM|6.3 to 8.2|H|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|6|NM|1751-7^Albumin [Mass/volume] in Serum or Plasma^LN||5.7|gm/dL^grams per deciliter^UCUM|3.5 to 5.0|H|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|7|NM|2336-6^Globulin [Mass/volume] in Serum or Plasma^LN||4.7|gm/dL^grams per deciliter^UCUM|2.2 to 4.2|H|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|8|NM|1759-0^Albumin/Globulin [Mass ratio] in Serum or Plasma^LN||1.7||0.8 to 2.0|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI
+OBX|9|NM|1975-2^Bilirubin.total [Mass/volume] in Serum or Plasma^LN||0.7|mg/dL^milligrams per deciliter^UCUM|0.3 to 1.9|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|10|NM|2345-7^Glucose [Mass/volume] in Serum or Plasma^LN||55|mg/dL^milligrams per deciliter^UCUM|60 to 109|L|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|11|NM|6768-6^Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma^LN||64|U/L^units per liter^UCUM|32 to 110|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|12|NM|1920-8^Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma^LN||6|U/L^units per liter^UCUM|6 to 18|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|13|NM|1742-6^Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma^LN||10|U/L^units per liter^UCUM|5 to 35|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|14|NM|2951-2^Sodium [Moles/volume] in Serum or Plasma^LN||140|mmol/L^millimoles per liter^UCUM|137 to 147|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|15|NM|2823-3^Potassium [Moles/volume] in Serum or Plasma^LN||4.5|mmol/L^millimoles per liter^UCUM|3.4 to 5.3|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|16|NM|2075-0^Chloride [Moles/volume] in Serum or Plasma^LN||99|mmol/L^millimoles per liter^UCUM|99 to 108|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+OBX|17|NM|2028-9^Carbon dioxide, total [Moles/volume] in Serum or Plasma^LN||27|mmol/L^millimoles per liter^UCUM|22 to 29|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
+SPM|1|23456&EHR&2.16.840.1.113883.19.3.2.3&ISO^9700122&Lab&2.16.840.1.113883.19.3.1.6&ISO||119364003^Serum specimen^SCT^^^^20080131|||||||||||||201104101130-0500|201104101130-0500

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-long
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-long b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-long
new file mode 100644
index 0000000..8edd3fd
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-long
@@ -0,0 +1,16 @@
+MSH|^~\&||MA0000||GA0000|19970901||VXU^V04|19970522MA53|T|2.3.1|||AL
+PID|||1234^^^^SR^~1234-12^^^^LR^~3872^^^^MR~221345671^^^^SS^~430078856^^^^MA^ ||KENNEDY^JOHN^FITZGERALD^JR^^^L|BOUVIER^^^^^^M|19900607|M|KENNEDY^BABY BOY^^^^^^ B|W^WHITE^NY8 RACE CODES^W^WHITE^HL70005|123 MAIN ST^APT 3B^LEXINGTON^MA^00210^ ^M^MSA CODE^MA034~345 ELM ST^^BOSTON^MA^00314^^BLD~^^^^^^BR^^MA002| |(617) 555-1212 ^PRN^PH^^^617^5551212^^||EN^ENGLISH^HL70296^^^|||||||WN^NOT HISPANIC^LOCAL CODE SET^NH^NOT OF HISPANIC ORIGIN^HL70189|CHILDREN=S HOSPITAL
+PD1|||CHILDREN=S HOSPITAL^^1234^^^^XX~LEXINGTON CLINIC^^1234A^^^^FI|12345^CARE^ PRIMARY^^^DR^MD^^^L^^^DN|||||||03^REMINDER/RECALL - NO CALLS^HL70215|Y
+NK1|1|KENNEDY^JACQUELINE^LEE|32^MOTHER^HL70063||||||||||||||||||||||||||||||898666725^^^^SS
+NK1|2|KENNEDY^JOHN^FITZGERALD|33^FATHER^HL70063||||||||||||||||||||||||||||||822546618^^^^SS
+PV1||R|||||||||||||||A|||V02^19900607~H02^19900607
+RXA|0|1|19900607|19900607|08^HEPB-PEDIATRIC/ADOLESCENT^CVX^90744^HEPB-PEDATRIC/ADOLESCENT^CPT|.5|ML^^ISO+||03^HISTORICAL INFORMATION - FROM PARENT=S WRITTEN RECORD^NIP0001|^JONES^LISA|^^^CHILDREN=S HOSPITAL||5|MCG^^ISO+|MRK12345| 199206|MSD^MERCK^MVX
+RXA|0|4|19910907|19910907|50^DTAP-HIB^CVX^90721^DTAP-HIB^CPT|.5|ML^^ISO+||00^NEW IMMUNIZATION RECORD^NIP0001|1234567890^SMITH^SALLY^S^^^^^^^^^VEI~1234567891 ^O=BRIAN^ROBERT^A^^DR^MD^^^^^^OEI|^^^CHILD HEALTHCARE CLINIC^^^^^101 MAIN STREET^^ BOSTON^MA||||W46932777|199208|PMC^PASTEUR MERIEUX CONNAUGHT^MVX|||CP|A| 19910907120030
+RXR|IM^INTRAMUSCULAR^HL70162|LA^LEFT ARM^HL70163
+RXA|0|1|19910907|19910907|03^MMR^CVX|.5|ML^^ISO+|||1234567890^SMITH^SALLY^S^^^^^^^^^VEI~1234567891^O=BRIAN^ROBERT^A^^DR^MD^^^^^^OEI|^^^CHILD HEALTHCARE CLINIC^^^^^101 MAIN STREET^^BOSTON^MA||||W2348796456|19920731|MSD^MERCK^MVX
+RXR|SC^SUBCUTANEOUS^HL70162|LA^LEFT ARM^HL70163
+RXA|0|5|19950520|19950520|20^DTAP^CVX|.5|ML^^ISO+|||1234567891^O=BRIAN^ROBERT^A^^DR|^^^CHILD HEALTHCARE CLINIC^^^^^101 MAIN STREET^^BOSTON^MA||||W22532806|19950705|PMC^ PASTEUR MERIEUX CONNAUGHT^MVX
+RXR|IM^INTRAMUSCULAR^HL70162|LA^LEFT ARM^HL70163
+NTE|PATIENT DEVELOPED HIGH FEVER APPROX 3 HRS AFTER VACCINE INJECTION
+RXA|0|2|19950520|19950520|03^MMR^CVX|.5|ML^^ISO+|||1234567891^O=BRIAN^ROBERT^A^^DR|^^^CHILD HEALTHCARE CLINIC^^^^^101 MAIN STREET^^BOSTON^MA||||W2341234567|19950630| MSD^MERCK^MVX
+RXR|SC^SUBCUTANEOUS^HL70162|LA^LEFT ARM^HL70163

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-short
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-short b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-short
new file mode 100644
index 0000000..c3e7cf0
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-short
@@ -0,0 +1,4 @@
+MSH|^~\&|||||||VXU^V04|19970522MA53|P|2.3.1
+PID|||221345671^^^^SS||KENNEDY^JOHN^FITZGERALD^JR|BOUVIER^^^^^^M|19900607|M|||^^^^MA^^^BLD
+NK1|1|KENNEDY^JACQUELINE^LEE|32^MOTHER^HL70063
+RXA|0|1|19900607|19900607|08^HEPB-PEDIATRIC/ADOLESCENT^CVX|.5|ML^^ISO+||||||||MRK12345||MSD^MERCK^MVX

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaccine-query
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaccine-query b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaccine-query
new file mode 100644
index 0000000..1bd47b2
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaccine-query
@@ -0,0 +1,3 @@
+MSH|^~\&||GA0000||MA0000|199705221605||VXQ^V01|19970522GA40|T|2.3.1|||AL
+QRD|199705221605|R|I|19970522GA05|||25^RD|^KENNEDY^JOHN^FITZGERALD^JR|VXI^VACCINE INFORMATION^HL70048|^SIIS
+QRF|MA0000||||256946789~19900607~MA~MA99999999~88888888~KENNEDY^JACQUELINE^LEE~BOUVIER~898666725~KENNEDY^JOHN^FITZGERALD~822546618

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaers-message-long
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaers-message-long b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaers-message-long
new file mode 100644
index 0000000..888b04c
--- /dev/null
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaers-message-long
@@ -0,0 +1,60 @@
+MSH|^~\&||GA0000||VAERS PROCESSOR|20010331605||ORU^R01|20010422GA03|T|2.3.1|||AL|
+PID|||1234^^^^SR~1234-12^^^^LR~00725^^^^MR||Doe^John^Fitzgerald^JR^^^L||20001007|M||2106-3^White^HL70005|123 Peachtree St^APT 3B^Atlanta^GA^30210^^M^^GA067||(678) 555-1212^^PRN|
+NK1|1|Jones^Jane^Lee^^RN|VAB^Vaccine administered by (Name)^HL70063|
+NK1|2|Jones^Jane^Lee^^RN|FVP^Form completed by (Name)-Vaccine provider^HL70063|101 Main Street^^Atlanta^GA^38765^^O^^GA121||(404) 554-9097^^WPN|
+ORC|CN|||||||||||1234567^Welby^Marcus^J^Jr^Dr.^MD^L|||||||||Peachtree Clinic|101 Main Street^^Atlanta^GA^38765^^O^^GA121|(404) 554-9097^^WPN|101 Main Street^^Atlanta^GA^38765^^O^^GA121|
+OBR|1|||^CDC VAERS-1 (FDA) Report|||20010316|
+OBX|1|NM|21612-7^Reported Patient Age^LN||05|mo^month^ANSI|
+OBX|1|TS|30947-6^Date form completed^LN||20010316|
+OBX|2|FT|30948-4^Vaccination adverse events and treatment, if any^LN|1|fever of 106F, with vomiting, seizures, persistent crying lasting over 3 hours, loss of appetite|
+OBX|3|CE|30949-2^Vaccination adverse event outcome^LN|1|E^required emergency room/doctor visit^NIP005|
+OBX|4|CE|30949-2^Vaccination adverse event outcome^LN|1|H^required hospitalization^NIP005|
+OBX|5|NM|30950-0^Number of days hospitalized due to vaccination adverse event^LN|1|02|d^day^ANSI|
+OBX|6|CE|30951-8^Patient recovered^LN||Y^Yes^ HL70239|
+OBX|7|TS|30952-6^Date of vaccination^LN||20010216|
+OBX|8|TS|30953-4^Adverse event onset date and time^LN||200102180900|
+OBX|9|FT|30954-2^Relevant diagnostic tests/lab data^LN||Electrolytes, CBC, Blood culture|
+OBR|2|||30955-9^All vaccines given on date listed in #10^LN|
+OBX|1|CE30955-9&30956-7^Vaccine type^LN|1|08^HepB-Adolescent/pediatric^CVX|
+OBX|2|CE|30955-9&30957-5^Manufacturer^LN|1|MSD^Merck^MVX|
+OBX|3|ST|30955-9&30959-1^Lot number^LN|1|MRK12345|
+OBX|4|CE|30955-9&30958-3^ Route^LN|1|IM^Intramuscular ^HL70162|
+OBX|5|CE|30955-9&31034-2^Site^LN|1|LA^Left arm^ HL70163|
+OBX|6|NM|30955-9&30960-9^Number of previous doses^LN|1|01I
+OBX|7|CE|CE|30955-9&30956-7^Vaccine type^LN|2|50^DTaP-Hib^CVX|
+OBX|8|CE|30955-9&30957-5^ Manufacturer^LN|2|WAL^Wyeth_Ayerst^MVX|
+OBX|9|ST|30955-9&30959-1^Lot number^LN|2|W46932777|
+OBX|10|CE|30955-9&30958-3^ Route^LN|2|IM^Intramuscular^HL70162|
+OBX|11|CE|30955-9&31034-2^Site^LN|2|LA^Left arm^HL70163|
+OBX|12|NM|30955-9&30960-9^Number of previous doses^LN|2|01|
+OBR|3|||30961-7^Any other vaccinations within 4 weeks prior to the date listed in #10|
+OBX|1|CE|30961-7&30956-7^Vaccine type^LN|1|10^IPV^CVX|
+OBX|2|CE|30961-7&30957-5^Manufacturer^LN|1|PMC^Aventis Pasteur ^MVX|
+OBX|3|ST|30961-7&30959-1^Lot number^LN|1|PMC123456|
+OBX|4|CE|30961-7&30958-3^Route^LN|1|SC^Subcutaneaous^HL70162|
+OBX|5|CE|30961-7&31034-2^Site^LN|1|LA^Left arm^HL70163|
+OBX|6|NM|30961-7&30960-9^Number of previous doses^LN|1|01|
+OBX|7|TS|30961-7&31035-9^date given^LN|1|20001216|
+OBX|8|CE|30962-^Vaccinated at^LN||PVT^Private doctor�s office/hospital^NIP009|
+OBX|9|CE|30963-3^Vaccine purchased with^LN||PBF^Public funds^NIP008|
+OBX|10|FT|30964-1^Other medications^LN||None|
+OBX|11|FT|30965-8^Illness at time of vaccination (specify)^LN||None|
+OBX|12|FT|30966-6^Pre-existing physician diagnosed allergies, birth defects, medical conditions^LN||Past conditions convulsions|
+OBX|13|CE|30967-4^Was adverse event reported previously^LN||N^no^NIP009|
+OBR|4||30968-2^Adverse event following prior vaccination in patient^LN|
+OBX|1|TX|30968-2&30971-6^Adverse event^LN||None|
+OBR|5||30969-0^Adverse event following prior vaccination in brother^LN|
+OBX|1|TX||30969-0&30971-6^Adverse event^LN||vomiting, fever, otitis media|
+OBX|2|NM||30969-0&30972-4^Onset age^LN||04|mo^month^ANSI|
+OBX|3|CE||30969-0&30956-7^Vaccine Type ^LN||10^IPV^CVX|
+OBX|4|NM||30969-0&30973-2^Dose number in series^LN||02|
+OBR|6|||30970-8^Adverse event following prior vaccination in sister^LN|
+OBX|1|TX|30970-8&30971-6^Adverse event^LN||None|
+OBR|7||^For children 5 and under|
+OBX|1|NM|8339-4^Body weight at birth^LN||82|oz^ounces^ANSI|
+OBX|2|NM|30974-0^Number of brothers and sisters^LN||2|
+OBR|8|||^Only for reports submitted by manufacturer/immunization project|
+OBX|1|ST|30975-7^Mfr./Imm. Proj. report no.^LN||12345678|
+OBX|2|TS|30976-5^Date received by manufacturer/immunization project^LN||12345678|
+OBX|3|CE|30977-3^15 day report^LN||N^No^HL70136|
+OBX|4|CE|30978-1^Report type^LN||IN^Initial^NIP010|

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-nar/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-nar/pom.xml b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-nar/pom.xml
new file mode 100644
index 0000000..391206e
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-nar/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-hl7-bundle</artifactId>
+        <version>0.1.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-hl7-nar</artifactId>
+    <packaging>nar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-hl7-processors</artifactId>
+            <version>0.1.0-incubating-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/.gitignore
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/.gitignore b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/.gitignore
@@ -0,0 +1 @@
+/target/

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/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
new file mode 100644
index 0000000..2a0c909
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/pom.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-hl7-bundle</artifactId>
+        <version>0.1.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-hl7-processors</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-processor-utils</artifactId>
+        </dependency>
+        
+        <dependency>
+        	<groupId>org.apache.nifi</groupId>
+        	<artifactId>nifi-hl7-query-language</artifactId>
+        	<version>0.1.0-incubating-SNAPSHOT</version>
+        </dependency>
+        
+		<dependency>
+			<groupId>ca.uhn.hapi</groupId>
+			<artifactId>hapi-base</artifactId>
+			<version>2.2</version>
+		</dependency>       
+        <dependency>
+		  <groupId>ca.uhn.hapi</groupId>
+		  <artifactId>hapi-structures-v21</artifactId>
+		  <version>2.2</version>
+		</dependency>
+		<dependency>
+		  <groupId>ca.uhn.hapi</groupId>
+		  <artifactId>hapi-structures-v22</artifactId>
+		  <version>2.2</version>
+		</dependency>
+        <dependency>
+		  <groupId>ca.uhn.hapi</groupId>
+		  <artifactId>hapi-structures-v23</artifactId>
+		  <version>2.2</version>
+		</dependency>
+		<dependency>
+		  <groupId>ca.uhn.hapi</groupId>
+		  <artifactId>hapi-structures-v231</artifactId>
+		  <version>2.2</version>
+		</dependency>
+        <dependency>
+		  <groupId>ca.uhn.hapi</groupId>
+		  <artifactId>hapi-structures-v24</artifactId>
+		  <version>2.2</version>
+		</dependency>
+		<dependency>
+		  <groupId>ca.uhn.hapi</groupId>
+		  <artifactId>hapi-structures-v25</artifactId>
+		  <version>2.2</version>
+		</dependency>
+		<dependency>
+		  <groupId>ca.uhn.hapi</groupId>
+		  <artifactId>hapi-structures-v251</artifactId>
+		  <version>2.2</version>
+		</dependency>
+        <dependency>
+		  <groupId>ca.uhn.hapi</groupId>
+		  <artifactId>hapi-structures-v26</artifactId>
+		  <version>2.2</version>
+		</dependency>
+        
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-mock</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>


[10/50] [abbrv] incubator-nifi git commit: NIFI-494: - Escaping parameters as appropriate. - Additional error handling.

Posted by jo...@apache.org.
NIFI-494:
- Escaping parameters as appropriate.
- Additional error 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/eb023e57
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/eb023e57
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/eb023e57

Branch: refs/heads/NIFI-271
Commit: eb023e57b2b4f449e8ae9c0fb369f9197eb5510d
Parents: 2154b82
Author: Matt Gilman <ma...@gmail.com>
Authored: Thu Apr 9 15:49:46 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Thu Apr 9 15:49:46 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/nifi/util/EscapeUtils.java  | 42 +++++++++++++++++
 .../nifi/web/StandardNiFiContentAccess.java     | 10 +++-
 .../web/api/config/NotFoundExceptionMapper.java | 48 ++++++++++++++++++++
 .../src/main/resources/nifi-web-api-context.xml |  1 +
 .../nifi/web/ContentViewerController.java       | 18 +++++---
 .../src/main/webapp/WEB-INF/jsp/header.jsp      | 20 ++++----
 .../src/main/webapp/js/hexview/hexview.js       |  4 +-
 .../nifi-web/nifi-web-docs/pom.xml              |  6 +++
 .../main/webapp/WEB-INF/jsp/documentation.jsp   |  2 +-
 .../src/main/webapp/js/application.js           |  7 ++-
 .../nifi-framework/nifi-web/nifi-web-ui/pom.xml |  6 +++
 .../main/webapp/WEB-INF/pages/message-page.jsp  |  6 +--
 .../nifi-standard-content-viewer/pom.xml        |  5 ++
 .../src/main/webapp/WEB-INF/jsp/codemirror.jsp  |  7 ++-
 .../nifi-update-attribute-ui/pom.xml            |  5 ++
 .../src/main/webapp/WEB-INF/jsp/worksheet.jsp   |  8 ++--
 16 files changed, 165 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/EscapeUtils.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/EscapeUtils.java b/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/EscapeUtils.java
new file mode 100644
index 0000000..9d48d3d
--- /dev/null
+++ b/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/EscapeUtils.java
@@ -0,0 +1,42 @@
+/*
+ * 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.util;
+
+public class EscapeUtils {
+
+    /**
+     * Escapes the specified html by replacing &amp;, &lt;, &gt;, &quot;, &#39;, &#x2f; 
+     * with their corresponding html entity. If html is null, null is returned.
+     * 
+     * @param html
+     * @return 
+     */
+    public static String escapeHtml(String html) {
+        if (html == null) {
+            return null;
+        }
+        
+        html = html.replace("&", "&amp;");
+        html = html.replace("<", "&lt;");
+        html = html.replace(">", "&gt;");
+        html = html.replace("\"", "&quot;");
+        html = html.replace("'", "&#39;");
+        html = html.replace("/", "&#x2f;");
+        
+        return html;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.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/StandardNiFiContentAccess.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java
index 70aad94..ed58143 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java
@@ -121,8 +121,14 @@ public class StandardNiFiContentAccess implements ContentAccess {
             final String rawDirection = StringUtils.substringAfterLast(eventDetails, "/content/");
             
             // get the content type
-            final Long eventId = Long.parseLong(rawEventId);
-            final ContentDirection direction = ContentDirection.valueOf(rawDirection.toUpperCase());
+            final Long eventId;
+            final ContentDirection direction;
+            try {
+                eventId = Long.parseLong(rawEventId);
+                direction = ContentDirection.valueOf(rawDirection.toUpperCase());
+            } catch (final IllegalArgumentException iae) {
+                throw new IllegalArgumentException("The specified data reference URI is not valid.");
+            }
             return serviceFacade.getContent(eventId, request.getDataUri(), direction);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/NotFoundExceptionMapper.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/config/NotFoundExceptionMapper.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/NotFoundExceptionMapper.java
new file mode 100644
index 0000000..512391f
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/NotFoundExceptionMapper.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.web.api.config;
+
+import com.sun.jersey.api.NotFoundException;
+import com.sun.jersey.api.Responses;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.ExceptionMapper;
+import javax.ws.rs.ext.Provider;
+import org.apache.nifi.util.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Maps not found exceptions into client responses.
+ */
+@Provider
+public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException> {
+
+    private static final Logger logger = LoggerFactory.getLogger(NotFoundExceptionMapper.class);
+
+    @Override
+    public Response toResponse(NotFoundException exception) {
+        // log the error
+        logger.info(String.format("%s. Returning %s response.", exception, Response.Status.NOT_FOUND));
+
+        if (logger.isDebugEnabled()) {
+            logger.debug(StringUtils.EMPTY, exception);
+        }
+
+        return Responses.notFound().entity("The specified resource could not be found.").type("text/plain").build();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/nifi-web-api-context.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/nifi-web-api-context.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/nifi-web-api-context.xml
index bf4f245..e034baa 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/nifi-web-api-context.xml
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/nifi-web-api-context.xml
@@ -270,6 +270,7 @@
     <bean class="org.apache.nifi.web.api.config.NodeReconnectionExceptionMapper" scope="singleton"/>
     <bean class="org.apache.nifi.web.api.config.PrimaryRoleAssignmentExceptionMapper" scope="singleton"/>
     <bean class="org.apache.nifi.web.api.config.ResourceNotFoundExceptionMapper" scope="singleton"/>
+    <bean class="org.apache.nifi.web.api.config.NotFoundExceptionMapper" scope="singleton"/>
     <bean class="org.apache.nifi.web.api.config.UnknownNodeExceptionMapper" scope="singleton"/>
     <bean class="org.apache.nifi.web.api.config.ValidationExceptionMapper" scope="singleton"/>
     <bean class="org.apache.nifi.web.api.config.WebApplicationExceptionMapper" scope="singleton"/>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java
index d9b082d..4d99a69 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java
@@ -68,10 +68,21 @@ public class ContentViewerController extends HttpServlet {
         final ServletContext servletContext = request.getServletContext();
         final ContentAccess contentAccess = (ContentAccess) servletContext.getAttribute("nifi-content-access");
         
+        final ContentRequestContext contentRequest = getContentRequest(request);
+        if (contentRequest.getDataUri() == null) {
+            request.setAttribute("title", "Error");
+            request.setAttribute("messages", "The data reference must be specified.");
+            
+            // forward to the error page
+            final ServletContext viewerContext = servletContext.getContext("/nifi");
+            viewerContext.getRequestDispatcher("/message").forward(request, response);
+            return;
+        }
+        
         // get the content
         final DownloadableContent downloadableContent;
         try {
-            downloadableContent = contentAccess.getContent(getContentRequest(request));
+            downloadableContent = contentAccess.getContent(contentRequest);
         } catch (final ResourceNotFoundException rnfe) {
             request.setAttribute("title", "Error");
             request.setAttribute("messages", "Unable to find the specified content");
@@ -138,9 +149,6 @@ public class ContentViewerController extends HttpServlet {
         final String mimeType = mediatype.toString();
         
         // add attributes needed for the header
-        final StringBuffer requestUrl = request.getRequestURL();
-        request.setAttribute("requestUrl", requestUrl.toString());
-        request.setAttribute("dataRef", request.getParameter("ref"));
         request.setAttribute("filename", downloadableContent.getFilename());
         request.setAttribute("contentType", mimeType);
         
@@ -148,8 +156,6 @@ public class ContentViewerController extends HttpServlet {
         request.getRequestDispatcher("/WEB-INF/jsp/header.jsp").include(request, response);
         
         // remove the attributes needed for the header
-        request.removeAttribute("requestUrl");
-        request.removeAttribute("dataRef");
         request.removeAttribute("filename");
         request.removeAttribute("contentType");
         

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/header.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/header.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/header.jsp
index 82382f6..b847dd5 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/header.jsp
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/header.jsp
@@ -31,8 +31,8 @@
         <script type="text/javascript">
             var $$ = $.noConflict(true);
             $$(document).ready(function () {
-                var url = '${requestUrl}';
-                var ref = '${param.ref}';
+                var url = $$('#requestUrl').text();
+                var ref = $$('#ref').text();
                 
                 // create the parameters
                 var params = {
@@ -40,14 +40,14 @@
                 };
                 
                 // include the cluster node if appropriate
-                var clusterNodeId = '${param.clusterNodeId}';
-                if (clusterNodeId !== null && clusterNodeId !== '') {
+                var clusterNodeId = $$('#clusterNodeId').text();
+                if (clusterNodeId !== '') {
                     params['clusterNodeId'] = clusterNodeId;
                 }
                 
                 // determine the appropriate mode to select initially
-                var initialMode = '${param.mode}';
-                if (initialMode === null && initialMode === '') {
+                var initialMode = $$('#mode').text();
+                if (initialMode === '') {
                     initialMode = 'Original';
                 }
                 
@@ -85,8 +85,12 @@
         </script>
     </head>
     <body class="message-pane">
+        <span id="ref" class="hidden"><%= org.apache.nifi.util.EscapeUtils.escapeHtml(request.getParameter("ref")) %></span>
+        <span id="clusterNodeId" class="hidden"><%= request.getParameter("clusterNodeId") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getParameter("clusterNodeId")) %></span>
+        <span id="mode" class="hidden"><%= request.getParameter("mode") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getParameter("mode")) %></span>
+        <span id="requestUrl" class="hidden"><%= org.apache.nifi.util.EscapeUtils.escapeHtml(request.getRequestURL().toString()) %></span>
         <div id="view-as-label">View as</div>
         <div id="view-as" class="pointer button-normal"></div>
-        <div id="content-filename"><span class="content-label">filename</span>${filename}</div>
-        <div id="content-type"><span class="content-label">content type</span>${contentType}</div>
+        <div id="content-filename"><span class="content-label">filename</span><%= request.getAttribute("filename") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getAttribute("filename").toString()) %></div>
+        <div id="content-type"><span class="content-label">content type</span><%= request.getAttribute("contentType") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getAttribute("contentType").toString()) %></div>
         <div class="message-pane-message-box">
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/js/hexview/hexview.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/js/hexview/hexview.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/js/hexview/hexview.js
index 7c461d5..65fee95 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/js/hexview/hexview.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/js/hexview/hexview.js
@@ -148,7 +148,7 @@ $(document).ready(function () {
 
             $("table", div).addClass("hexviewerwindow_table");
             $("table", div).append("<tr></tr>").addClass("hexviewerwindow");
-            $("table tr:last", div).append("<td>" + (decimal_offset ? ("00000000"+offset).slice(-8) : "0x" + dec_to_hex8(offset)) + "</td>");
+            $("table tr:last", div).append("<td>" + escapeHtml((decimal_offset ? ("00000000"+offset).slice(-8) : "0x" + dec_to_hex8(offset))) + "</td>");
             $("table tr td:last", div).addClass("hexviewerwindow_offset");
 
             var runlen = 0;
@@ -162,7 +162,7 @@ $(document).ready(function () {
                     num += dec2_to_hex(line_data.charCodeAt(i+j));
                 }
 
-                $("table tr:last", div).append("<td>" + (hide_0x ? "" : "0x") + num + "</td>");
+                $("table tr:last", div).append("<td>" + escapeHtml((hide_0x ? "" : "0x") + num) + "</td>");
 
                 apply_highlights(offset+i);
             }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/pom.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/pom.xml
index 5aa9a06..2aadb03 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/pom.xml
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/pom.xml
@@ -26,6 +26,7 @@
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.nifi</groupId>
@@ -33,6 +34,11 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-utils</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>javax.servlet.jsp</groupId>
             <artifactId>javax.servlet.jsp-api</artifactId>
             <scope>provided</scope>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp
index aea08d0..9690def 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/WEB-INF/jsp/documentation.jsp
@@ -30,7 +30,7 @@
     <body id="documentation-body">
         <div id="banner-header" class="main-banner-header"></div>
         <div id="banner-footer" class="main-banner-footer"></div>
-        <span id="initial-selection" style="display: none;">${param.select}</span>
+        <span id="initial-selection" style="display: none;"><%= request.getParameter("select") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getParameter("select")) %></span>
         <div id="documentation-header" class="documentation-header">
             <div id="nf-title">NiFi Documentation</div>
             <div id="nf-version"></div>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/js/application.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/js/application.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/js/application.js
index 3efdbcc..1261810 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/js/application.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-docs/src/main/webapp/js/application.js
@@ -14,6 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+/* global top */
+
 $(document).ready(function () {
 
     var isUndefined = function (obj) {
@@ -139,7 +142,7 @@ $(document).ready(function () {
                 if (isDefinedAndNotNull(response.banners)) {
                     if (isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
                         // update the header text
-                        var bannerHeader = $('#banner-header').html(response.banners.headerText).show();
+                        var bannerHeader = $('#banner-header').text(response.banners.headerText).show();
 
                         // show the banner
                         var updateTop = function (elementId) {
@@ -155,7 +158,7 @@ $(document).ready(function () {
 
                     if (isDefinedAndNotNull(response.banners.footerText) && response.banners.footerText !== '') {
                         // update the footer text and show it
-                        var bannerFooter = $('#banner-footer').html(response.banners.footerText).show();
+                        var bannerFooter = $('#banner-footer').text(response.banners.footerText).show();
 
                         var updateBottom = function (elementId) {
                             var element = $('#' + elementId);

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml
index f2d4861..eeaeb39 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml
@@ -79,6 +79,7 @@
                             <packageRoot>org.apache.nifi.web.jsp</packageRoot>
                             <keepSources>true</keepSources>
                             <verbose>true</verbose>
+                            <useProvidedScope>true</useProvidedScope>
                             <excludes>
                                 **/canvas.jsp,
                                 **/summary.jsp,
@@ -620,6 +621,11 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-utils</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
             <scope>provided</scope>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/message-page.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/message-page.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/message-page.jsp
index 0dc4f9d..796877f 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/message-page.jsp
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/message-page.jsp
@@ -18,7 +18,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
-        <title>${title}</title>
+        <title><%= request.getAttribute("title") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getAttribute("title").toString()) %></title>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
         <link rel="shortcut icon" href="images/nifi16.ico"/>
         <link href="/nifi/css/message-pane.css" rel="stylesheet" type="text/css" />
@@ -27,8 +27,8 @@
 
     <body class="message-pane">
         <div class="message-pane-message-box">
-            <p class="message-pane-title">${title}</p>
-            <p class="message-pane-content">${messages}</p>
+            <p class="message-pane-title"><%= request.getAttribute("title") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getAttribute("title").toString()) %></p>
+            <p class="message-pane-content"><%= request.getAttribute("messages") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getAttribute("messages").toString()) %></p>
         </div>
     </body>
 </html>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/pom.xml b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/pom.xml
index 1b13178..576a328 100644
--- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/pom.xml
+++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/pom.xml
@@ -29,6 +29,11 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-utils</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>commons-codec</groupId>
             <artifactId>commons-codec</artifactId>
             <scope>provided</scope>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/webapp/WEB-INF/jsp/codemirror.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/webapp/WEB-INF/jsp/codemirror.jsp b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/webapp/WEB-INF/jsp/codemirror.jsp
index 65ad826..abcc409 100644
--- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/webapp/WEB-INF/jsp/codemirror.jsp
+++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/webapp/WEB-INF/jsp/codemirror.jsp
@@ -20,13 +20,16 @@
 <script type="text/javascript" src="../nifi/js/codemirror/lib/codemirror-compressed.js"></script>
 <script type="text/javascript" src="../nifi/js/jquery/jquery-2.1.1.min.js"></script>
 
-<textarea id="codemirror-content">${content}</textarea>
+<textarea id="codemirror-content"><%= request.getAttribute("content") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getAttribute("content").toString()) %></textarea>
+<span id="codemirror-mode" style="display: none;"><%= org.apache.nifi.util.EscapeUtils.escapeHtml(request.getAttribute("mode").toString()) %></span> 
 
 <script type="text/javascript">
     $(document).ready(function() {
+        var mode = $('#codemirror-mode').text();
+        
         var field = document.getElementById('codemirror-content');
         var editor = CodeMirror.fromTextArea(field, {
-            mode: '${mode}',
+            mode: mode,
             lineNumbers: true,
             matchBrackets: true,
             foldGutter: true,

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml
index 12a0329..14bc768 100644
--- a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml
+++ b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml
@@ -35,6 +35,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-utils</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
             <artifactId>nifi-custom-ui-utilities</artifactId>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/eb023e57/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/WEB-INF/jsp/worksheet.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/WEB-INF/jsp/worksheet.jsp b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/WEB-INF/jsp/worksheet.jsp
index 1d7c17b..b142c18 100644
--- a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/WEB-INF/jsp/worksheet.jsp
+++ b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/WEB-INF/jsp/worksheet.jsp
@@ -59,10 +59,10 @@
         <title>Update Attribute</title>
     </head>
     <body>
-        <div id="attribute-updater-processor-id" class="hidden">${param.id}</div>
-        <div id="attribute-updater-client-id" class="hidden">${param.clientId}</div>
-        <div id="attribute-updater-revision" class="hidden">${param.revision}</div>
-        <div id="attribute-updater-editable" class="hidden">${param.editable}</div>
+        <div id="attribute-updater-processor-id" class="hidden"><%= request.getParameter("id") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getParameter("id")) %></div>
+        <div id="attribute-updater-client-id" class="hidden"><%= request.getParameter("clientId") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getParameter("clientId")) %></div>
+        <div id="attribute-updater-revision" class="hidden"><%= request.getParameter("revision") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getParameter("revision")) %></div>
+        <div id="attribute-updater-editable" class="hidden"><%= request.getParameter("editable") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getParameter("editable")) %></div>
         <div id="update-attributes-content">
             <div id="rule-list-panel">
                 <div id="flowfile-policy-container">


[07/50] [abbrv] incubator-nifi git commit: NIFI-495: Fixed handling of FlowFiles if destination full by rolling back session

Posted by jo...@apache.org.
NIFI-495: Fixed handling of FlowFiles if destination full by rolling back session


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/7819afbe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/7819afbe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/7819afbe

Branch: refs/heads/NIFI-271
Commit: 7819afbefd980ce68f43093302997024926d9f51
Parents: 8d20b82
Author: Mark Payne <ma...@hotmail.com>
Authored: Wed Apr 8 13:38:33 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Wed Apr 8 13:38:33 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/nifi/remote/StandardRemoteGroupPort.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/7819afbe/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
index 740e405..69ba0fd 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
@@ -171,6 +171,7 @@ public class StandardRemoteGroupPort extends RemoteGroupPort {
             this.targetRunning.set(false);
             final String message = String.format("%s failed to communicate with %s because the remote instance indicates that the port is not in a valid state", this, url);
             logger.error(message);
+          	session.rollback();
             remoteGroup.getEventReporter().reportEvent(Severity.ERROR, CATEGORY, message);
             return;
         } catch (final UnknownPortException e) {
@@ -178,6 +179,7 @@ public class StandardRemoteGroupPort extends RemoteGroupPort {
             this.targetExists.set(false);
             final String message = String.format("%s failed to communicate with %s because the remote instance indicates that the port no longer exists", this, url);
             logger.error(message);
+          	session.rollback();
             remoteGroup.getEventReporter().reportEvent(Severity.ERROR, CATEGORY, message);
             return;
         } catch (final IOException e) {
@@ -186,13 +188,14 @@ public class StandardRemoteGroupPort extends RemoteGroupPort {
             if ( logger.isDebugEnabled() ) {
                 logger.error("", e);
             }
+          	session.rollback();
             remoteGroup.getEventReporter().reportEvent(Severity.ERROR, CATEGORY, message);
-            session.rollback();
             return;
         }
         
         if ( transaction == null ) {
             logger.debug("{} Unable to create transaction to communicate with; all peers must be penalized, so yielding context", this);
+            session.rollback();
             context.yield();
             return;
         }


[44/50] [abbrv] incubator-nifi git commit: NIFI-523: Do not read all lucene documents when we dont need to

Posted by jo...@apache.org.
NIFI-523: Do not read all lucene documents when we dont need to


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/a06c2537
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/a06c2537
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/a06c2537

Branch: refs/heads/NIFI-271
Commit: a06c25373fbd4103c2c9ba1ba0d75d94726700d2
Parents: 509933f
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 17 09:13:57 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 17 09:13:57 2015 -0400

----------------------------------------------------------------------
 .../nifi/provenance/lucene/DocsReader.java      | 20 +++++-----
 .../provenance/serialization/RecordReaders.java | 41 ++++++++++++++++++--
 2 files changed, 47 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a06c2537/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/lucene/DocsReader.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/lucene/DocsReader.java b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/lucene/DocsReader.java
index af5fe50..6446a35 100644
--- a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/lucene/DocsReader.java
+++ b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/lucene/DocsReader.java
@@ -48,18 +48,22 @@ public class DocsReader {
             return Collections.emptySet();
         }
 
-        final List<Document> docs = new ArrayList<>();
+        final int numDocs = Math.min(topDocs.scoreDocs.length, maxResults);
+        final List<Document> docs = new ArrayList<>(numDocs);
 
-        for (ScoreDoc scoreDoc : topDocs.scoreDocs) {
+        for (final ScoreDoc scoreDoc : topDocs.scoreDocs) {
             final int docId = scoreDoc.doc;
             final Document d = indexReader.document(docId);
             docs.add(d);
+            if ( retrievalCount.incrementAndGet() >= maxResults ) {
+                break;
+            }
         }
 
-        return read(docs, allProvenanceLogFiles, retrievalCount, maxResults);
+        return read(docs, allProvenanceLogFiles);
     }
 
-    public Set<ProvenanceEventRecord> read(final List<Document> docs, final Collection<Path> allProvenanceLogFiles, final AtomicInteger retrievalCount, final int maxResults) throws IOException {
+    public Set<ProvenanceEventRecord> read(final List<Document> docs, final Collection<Path> allProvenanceLogFiles) throws IOException {
         LuceneUtil.sortDocsForRetrieval(docs);
 
         RecordReader reader = null;
@@ -79,9 +83,6 @@ public class DocsReader {
                             reader.skipTo(byteOffset);
                             final StandardProvenanceEventRecord record = reader.nextRecord();
                             matchingRecords.add(record);
-                            if (retrievalCount.incrementAndGet() >= maxResults) {
-                                break;
-                            }
                         } catch (final IOException e) {
                             throw new FileNotFoundException("Could not find Provenance Log File with basename " + storageFilename + " in the Provenance Repository");
                         }
@@ -91,7 +92,7 @@ public class DocsReader {
                             reader.close();
                         }
 
-                        final List<File> potentialFiles = LuceneUtil.getProvenanceLogFiles(storageFilename, allProvenanceLogFiles);
+                        List<File> potentialFiles = LuceneUtil.getProvenanceLogFiles(storageFilename, allProvenanceLogFiles);
                         if (potentialFiles.isEmpty()) {
                             throw new FileNotFoundException("Could not find Provenance Log File with basename " + storageFilename + " in the Provenance Repository");
                         }
@@ -108,9 +109,6 @@ public class DocsReader {
 
                                 final StandardProvenanceEventRecord record = reader.nextRecord();
                                 matchingRecords.add(record);
-                                if (retrievalCount.incrementAndGet() >= maxResults) {
-                                    break;
-                                }
                             } catch (final IOException e) {
                                 throw new IOException("Failed to retrieve record from Provenance File " + file + " due to " + e, e);
                             }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a06c2537/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/serialization/RecordReaders.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/serialization/RecordReaders.java b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/serialization/RecordReaders.java
index f902b92..8f06995 100644
--- a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/serialization/RecordReaders.java
+++ b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/serialization/RecordReaders.java
@@ -33,6 +33,8 @@ import org.apache.nifi.provenance.lucene.LuceneUtil;
 public class RecordReaders {
 
     public static RecordReader newRecordReader(File file, final Collection<Path> provenanceLogFiles) throws IOException {
+        final File originalFile = file;
+        
         if (!file.exists()) {
             if (provenanceLogFiles == null) {
                 throw new FileNotFoundException(file.toString());
@@ -47,11 +49,44 @@ public class RecordReaders {
             }
         }
 
-        if (file == null || !file.exists()) {
-            throw new FileNotFoundException(file.toString());
+        InputStream fis = null;
+        if ( file.exists() ) {
+            try {
+                fis = new FileInputStream(file);
+            } catch (final FileNotFoundException fnfe) {
+                fis = null;
+            }
+        }
+        
+        openStream: while ( fis == null ) {
+            final File dir = file.getParentFile();
+            final String baseName = LuceneUtil.substringBefore(file.getName(), ".");
+            
+            // depending on which rollover actions have occurred, we could have 3 possibilities for the
+            // filename that we need. The majority of the time, we will use the extension ".prov.indexed.gz"
+            // because most often we are compressing on rollover and most often we have already finished
+            // compressing by the time that we are querying the data.
+            for ( final String extension : new String[] {".indexed.prov.gz", ".indexed.prov", ".prov"} ) {
+                file = new File(dir, baseName + extension);
+                if ( file.exists() ) {
+                    try {
+                        fis = new FileInputStream(file);
+                        break openStream;
+                    } catch (final FileNotFoundException fnfe) {
+                        // file was modified by a RolloverAction after we verified that it exists but before we could
+                        // create an InputStream for it. Start over.
+                        fis = null;
+                        continue openStream;
+                    }
+                }
+            }
+            
+            break;
         }
 
-        final InputStream fis = new FileInputStream(file);
+        if ( fis == null ) {
+            throw new FileNotFoundException("Unable to locate file " + originalFile);
+        }
         final InputStream readableStream;
         if (file.getName().endsWith(".gz")) {
             readableStream = new BufferedInputStream(new GZIPInputStream(fis));


[32/50] [abbrv] incubator-nifi git commit: Merge branch 'develop' of http://git-wip-us.apache.org/repos/asf/incubator-nifi into develop

Posted by jo...@apache.org.
Merge branch 'develop' of http://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/f1c36e64
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/f1c36e64
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/f1c36e64

Branch: refs/heads/NIFI-271
Commit: f1c36e64f1e4e5f2f24eb91291dd51cfe8893a85
Parents: 1963c27 df57555
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 10 14:55:23 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 10 14:55:23 2015 -0400

----------------------------------------------------------------------
 .../src/main/webapp/WEB-INF/jsp/hexview.jsp     |  2 +-
 .../src/main/webapp/css/main.css                |  2 +-
 .../propertytable/jquery.propertytable.js       | 74 +++++++++++++-------
 .../main/webapp/js/nf/canvas/nf-canvas-utils.js |  7 +-
 .../src/main/webapp/js/nf/canvas/nf-canvas.js   |  8 ++-
 .../src/main/webapp/js/application.js           | 13 ++--
 6 files changed, 68 insertions(+), 38 deletions(-)
----------------------------------------------------------------------



[36/50] [abbrv] incubator-nifi git commit: NIFI-25: Updated AWS procs to fix problems noted by code review

Posted by jo...@apache.org.
NIFI-25: Updated AWS procs to fix problems noted by code review


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/0211d0d7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/0211d0d7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/0211d0d7

Branch: refs/heads/NIFI-271
Commit: 0211d0d71561fb63df4a06cd7b1a3b430b7a3e6c
Parents: 93a1210
Author: Mark Payne <ma...@hotmail.com>
Authored: Sat Apr 11 14:34:11 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Sat Apr 11 14:34:11 2015 -0400

----------------------------------------------------------------------
 .../nifi-aws-bundle/nifi-aws-nar/pom.xml        |   5 +-
 .../nifi-aws-bundle/nifi-aws-processors/pom.xml |   2 +-
 .../processors/aws/AbstractAWSProcessor.java    |  16 ++
 .../processors/aws/s3/AbstractS3Processor.java  |  16 ++
 .../nifi/processors/aws/s3/FetchS3Object.java   | 157 ++++++++++++++++++
 .../nifi/processors/aws/s3/GetS3Object.java     | 165 -------------------
 .../nifi/processors/aws/s3/PutS3Object.java     |  36 +++-
 .../aws/sns/AbstractSNSProcessor.java           |  16 ++
 .../apache/nifi/processors/aws/sns/PutSNS.java  |  28 +++-
 .../aws/sqs/AbstractSQSProcessor.java           |  16 ++
 .../nifi/processors/aws/sqs/DeleteSQS.java      |  26 ++-
 .../apache/nifi/processors/aws/sqs/GetSQS.java  |  31 +++-
 .../apache/nifi/processors/aws/sqs/PutSQS.java  |  30 +++-
 .../org.apache.nifi.processor.Processor         |   2 +-
 .../processors/aws/s3/TestFetchS3Object.java    |  44 +++++
 .../nifi/processors/aws/s3/TestGetS3Object.java |  47 ------
 nifi/nifi-nar-bundles/nifi-aws-bundle/pom.xml   |   2 +-
 17 files changed, 401 insertions(+), 238 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-nar/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-nar/pom.xml b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-nar/pom.xml
index 4c34715..3e6f450 100644
--- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-nar/pom.xml
+++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-nar/pom.xml
@@ -19,18 +19,17 @@
     <parent>
         <groupId>org.apache.nifi</groupId>
         <artifactId>nifi-aws-bundle</artifactId>
-        <version>0.0.2-incubating-SNAPSHOT</version>
+        <version>0.1.0-incubating-SNAPSHOT</version>
     </parent>
 
     <artifactId>nifi-aws-nar</artifactId>
-    <version>0.0.2-incubating-SNAPSHOT</version>
     <packaging>nar</packaging>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.nifi</groupId>
             <artifactId>nifi-aws-processors</artifactId>
-            <version>0.0.2-incubating-SNAPSHOT</version>
+            <version>0.1.0-incubating-SNAPSHOT</version>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/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 2cb1302..2270773 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
@@ -19,7 +19,7 @@
     <parent>
         <groupId>org.apache.nifi</groupId>
         <artifactId>nifi-aws-bundle</artifactId>
-        <version>0.0.2-incubating-SNAPSHOT</version>
+        <version>0.1.0-incubating-SNAPSHOT</version>
     </parent>
 
     <artifactId>nifi-aws-processors</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java
index dde0d1d..11c6a9d 100644
--- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java
+++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java
@@ -1,3 +1,19 @@
+/*
+ * 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.aws;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/AbstractS3Processor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/AbstractS3Processor.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/AbstractS3Processor.java
index 4849357..624015b 100644
--- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/AbstractS3Processor.java
+++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/AbstractS3Processor.java
@@ -1,3 +1,19 @@
+/*
+ * 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.aws.s3;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/FetchS3Object.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/FetchS3Object.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/FetchS3Object.java
new file mode 100644
index 0000000..63c8346
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/FetchS3Object.java
@@ -0,0 +1,157 @@
+/*
+ * 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.aws.s3;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.SeeAlso;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.util.StandardValidators;
+
+import com.amazonaws.AmazonClientException;
+import com.amazonaws.services.s3.AmazonS3;
+import com.amazonaws.services.s3.model.GetObjectRequest;
+import com.amazonaws.services.s3.model.ObjectMetadata;
+import com.amazonaws.services.s3.model.S3Object;
+
+
+@SupportsBatching
+@SeeAlso({PutS3Object.class})
+@Tags({"Amazon", "S3", "AWS", "Get", "Fetch"})
+@CapabilityDescription("Retrieves the contents of an S3 Object and writes it to the content of a FlowFile")
+@WritesAttributes({
+	@WritesAttribute(attribute="s3.bucket", description="The name of the S3 bucket"),
+	@WritesAttribute(attribute="path", description="The path of the file"),
+	@WritesAttribute(attribute="absolute.path", description="The path of the file"),
+	@WritesAttribute(attribute="filename", description="The name of the file"),
+	@WritesAttribute(attribute="hash.value", description="The MD5 sum of the file"),
+	@WritesAttribute(attribute="hash.algorithm", description="MD5"),
+	@WritesAttribute(attribute="mime.type", description="If S3 provides the content type/MIME type, this attribute will hold that file"),
+	@WritesAttribute(attribute="s3.etag", description="The ETag that can be used to see if the file has changed"),
+	@WritesAttribute(attribute="s3.expirationTime", description="If the file has an expiration date, this attribute will be set, containing the milliseconds since epoch in UTC time"),
+	@WritesAttribute(attribute="s3.expirationTimeRuleId", description="The ID of the rule that dictates this object's expiration time"),
+	@WritesAttribute(attribute="s3.version", description="The version of the S3 object"),
+})
+public class FetchS3Object extends AbstractS3Processor {
+
+	public static final PropertyDescriptor VERSION_ID = new PropertyDescriptor.Builder()
+        .name("Version")
+        .description("The Version of the Object to download")
+        .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+        .expressionLanguageSupported(true)
+        .required(false)
+        .build();
+    
+    public static final List<PropertyDescriptor> properties = Collections.unmodifiableList(
+            Arrays.asList(BUCKET, KEY, REGION, ACCESS_KEY, SECRET_KEY, CREDENTAILS_FILE, TIMEOUT, VERSION_ID) );
+
+    @Override
+    protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
+        return properties;
+    }
+    
+    @Override
+    public void onTrigger(final ProcessContext context, final ProcessSession session) {
+        FlowFile flowFile = session.get();
+        if ( flowFile == null ) {
+            return;
+        }
+
+        final long startNanos = System.nanoTime();
+        final String bucket = context.getProperty(BUCKET).evaluateAttributeExpressions(flowFile).getValue();
+        final String key = context.getProperty(KEY).evaluateAttributeExpressions(flowFile).getValue();
+        final String versionId = context.getProperty(VERSION_ID).evaluateAttributeExpressions(flowFile).getValue();
+        
+        final AmazonS3 client = getClient();
+        final GetObjectRequest request;
+        if ( versionId == null ) {
+            request = new GetObjectRequest(bucket, key);
+        } else {
+            request = new GetObjectRequest(bucket, key, versionId);
+        }
+
+        final Map<String, String> attributes = new HashMap<>();
+        try (final S3Object s3Object = client.getObject(request)) {
+            flowFile = session.importFrom(s3Object.getObjectContent(), flowFile);
+            attributes.put("s3.bucket", s3Object.getBucketName());
+            
+            final ObjectMetadata metadata = s3Object.getObjectMetadata();
+            if ( metadata.getContentDisposition() != null ) {
+                final String fullyQualified = metadata.getContentDisposition();
+                final int lastSlash = fullyQualified.lastIndexOf("/");
+                if ( lastSlash > -1 && lastSlash < fullyQualified.length() - 1 ) {
+                    attributes.put(CoreAttributes.PATH.key(), fullyQualified.substring(0, lastSlash));
+                    attributes.put(CoreAttributes.ABSOLUTE_PATH.key(), fullyQualified);
+                    attributes.put(CoreAttributes.FILENAME.key(), fullyQualified.substring(lastSlash + 1));
+                } else {
+                    attributes.put(CoreAttributes.FILENAME.key(), metadata.getContentDisposition());
+                }
+            }
+            if (metadata.getContentMD5() != null ) {
+                attributes.put("hash.value", metadata.getContentMD5());
+                attributes.put("hash.algorithm", "MD5");
+            }
+            if ( metadata.getContentType() != null ) {
+                attributes.put(CoreAttributes.MIME_TYPE.key(), metadata.getContentType());
+            }
+            if ( metadata.getETag() != null ) {
+                attributes.put("s3.etag", metadata.getETag());
+            }
+            if ( metadata.getExpirationTime() != null ) {
+                attributes.put("s3.expirationTime", String.valueOf(metadata.getExpirationTime().getTime()));
+            }
+            if ( metadata.getExpirationTimeRuleId() != null ) {
+                attributes.put("s3.expirationTimeRuleId", metadata.getExpirationTimeRuleId());
+            }
+            if ( metadata.getUserMetadata() != null ) {
+                attributes.putAll(metadata.getUserMetadata());
+            }
+            if ( metadata.getVersionId() != null ) {
+                attributes.put("s3.version", metadata.getVersionId());
+            }
+        } catch (final IOException | AmazonClientException ioe) {
+            getLogger().error("Failed to retrieve S3 Object for {}; routing to failure", new Object[] {flowFile, ioe});
+            session.transfer(flowFile, REL_FAILURE);
+            return;
+        }
+
+        if ( !attributes.isEmpty() ) {
+            flowFile = session.putAllAttributes(flowFile, attributes);
+        }
+
+        session.transfer(flowFile, REL_SUCCESS);
+        final long transferMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNanos);
+        getLogger().info("Successfully retrieved S3 Object for {} in {} millis; routing to success", new Object[] {flowFile, transferMillis});
+        session.getProvenanceReporter().receive(flowFile, "http://" + bucket + ".amazonaws.com/" + key, transferMillis);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/GetS3Object.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/GetS3Object.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/GetS3Object.java
deleted file mode 100644
index 6ba1bbf..0000000
--- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/GetS3Object.java
+++ /dev/null
@@ -1,165 +0,0 @@
-package org.apache.nifi.processors.aws.s3;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.nifi.annotation.documentation.CapabilityDescription;
-import org.apache.nifi.annotation.documentation.Tags;
-import org.apache.nifi.components.PropertyDescriptor;
-import org.apache.nifi.components.PropertyValue;
-import org.apache.nifi.flowfile.FlowFile;
-import org.apache.nifi.flowfile.attributes.CoreAttributes;
-import org.apache.nifi.processor.ProcessContext;
-import org.apache.nifi.processor.ProcessSession;
-import org.apache.nifi.processor.util.StandardValidators;
-
-import com.amazonaws.AmazonClientException;
-import com.amazonaws.services.s3.AmazonS3;
-import com.amazonaws.services.s3.model.GetObjectRequest;
-import com.amazonaws.services.s3.model.ObjectMetadata;
-import com.amazonaws.services.s3.model.S3Object;
-
-
-@Tags({"Amazon", "S3", "AWS", "Get"})
-@CapabilityDescription("Retrieves the contents of an S3 Object and writes it to the content of a FlowFile")
-public class GetS3Object extends AbstractS3Processor {
-
-    public static final PropertyDescriptor VERSION_ID = new PropertyDescriptor.Builder()
-        .name("Version")
-        .description("The Version of the Object to download")
-        .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
-        .expressionLanguageSupported(true)
-        .required(false)
-        .build();
-    
-    public static final PropertyDescriptor BYTE_RANGE_START = new PropertyDescriptor.Builder()
-        .name("First Byte Index")
-        .description("The 0-based index of the first byte to download. If specified, the first N bytes will be skipped, where N is the value of this property. If this value is greater than the size of the object, the FlowFile will be routed to failure.")
-        .required(false)
-        .expressionLanguageSupported(true)
-        .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
-        .build();
-    public static final PropertyDescriptor BYTE_RANGE_END = new PropertyDescriptor.Builder()
-        .name("Last Byte Index")
-        .description("The 0-based index of the last byte to download. If specified, last N bytes will be skipped, where N is the size of the object minus the value of this property. If the value is greater than the size of the object, the content will be downloaded to the end of the object.")
-        .required(false)
-        .expressionLanguageSupported(true)
-        .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
-        .build();
-    
-    
-    public static final List<PropertyDescriptor> properties = Collections.unmodifiableList(
-            Arrays.asList(BUCKET, KEY, REGION, ACCESS_KEY, SECRET_KEY, CREDENTAILS_FILE, TIMEOUT, VERSION_ID,
-                    BYTE_RANGE_START, BYTE_RANGE_END) );
-
-    @Override
-    protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
-        return properties;
-    }
-    
-    @Override
-    public void onTrigger(final ProcessContext context, final ProcessSession session) {
-        FlowFile flowFile = session.get();
-        if ( flowFile == null ) {
-            return;
-        }
-
-        final long startNanos = System.nanoTime();
-        final String bucket = context.getProperty(BUCKET).evaluateAttributeExpressions(flowFile).getValue();
-        final String key = context.getProperty(KEY).evaluateAttributeExpressions(flowFile).getValue();
-        final String versionId = context.getProperty(VERSION_ID).evaluateAttributeExpressions(flowFile).getValue();
-        
-        final AmazonS3 client = getClient();
-        final GetObjectRequest request;
-        if ( versionId == null ) {
-            request = new GetObjectRequest(bucket, key);
-        } else {
-            request = new GetObjectRequest(bucket, key, versionId);
-        }
-
-        final Long byteRangeStart;
-        final Long byteRangeEnd;
-        try {
-            final PropertyValue startVal = context.getProperty(BYTE_RANGE_START).evaluateAttributeExpressions(flowFile);
-            byteRangeStart = startVal.isSet() ? startVal.asLong() : 0L;
-            
-            final PropertyValue endVal = context.getProperty(BYTE_RANGE_END).evaluateAttributeExpressions(flowFile);
-            byteRangeEnd = endVal.isSet() ? endVal.asLong() : Long.MAX_VALUE;
-        } catch (final NumberFormatException nfe) {
-            getLogger().error("Failed to determine byte range for download for {} due to {}", new Object[] {flowFile, nfe});
-            session.transfer(flowFile, REL_FAILURE);
-            return;
-        }
-        
-        if ( byteRangeStart != null && byteRangeEnd != null ) {
-            if ( byteRangeEnd.longValue() < byteRangeStart.longValue() ) {
-                getLogger().error("Failed to download object from S3 for {} because Start Byte Range is {} and End Byte Range is {}, which is less", new Object[] {flowFile, byteRangeStart, byteRangeEnd});
-                session.transfer(flowFile, REL_FAILURE);
-                return;
-            }
-            
-            request.setRange(byteRangeStart.longValue(), byteRangeEnd.longValue());
-        }
-        
-        final Map<String, String> attributes = new HashMap<>();
-        try (final S3Object s3Object = client.getObject(request)) {
-            flowFile = session.importFrom(s3Object.getObjectContent(), flowFile);
-            attributes.put("s3.bucket", s3Object.getBucketName());
-            
-            final ObjectMetadata metadata = s3Object.getObjectMetadata();
-            if ( metadata.getContentDisposition() != null ) {
-                final String fullyQualified = metadata.getContentDisposition();
-                final int lastSlash = fullyQualified.lastIndexOf("/");
-                if ( lastSlash > -1 && lastSlash < fullyQualified.length() - 1 ) {
-                    attributes.put(CoreAttributes.PATH.key(), fullyQualified.substring(0, lastSlash));
-                    attributes.put(CoreAttributes.ABSOLUTE_PATH.key(), fullyQualified);
-                    attributes.put(CoreAttributes.FILENAME.key(), fullyQualified.substring(lastSlash + 1));
-                } else {
-                    attributes.put(CoreAttributes.FILENAME.key(), metadata.getContentDisposition());
-                }
-            }
-            if (metadata.getContentMD5() != null ) {
-                attributes.put("hash.value", metadata.getContentMD5());
-                attributes.put("hash.algorithm", "MD5");
-            }
-            if ( metadata.getContentType() != null ) {
-                attributes.put(CoreAttributes.MIME_TYPE.key(), metadata.getContentType());
-            }
-            if ( metadata.getETag() != null ) {
-                attributes.put("s3.etag", metadata.getETag());
-            }
-            if ( metadata.getExpirationTime() != null ) {
-                attributes.put("s3.expirationTime", String.valueOf(metadata.getExpirationTime().getTime()));
-            }
-            if ( metadata.getExpirationTimeRuleId() != null ) {
-                attributes.put("s3.expirationTimeRuleId", metadata.getExpirationTimeRuleId());
-            }
-            if ( metadata.getUserMetadata() != null ) {
-                attributes.putAll(metadata.getUserMetadata());
-            }
-            if ( metadata.getVersionId() != null ) {
-                attributes.put("s3.version", metadata.getVersionId());
-            }
-        } catch (final IOException | AmazonClientException ioe) {
-            getLogger().error("Failed to retrieve S3 Object for {}; routing to failure", new Object[] {flowFile, ioe});
-            session.transfer(flowFile, REL_FAILURE);
-            return;
-        }
-
-        if ( !attributes.isEmpty() ) {
-            flowFile = session.putAllAttributes(flowFile, attributes);
-        }
-
-        session.transfer(flowFile, REL_SUCCESS);
-        final long transferMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNanos);
-        getLogger().info("Successfully retrieved S3 Object for {} in {} millis; routing to success", new Object[] {flowFile, transferMillis});
-        session.getProvenanceReporter().receive(flowFile, "http://" + bucket + ".amazonaws.com/" + key, transferMillis);
-    }
-
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/PutS3Object.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/PutS3Object.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/PutS3Object.java
index 1fe5db1..9a4fc5b 100644
--- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/PutS3Object.java
+++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/PutS3Object.java
@@ -1,3 +1,19 @@
+/*
+ * 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.aws.s3;
 
 import java.io.BufferedInputStream;
@@ -11,7 +27,13 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.nifi.annotation.behavior.DynamicProperty;
+import org.apache.nifi.annotation.behavior.ReadsAttribute;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
 import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.SeeAlso;
 import org.apache.nifi.annotation.documentation.Tags;
 import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.flowfile.FlowFile;
@@ -30,11 +52,21 @@ import com.amazonaws.services.s3.model.PutObjectRequest;
 import com.amazonaws.services.s3.model.PutObjectResult;
 import com.amazonaws.services.s3.model.StorageClass;
 
-
+@SupportsBatching
+@SeeAlso({FetchS3Object.class})
 @Tags({"Amazon", "S3", "AWS", "Archive", "Put"})
 @CapabilityDescription("Puts FlowFiles to an Amazon S3 Bucket")
+@DynamicProperty(name="The name of a User-Defined Metadata field to add to the S3 Object", 
+	value="The value of a User-Defined Metadata field to add to the S3 Object", 
+	description="Allows user-defined metadata to be added to the S3 object as key/value pairs",
+	supportsExpressionLanguage=true)
+@ReadsAttribute(attribute="filename", description="Uses the FlowFile's filename as the filename for the S3 object")
+@WritesAttributes({
+	@WritesAttribute(attribute="s3.version", description="The version of the S3 Object that was put to S3"),
+	@WritesAttribute(attribute="s3.etag", description="The ETag of the S3 Object"),
+	@WritesAttribute(attribute="s3.expiration", description="A human-readable form of the expiration date of the S3 object, if one is set")
+})
 public class PutS3Object extends AbstractS3Processor {
-
     public static final PropertyDescriptor EXPIRATION_RULE_ID = new PropertyDescriptor.Builder()
         .name("Expiration Time Rule")
         .required(false)

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sns/AbstractSNSProcessor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sns/AbstractSNSProcessor.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sns/AbstractSNSProcessor.java
index d2404f3..5447169 100644
--- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sns/AbstractSNSProcessor.java
+++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sns/AbstractSNSProcessor.java
@@ -1,3 +1,19 @@
+/*
+ * 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.aws.sns;
 
 import org.apache.nifi.components.AllowableValue;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/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 bc690eb..1de3251 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
@@ -1,3 +1,19 @@
+/*
+ * 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.aws.sns;
 
 import java.io.ByteArrayOutputStream;
@@ -7,24 +23,24 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.nifi.annotation.behavior.SupportsBatching;
 import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.SeeAlso;
 import org.apache.nifi.annotation.documentation.Tags;
 import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.flowfile.FlowFile;
 import org.apache.nifi.processor.ProcessContext;
 import org.apache.nifi.processor.ProcessSession;
 import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.aws.sqs.GetSQS;
+import org.apache.nifi.processors.aws.sqs.PutSQS;
 
 import com.amazonaws.services.sns.AmazonSNSClient;
 import com.amazonaws.services.sns.model.MessageAttributeValue;
 import com.amazonaws.services.sns.model.PublishRequest;
 
-
-// TODO: Allow user to choose 'content strategy'
-//       1. Content from message body or attributes? If attributes, allow new property for configuring EL expression. Otherwise, no property.
-//       2. Same content to all subscribers or different content per subscription type? 
-//              If same, just use single property.
-//              If different, must use Attribute values for each and have a separate property for each type of subscription (HTTP, HTTPS, E-mail, SMS, etc.)
+@SupportsBatching
+@SeeAlso({GetSQS.class, PutSQS.class})
 @Tags({"amazon", "aws", "sns", "topic", "put", "publish", "pubsub"})
 @CapabilityDescription("Sends the content of a FlowFile as a notification to the Amazon Simple Notification Service")
 public class PutSNS extends AbstractSNSProcessor {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/AbstractSQSProcessor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/AbstractSQSProcessor.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/AbstractSQSProcessor.java
index 72eec4c..2ef749f 100644
--- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/AbstractSQSProcessor.java
+++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/AbstractSQSProcessor.java
@@ -1,3 +1,19 @@
+/*
+ * 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.aws.sqs;
 
 import org.apache.nifi.components.PropertyDescriptor;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/DeleteSQS.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/DeleteSQS.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/DeleteSQS.java
index 3659a50..2416044 100644
--- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/DeleteSQS.java
+++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/DeleteSQS.java
@@ -1,3 +1,19 @@
+/*
+ * 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.aws.sqs;
 
 import java.util.ArrayList;
@@ -5,7 +21,9 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.nifi.annotation.behavior.SupportsBatching;
 import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.SeeAlso;
 import org.apache.nifi.annotation.documentation.Tags;
 import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.flowfile.FlowFile;
@@ -17,8 +35,9 @@ import com.amazonaws.services.sqs.AmazonSQSClient;
 import com.amazonaws.services.sqs.model.DeleteMessageBatchRequest;
 import com.amazonaws.services.sqs.model.DeleteMessageBatchRequestEntry;
 
-
-@Tags({"Amazon", "SQS", "Queue", "Delete"})
+@SupportsBatching
+@SeeAlso({GetSQS.class, PutSQS.class})
+@Tags({"Amazon", "AWS", "SQS", "Queue", "Delete"})
 @CapabilityDescription("Deletes a message from an Amazon Simple Queuing Service Queue")
 public class DeleteSQS extends AbstractSQSProcessor {
     public static final PropertyDescriptor RECEIPT_HANDLE = new PropertyDescriptor.Builder()
@@ -41,9 +60,6 @@ public class DeleteSQS extends AbstractSQSProcessor {
     
     @Override
     public void onTrigger(final ProcessContext context, final ProcessSession session) {
-        // TODO: Process batch of FlowFiles. To do this, we have to first poll the first
-        // FlowFile and then use session.get(FlowFileFilter) to get up to BATCH_SIZE - 1
-        // more results that have the same Queue URL.
         List<FlowFile> flowFiles = session.get(1);
         if ( flowFiles.isEmpty() ) {
             return;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/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 1af3780..6c0257b 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
@@ -1,3 +1,19 @@
+/*
+ * 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.aws.sqs;
 
 import java.io.IOException;
@@ -12,7 +28,11 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
 import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.SeeAlso;
 import org.apache.nifi.annotation.documentation.Tags;
 import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.flowfile.FlowFile;
@@ -30,10 +50,17 @@ import com.amazonaws.services.sqs.model.MessageAttributeValue;
 import com.amazonaws.services.sqs.model.ReceiveMessageRequest;
 import com.amazonaws.services.sqs.model.ReceiveMessageResult;
 
-@Tags({ "Amazon", "SQS", "Queue", "Get", "Fetch", "Poll"})
+@SupportsBatching
+@Tags({ "Amazon", "AWS", "SQS", "Queue", "Get", "Fetch", "Poll"})
+@SeeAlso({PutSQS.class, DeleteSQS.class})
 @CapabilityDescription("Fetches messages from an Amazon Simple Queuing Service Queue")
+@WritesAttributes({
+	@WritesAttribute(attribute="hash.value", description="The MD5 sum of the message"),
+	@WritesAttribute(attribute="hash.algorithm", description="MD5"),
+	@WritesAttribute(attribute="sqs.message.id", description="The unique identifier of the SQS message"),
+	@WritesAttribute(attribute="sqs.receipt.handle", description="The SQS Receipt Handle that is to be used to delete the message from the queue")
+})
 public class GetSQS extends AbstractSQSProcessor {
-
     public static final PropertyDescriptor CHARSET = new PropertyDescriptor.Builder()
         .name("Character Set")
         .description("The Character Set that should be used to encode the textual content of the SQS message")

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/PutSQS.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/PutSQS.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/PutSQS.java
index cac4d73..81268fe 100644
--- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/PutSQS.java
+++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/PutSQS.java
@@ -1,3 +1,19 @@
+/*
+ * 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.aws.sqs;
 
 import java.io.ByteArrayOutputStream;
@@ -11,7 +27,10 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.nifi.annotation.behavior.DynamicProperty;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
 import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.SeeAlso;
 import org.apache.nifi.annotation.documentation.Tags;
 import org.apache.nifi.annotation.lifecycle.OnScheduled;
 import org.apache.nifi.components.PropertyDescriptor;
@@ -26,8 +45,13 @@ import com.amazonaws.services.sqs.model.SendMessageBatchRequest;
 import com.amazonaws.services.sqs.model.SendMessageBatchRequestEntry;
 
 
-@Tags({"Amazon", "SQS", "Queue", "Put", "Publish"})
+@SupportsBatching
+@Tags({"Amazon", "AWS", "SQS", "Queue", "Put", "Publish"})
+@SeeAlso({GetSQS.class, DeleteSQS.class})
 @CapabilityDescription("Publishes a message to an Amazon Simple Queuing Service Queue")
+@DynamicProperty(name="The name of a Message Attribute to add to the message", value="The value of the Message Attribute", 
+	description="Allows the user to add key/value pairs as Message Attributes by adding a property whose name will become the name of "
+			+ "the Message Attribute and value will become the value of the Message Attribute", supportsExpressionLanguage=true)
 public class PutSQS extends AbstractSQSProcessor {
 
     public static final PropertyDescriptor DELAY = new PropertyDescriptor.Builder()
@@ -71,10 +95,6 @@ public class PutSQS extends AbstractSQSProcessor {
     
     @Override
     public void onTrigger(final ProcessContext context, final ProcessSession session) {
-        // TODO: Process batch of FlowFiles. To do this, we have to first poll the first
-        // FlowFile and then use session.get(FlowFileFilter) to get up to BATCH_SIZE - 1
-        // more results that have the same Queue URL.
-        
         FlowFile flowFile = session.get();
         if ( flowFile == null ) {
             return;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
index 32a395a..4f2405c 100644
--- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
+++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
@@ -12,7 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-org.apache.nifi.processors.aws.s3.GetS3Object
+org.apache.nifi.processors.aws.s3.FetchS3Object
 org.apache.nifi.processors.aws.s3.PutS3Object
 org.apache.nifi.processors.aws.sns.PutSNS
 org.apache.nifi.processors.aws.sqs.GetSQS

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/TestFetchS3Object.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/TestFetchS3Object.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/TestFetchS3Object.java
new file mode 100644
index 0000000..40f9515
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/TestFetchS3Object.java
@@ -0,0 +1,44 @@
+package org.apache.nifi.processors.aws.s3;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.nifi.util.MockFlowFile;
+import org.apache.nifi.util.TestRunner;
+import org.apache.nifi.util.TestRunners;
+import org.junit.Ignore;
+import org.junit.Test;
+
+@Ignore("For local testing only - interacts with S3 so the credentials file must be configured and all necessary buckets created")
+public class TestFetchS3Object {
+    private final String CREDENTIALS_FILE = System.getProperty("user.home") + "/aws-credentials.properties";
+    
+    @Test
+    public void testGet() throws IOException {
+        final TestRunner runner = TestRunners.newTestRunner(new FetchS3Object());
+        runner.setProperty(FetchS3Object.BUCKET, "anonymous-test-bucket-00000000");
+        runner.setProperty(FetchS3Object.CREDENTAILS_FILE, CREDENTIALS_FILE);
+        runner.setProperty(FetchS3Object.KEY, "folder/1.txt");
+        
+        final Map<String, String> attrs = new HashMap<>();
+        attrs.put("start", "0");
+        
+        runner.enqueue(new byte[0], attrs);
+        runner.run(1);
+        
+        runner.assertAllFlowFilesTransferred(FetchS3Object.REL_SUCCESS, 1);
+        final List<MockFlowFile> ffs = runner.getFlowFilesForRelationship(FetchS3Object.REL_SUCCESS);
+        final MockFlowFile out = ffs.iterator().next();
+        
+        final byte[] expectedBytes = Files.readAllBytes(Paths.get("src/test/resources/hello.txt"));
+        out.assertContentEquals(new String(expectedBytes));
+        for ( final Map.Entry<String, String> entry : out.getAttributes().entrySet() ) {
+            System.out.println(entry.getKey() + " : " + entry.getValue());
+        }
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/TestGetS3Object.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/TestGetS3Object.java b/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/TestGetS3Object.java
deleted file mode 100644
index 391c8b4..0000000
--- a/nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/TestGetS3Object.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.apache.nifi.processors.aws.s3;
-
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.nifi.util.MockFlowFile;
-import org.apache.nifi.util.TestRunner;
-import org.apache.nifi.util.TestRunners;
-import org.junit.Ignore;
-import org.junit.Test;
-
-@Ignore("For local testing only - interacts with S3 so the credentials file must be configured and all necessary buckets created")
-public class TestGetS3Object {
-    private final String CREDENTIALS_FILE = System.getProperty("user.home") + "/aws-credentials.properties";
-    
-    @Test
-    public void testGet() throws IOException {
-        final TestRunner runner = TestRunners.newTestRunner(new GetS3Object());
-        runner.setProperty(GetS3Object.BUCKET, "anonymous-test-bucket-00000000");
-        runner.setProperty(GetS3Object.CREDENTAILS_FILE, CREDENTIALS_FILE);
-        runner.setProperty(GetS3Object.KEY, "folder/1.txt");
-        
-        runner.setProperty(GetS3Object.BYTE_RANGE_START, "${start}");
-        runner.setProperty(GetS3Object.BYTE_RANGE_END, String.valueOf(Long.MAX_VALUE));
-        
-        final Map<String, String> attrs = new HashMap<>();
-        attrs.put("start", "0");
-        
-        runner.enqueue(new byte[0], attrs);
-        runner.run(1);
-        
-        runner.assertAllFlowFilesTransferred(GetS3Object.REL_SUCCESS, 1);
-        final List<MockFlowFile> ffs = runner.getFlowFilesForRelationship(GetS3Object.REL_SUCCESS);
-        final MockFlowFile out = ffs.iterator().next();
-        
-        final byte[] expectedBytes = Files.readAllBytes(Paths.get("src/test/resources/hello.txt"));
-        out.assertContentEquals(new String(expectedBytes));
-        for ( final Map.Entry<String, String> entry : out.getAttributes().entrySet() ) {
-            System.out.println(entry.getKey() + " : " + entry.getValue());
-        }
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0211d0d7/nifi/nifi-nar-bundles/nifi-aws-bundle/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-aws-bundle/pom.xml b/nifi/nifi-nar-bundles/nifi-aws-bundle/pom.xml
index 81a54e4..117d7dd 100644
--- a/nifi/nifi-nar-bundles/nifi-aws-bundle/pom.xml
+++ b/nifi/nifi-nar-bundles/nifi-aws-bundle/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>org.apache.nifi</groupId>
         <artifactId>nifi-nar-bundles</artifactId>
-        <version>0.0.2-incubating-SNAPSHOT</version>
+        <version>0.1.0-incubating-SNAPSHOT</version>
     </parent>
 
     <artifactId>nifi-aws-bundle</artifactId>


[46/50] [abbrv] incubator-nifi git commit: Merge branch 'persistent-prov-fixes' into develop

Posted by jo...@apache.org.
Merge branch 'persistent-prov-fixes' 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/c5b961be
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/c5b961be
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/c5b961be

Branch: refs/heads/NIFI-271
Commit: c5b961be5bf9668e210cfb36fb727dd6bcc88194
Parents: 3667a28 a06c253
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 17 12:09:07 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 17 12:09:07 2015 -0400

----------------------------------------------------------------------
 .../nifi/provenance/lucene/DocsReader.java      | 20 +++++-----
 .../provenance/serialization/RecordReaders.java | 41 ++++++++++++++++++--
 2 files changed, 47 insertions(+), 14 deletions(-)
----------------------------------------------------------------------



[39/50] [abbrv] incubator-nifi git commit: NIFI-517: - Automatically logging stack trace when the exception maps to a 500 response code.

Posted by jo...@apache.org.
NIFI-517:
- Automatically logging stack trace when the exception maps to a 500 response code.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/b2a806ab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/b2a806ab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/b2a806ab

Branch: refs/heads/NIFI-271
Commit: b2a806ab2ebbe48089acf9612e0ce1630e806ba3
Parents: 58ea7af
Author: Matt Gilman <ma...@gmail.com>
Authored: Sat Apr 11 18:49:03 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Sat Apr 11 18:49:03 2015 -0400

----------------------------------------------------------------------
 .../nifi/web/api/config/AdministrationExceptionMapper.java     | 6 +-----
 .../org/apache/nifi/web/api/config/ClusterExceptionMapper.java | 6 +-----
 .../java/org/apache/nifi/web/api/config/ThrowableMapper.java   | 3 +--
 3 files changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b2a806ab/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/AdministrationExceptionMapper.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/config/AdministrationExceptionMapper.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/AdministrationExceptionMapper.java
index ef91254..d631d82 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/AdministrationExceptionMapper.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/AdministrationExceptionMapper.java
@@ -35,11 +35,7 @@ public class AdministrationExceptionMapper implements ExceptionMapper<Administra
     @Override
     public Response toResponse(AdministrationException exception) {
         // log the error
-        logger.info(String.format("%s. Returning %s response.", exception, Response.Status.INTERNAL_SERVER_ERROR));
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(StringUtils.EMPTY, exception);
-        }
+        logger.error(String.format("%s. Returning %s response.", exception, Response.Status.INTERNAL_SERVER_ERROR), exception);
 
         // generate the response
         return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(exception.getMessage()).type("text/plain").build();

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b2a806ab/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/ClusterExceptionMapper.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/config/ClusterExceptionMapper.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/ClusterExceptionMapper.java
index 19c9704..a3c9884 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/ClusterExceptionMapper.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/ClusterExceptionMapper.java
@@ -35,11 +35,7 @@ public class ClusterExceptionMapper implements ExceptionMapper<ClusterException>
     @Override
     public Response toResponse(ClusterException exception) {
         // log the error
-        logger.info(String.format("%s. Returning %s response.", exception, Response.Status.INTERNAL_SERVER_ERROR));
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(StringUtils.EMPTY, exception);
-        }
+        logger.error(String.format("%s. Returning %s response.", exception, Response.Status.INTERNAL_SERVER_ERROR), exception);
 
         return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(exception.getMessage()).type("text/plain").build();
     }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b2a806ab/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/ThrowableMapper.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/config/ThrowableMapper.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/ThrowableMapper.java
index 0ef6edb..7277250 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/ThrowableMapper.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/config/ThrowableMapper.java
@@ -34,8 +34,7 @@ public class ThrowableMapper implements ExceptionMapper<Throwable> {
     @Override
     public Response toResponse(Throwable exception) {
         // log the error
-        logger.error(String.format("An unexpected error has occurred: %s. Returning %s response.", exception, Response.Status.INTERNAL_SERVER_ERROR));
-        logger.error(StringUtils.EMPTY, exception);
+        logger.error(String.format("An unexpected error has occurred: %s. Returning %s response.", exception, Response.Status.INTERNAL_SERVER_ERROR), exception);
 
         return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("An unexpected error has occurred. Please check the logs for additional details.").type("text/plain").build();
     }


[22/50] [abbrv] incubator-nifi git commit: Merge branch 'develop' of http://git-wip-us.apache.org/repos/asf/incubator-nifi into develop

Posted by jo...@apache.org.
Merge branch 'develop' of http://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/c201aa1d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/c201aa1d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/c201aa1d

Branch: refs/heads/NIFI-271
Commit: c201aa1d088e6e041fce8a25ca974c5759e5d61c
Parents: e18c0a7 c1959b3
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 10 09:39:20 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 10 09:39:20 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/nifi/util/EscapeUtils.java  |  42 +++
 .../nifi/web/api/dto/DocumentedTypeDTO.java     |  14 -
 .../nifi/web/api/dto/PropertyDescriptorDTO.java |   9 +-
 .../org/apache/nifi/web/NiFiServiceFacade.java  |   3 +-
 .../nifi/web/StandardNiFiContentAccess.java     |  10 +-
 .../nifi/web/StandardNiFiServiceFacade.java     |   4 +-
 .../apache/nifi/web/api/ControllerResource.java |   7 +-
 .../web/api/config/NotFoundExceptionMapper.java |  48 +++
 .../org/apache/nifi/web/api/dto/DtoFactory.java | 135 +-------
 .../nifi/web/controller/ControllerFacade.java   |  43 ++-
 .../org/apache/nifi/web/util/SnippetUtils.java  |   6 +-
 .../src/main/resources/nifi-web-api-context.xml |   1 +
 .../nifi/web/ContentViewerController.java       |  18 +-
 .../src/main/webapp/WEB-INF/jsp/header.jsp      |  20 +-
 .../src/main/webapp/js/hexview/hexview.js       |   4 +-
 .../nifi-web/nifi-web-docs/pom.xml              |   6 +
 .../nifi/web/docs/DocumentationController.java  |   5 +-
 .../main/webapp/WEB-INF/jsp/documentation.jsp   |  20 +-
 .../src/main/webapp/js/application.js           |   7 +-
 .../nifi-framework/nifi-web/nifi-web-ui/pom.xml |   6 +
 .../main/webapp/WEB-INF/pages/message-page.jsp  |   6 +-
 .../src/main/webapp/css/settings.css            |  15 -
 .../propertytable/jquery.propertytable.css      |  43 +++
 .../propertytable/jquery.propertytable.js       | 337 ++++++++++++++++---
 .../js/nf/canvas/nf-controller-service.js       | 186 +++++-----
 .../js/nf/canvas/nf-processor-configuration.js  | 136 +++++---
 .../webapp/js/nf/canvas/nf-reporting-task.js    | 135 +++++---
 .../src/main/webapp/js/nf/canvas/nf-settings.js | 227 ++-----------
 .../nifi-standard-content-viewer/pom.xml        |   5 +
 .../src/main/webapp/WEB-INF/jsp/codemirror.jsp  |   7 +-
 .../nifi-update-attribute-ui/pom.xml            |   5 +
 .../src/main/webapp/WEB-INF/jsp/worksheet.jsp   |   8 +-
 32 files changed, 854 insertions(+), 664 deletions(-)
----------------------------------------------------------------------



[11/50] [abbrv] incubator-nifi git commit: NIFI-506: Initial import of HL7 work

Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/java/org/apache/nifi/processors/hl7/ExtractHL7Attributes.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/java/org/apache/nifi/processors/hl7/ExtractHL7Attributes.java b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/java/org/apache/nifi/processors/hl7/ExtractHL7Attributes.java
new file mode 100644
index 0000000..e4a0d53
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/java/org/apache/nifi/processors/hl7/ExtractHL7Attributes.java
@@ -0,0 +1,247 @@
+/*
+ * 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.hl7;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.processor.AbstractProcessor;
+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.InputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.stream.io.StreamUtils;
+
+import ca.uhn.hl7v2.DefaultHapiContext;
+import ca.uhn.hl7v2.HL7Exception;
+import ca.uhn.hl7v2.HapiContext;
+import ca.uhn.hl7v2.model.Composite;
+import ca.uhn.hl7v2.model.Group;
+import ca.uhn.hl7v2.model.Message;
+import ca.uhn.hl7v2.model.Primitive;
+import ca.uhn.hl7v2.model.Segment;
+import ca.uhn.hl7v2.model.Structure;
+import ca.uhn.hl7v2.model.Type;
+import ca.uhn.hl7v2.model.Varies;
+import ca.uhn.hl7v2.parser.PipeParser;
+import ca.uhn.hl7v2.validation.impl.ValidationContextFactory;
+
+
+@SideEffectFree
+@SupportsBatching
+@Tags({"HL7", "health level 7", "healthcare", "extract", "attributes"})
+@CapabilityDescription("Extracts information from an HL7 (Health Level 7) formatted FlowFile and adds the information as FlowFile Attributes. "
+		+ "The attributes are named as <Segment Name> <dot> <Field Index>. If the segment is repeating, the naming will be "
+		+ "<Segment Name> <underscore> <Segment Index> <dot> <Field Index>. For example, we may have an attribute named \"MHS.12\" with "
+		+ "a value of \"2.1\" and an attribute named \"OBX_11.3\" with a value of \"93000^CPT4\".")
+public class ExtractHL7Attributes extends AbstractProcessor {
+	public static final PropertyDescriptor CHARACTER_SET = new PropertyDescriptor.Builder()
+		.name("Character Encoding")
+		.description("The Character Encoding that is used to encode the HL7 data")
+		.required(true)
+		.expressionLanguageSupported(true)
+		.addValidator(StandardValidators.CHARACTER_SET_VALIDATOR)
+		.defaultValue("UTF-8")
+		.build();
+
+	public static final Relationship REL_SUCCESS = new Relationship.Builder()
+		.name("success")
+		.description("A FlowFile is routed to this relationship if it is properly parsed as HL7 and its attributes extracted")
+		.build();
+	
+	public static final Relationship REL_FAILURE = new Relationship.Builder()
+		.name("failure")
+		.description("A FlowFile is routed to this relationship if it cannot be mapped to FlowFile Attributes. This would happen if the FlowFile does not contain valid HL7 data")
+		.build();
+	
+	
+	@Override
+	protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
+		final List<PropertyDescriptor> properties = new ArrayList<>();
+		properties.add(CHARACTER_SET);
+		return properties;
+	}
+	
+	@Override
+	public Set<Relationship> getRelationships() {
+		final Set<Relationship> relationships = new HashSet<>();
+		relationships.add(REL_SUCCESS);
+		relationships.add(REL_FAILURE);
+		return relationships;
+	}
+	
+	@Override
+	public void onTrigger(final ProcessContext context, final ProcessSession session) throws ProcessException {
+		FlowFile flowFile = session.get();
+		if ( flowFile == null ) {
+			return;
+		}
+		
+		final Charset charset = Charset.forName(context.getProperty(CHARACTER_SET).evaluateAttributeExpressions(flowFile).getValue());
+		
+		final byte[] buffer = new byte[(int) flowFile.getSize()];
+		session.read(flowFile, new InputStreamCallback() {
+			@Override
+			public void process(final InputStream in) throws IOException {
+				StreamUtils.fillBuffer(in, buffer);
+			}
+		});
+
+		@SuppressWarnings("resource")
+		final HapiContext hapiContext = new DefaultHapiContext();
+		hapiContext.setValidationContext(ValidationContextFactory.noValidation());
+		
+		final PipeParser parser = hapiContext.getPipeParser();
+		final String hl7Text = new String(buffer, charset);
+		final Message message;
+		try {
+			message = parser.parse(hl7Text);
+			final Group group = message.getParent();
+
+			final Map<String, String> attributes = new HashMap<>();
+			extractAttributes(group, attributes);
+			flowFile = session.putAllAttributes(flowFile, attributes);
+			getLogger().info("Successfully extracted {} attributes for {}; routing to success", new Object[] {attributes.size(), flowFile});
+			getLogger().debug("Added the following attributes for {}: {}", new Object[] {flowFile, attributes});
+			session.transfer(flowFile, REL_SUCCESS);
+		} catch (final HL7Exception e) {
+			getLogger().error("Failed to extract attributes from {} due to {}", new Object[] {flowFile, e});
+			session.transfer(flowFile, REL_FAILURE);
+			return;
+		}
+	}
+
+	private void extractAttributes(final Group group, final Map<String, String> attributes) throws HL7Exception {
+		extractAttributes(group, attributes, new HashMap<String, Integer>());
+	}
+	
+	private void extractAttributes(final Group group, final Map<String, String> attributes, final Map<String, Integer> segmentCounts) throws HL7Exception {
+		if ( group.isEmpty() ) {
+			return;
+		}
+		
+		final String[] structureNames = group.getNames();
+		for ( final String structName : structureNames ) {
+			final Structure[] subStructures = group.getAll(structName);
+
+			if ( group.isGroup(structName) ) {
+				for ( final Structure subStructure : subStructures ) {
+					final Group subGroup = (Group) subStructure;
+					extractAttributes(subGroup, attributes, segmentCounts);
+				}
+			} else {
+				for ( final Structure structure : subStructures ) {
+					final Segment segment = (Segment) structure	;
+					
+					final String segmentName = segment.getName();
+					Integer segmentNum = segmentCounts.get(segmentName);
+					if (segmentNum == null) {
+						segmentNum = 1;
+						segmentCounts.put(segmentName, 1);
+					} else {
+						segmentNum++;
+						segmentCounts.put(segmentName, segmentNum);
+					}
+					
+					final boolean segmentRepeating = segment.getParent().isRepeating(segment.getName());
+					final boolean parentRepeating = (segment.getParent().getParent() != segment.getParent() && segment.getParent().getParent().isRepeating(segment.getParent().getName()));
+					final boolean useSegmentIndex = segmentRepeating || parentRepeating;
+					
+					final Map<String, String> attributeMap = getAttributes(segment, useSegmentIndex ? segmentNum : null);
+					attributes.putAll(attributeMap);
+				}
+			}
+		}
+	}
+	
+	
+	private Map<String, String> getAttributes(final Segment segment, final Integer segmentNum) throws HL7Exception {
+		final Map<String, String> attributes = new HashMap<>();
+		
+		for (int i=1; i <= segment.numFields(); i++) {
+			final String fieldName = segment.getName() + (segmentNum == null ? "" : "_" + segmentNum) + "." + i;
+			final Type[] types = segment.getField(i);
+			final StringBuilder sb = new StringBuilder();
+			for ( final Type type : types ) {
+				final String typeValue = getValue(type);
+				if ( !typeValue.isEmpty() ) {
+					sb.append(typeValue).append("^");
+				}
+			}
+			
+			if ( sb.length() == 0 ) {
+				continue;
+			}
+			String typeVal = sb.toString();
+			if ( typeVal.endsWith("^") ) {
+				typeVal = typeVal.substring(0, typeVal.length() - 1);
+			}
+			
+			attributes.put(fieldName, typeVal);
+		}
+
+		return attributes;
+	}
+	
+	
+	private String getValue(final Type type) {
+		if ( type == null ) {
+			return "";
+		}
+		
+		if ( type instanceof Primitive ) {
+			final String value = ((Primitive) type).getValue();
+			return value == null ? "" : value;
+		} else if ( type instanceof Composite ) {
+			final StringBuilder sb = new StringBuilder();
+			final Composite composite = (Composite) type;
+			for ( final Type component : composite.getComponents() ) {
+				final String componentValue = getValue(component);
+				if ( !componentValue.isEmpty() ) {
+					sb.append(componentValue).append("^");
+				}
+			}
+			
+			final String value = sb.toString();
+			if ( value.endsWith("^") ) {
+				return value.substring(0, value.length() - 1);
+			}
+			
+			return value;
+		} else if ( type instanceof Varies ) {
+			final Varies varies = (Varies) type;
+			return getValue(varies.getData());
+		}
+		
+		return "";
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/java/org/apache/nifi/processors/hl7/RouteHL7.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/java/org/apache/nifi/processors/hl7/RouteHL7.java b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/java/org/apache/nifi/processors/hl7/RouteHL7.java
new file mode 100644
index 0000000..c8c4176
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/java/org/apache/nifi/processors/hl7/RouteHL7.java
@@ -0,0 +1,217 @@
+/*
+ * 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.hl7;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.nifi.annotation.behavior.DynamicProperties;
+import org.apache.nifi.annotation.behavior.DynamicProperty;
+import org.apache.nifi.annotation.behavior.EventDriven;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.ValidationContext;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.components.Validator;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.hl7.hapi.HapiMessage;
+import org.apache.nifi.hl7.model.HL7Message;
+import org.apache.nifi.hl7.query.HL7Query;
+import org.apache.nifi.hl7.query.QueryResult;
+import org.apache.nifi.hl7.query.exception.HL7QueryParsingException;
+import org.apache.nifi.processor.AbstractProcessor;
+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.InputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.stream.io.StreamUtils;
+
+import ca.uhn.hl7v2.DefaultHapiContext;
+import ca.uhn.hl7v2.HapiContext;
+import ca.uhn.hl7v2.model.Message;
+import ca.uhn.hl7v2.parser.PipeParser;
+import ca.uhn.hl7v2.validation.impl.ValidationContextFactory;
+
+@EventDriven
+@SideEffectFree
+@SupportsBatching
+@Tags({"HL7", "healthcare", "route", "Health Level 7"})
+@DynamicProperties({@DynamicProperty(name="Name of a Relationship", value="An HL7 Query Language query", description="If a FlowFile matches the query, it will be routed to a relationship with the name of the property")})
+@WritesAttributes({@WritesAttribute(attribute="RouteHL7.Route", description="The name of the relationship to which the FlowFile was routed")})
+@CapabilityDescription("Routes incoming HL7 data according to user-defined queries. To add a query, add a new property to the processor."
+		+ " The name of the property will become a new relationship for the processor, and the value is an HL7 Query Language query. If"
+		+ " a FlowFile matches the query, a copy of the FlowFile will be routed to the associated relationship.")
+public class RouteHL7 extends AbstractProcessor {
+	public static final PropertyDescriptor CHARACTER_SET = new PropertyDescriptor.Builder()
+		.name("Character Encoding")
+		.description("The Character Encoding that is used to encode the HL7 data")
+		.required(true)
+		.expressionLanguageSupported(true)
+		.addValidator(StandardValidators.CHARACTER_SET_VALIDATOR)
+		.defaultValue("UTF-8")
+		.build();
+
+	static final Relationship REL_FAILURE = new Relationship.Builder()
+		.name("failure")
+		.description("Any FlowFile that cannot be parsed as HL7 will be routed to this relationship")
+		.build();
+	static final Relationship REL_ORIGINAL = new Relationship.Builder()
+		.name("original")
+		.description("The original FlowFile that comes into this processor will be routed to this relationship, unless it is routed to 'failure'")
+		.build();
+	
+	private volatile Map<Relationship, HL7Query> queries = new HashMap<>();
+	
+	@Override
+	protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
+		return new PropertyDescriptor.Builder()
+			.name(propertyDescriptorName)
+			.description("Specifies a query that will cause any HL7 message matching the query to be routed to the '" + propertyDescriptorName + "' relationship")
+			.required(false)
+			.dynamic(true)
+			.addValidator(new HL7QueryValidator())
+			.build();
+	}
+
+	@Override
+	protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
+		final List<PropertyDescriptor> properties = new ArrayList<>();
+		properties.add(CHARACTER_SET);
+		return properties;
+	}
+	
+	@Override
+	public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) {
+		if ( !descriptor.isDynamic() ) {
+			return;
+		}
+		
+		final Map<Relationship, HL7Query> updatedQueryMap = new HashMap<>(queries);
+		final Relationship relationship = new Relationship.Builder().name(descriptor.getName()).build();
+		
+		if ( newValue == null ) {
+			updatedQueryMap.remove(relationship);
+		} else {
+			final HL7Query query = HL7Query.compile(newValue);
+			updatedQueryMap.put(relationship, query);
+		}
+		
+		this.queries = updatedQueryMap;
+	}
+	
+	@Override
+	public Set<Relationship> getRelationships() {
+		final Set<Relationship> relationships = new HashSet<>(queries.keySet());
+		relationships.add(REL_FAILURE);
+		relationships.add(REL_ORIGINAL);
+		return relationships;
+	}
+	
+	@Override
+	public void onTrigger(final ProcessContext context, final ProcessSession session) throws ProcessException {
+		FlowFile flowFile = session.get();
+		if ( flowFile == null ) {
+			return;
+		}
+		
+		final Charset charset = Charset.forName(context.getProperty(CHARACTER_SET).evaluateAttributeExpressions(flowFile).getValue());
+		
+		final byte[] buffer = new byte[(int) flowFile.getSize()];
+		session.read(flowFile, new InputStreamCallback() {
+			@Override
+			public void process(final InputStream in) throws IOException {
+				StreamUtils.fillBuffer(in, buffer);
+			}
+		});
+
+		@SuppressWarnings("resource")
+		final HapiContext hapiContext = new DefaultHapiContext();
+		hapiContext.setValidationContext(ValidationContextFactory.noValidation());
+		
+		final PipeParser parser = hapiContext.getPipeParser();
+		final String hl7Text = new String(buffer, charset);
+		final HL7Message message;
+		try {
+			final Message hapiMessage = parser.parse(hl7Text);
+			message = new HapiMessage(hapiMessage);
+		} catch (final Exception e) {
+			getLogger().error("Failed to parse {} as HL7 due to {}; routing to failure", new Object[] {flowFile, e});
+			session.transfer(flowFile, REL_FAILURE);
+			return;
+		}
+
+		final Set<String> matchingRels = new HashSet<>();
+		final Map<Relationship, HL7Query> queryMap = queries;
+		for ( final Map.Entry<Relationship, HL7Query> entry : queryMap.entrySet() ) {
+			final Relationship relationship = entry.getKey();
+			final HL7Query query = entry.getValue();
+			
+			final QueryResult result = query.evaluate(message);
+			if ( result.isMatch() ) {
+				FlowFile clone = session.clone(flowFile);
+				clone = session.putAttribute(clone, "RouteHL7.Route", relationship.getName());
+				session.transfer(clone, relationship);
+				session.getProvenanceReporter().route(clone, relationship);
+				matchingRels.add(relationship.getName());
+			}
+		}
+
+		session.transfer(flowFile, REL_ORIGINAL);
+		getLogger().info("Routed a copy of {} to {} relationships: {}", new Object[] {flowFile, matchingRels.size(), matchingRels});
+	}
+
+	private static class HL7QueryValidator implements Validator {
+
+		@Override
+		public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
+			String error = null;
+			
+			try {
+				final HL7Query hl7Query = HL7Query.compile(input);
+				final List<Class<?>> returnTypes = hl7Query.getReturnTypes();
+				if ( returnTypes.size() != 1 ) {
+					error = "RouteHL7 requires that the HL7 Query return exactly 1 element of type MESSAGE";
+				} else if ( !HL7Message.class.isAssignableFrom(returnTypes.get(0)) ) {
+					error = "RouteHL7 requires that the HL7 Query return exactly 1 element of type MESSAGE";
+				}
+			} catch (final HL7QueryParsingException e) {
+				error = e.toString();
+			}
+			
+			if ( error == null ) {
+				return new ValidationResult.Builder().subject(subject).input(input).valid(true).build();
+			} else {
+				return new ValidationResult.Builder().subject(subject).input(input).valid(false).explanation(error).build();
+			}
+		}
+		
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
new file mode 100644
index 0000000..3f57ff0
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+org.apache.nifi.processors.hl7.ExtractHL7Attributes
+org.apache.nifi.processors.hl7.RouteHL7
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/java/org/apache/nifi/processors/hl7/TestExtractHL7Attributes.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/java/org/apache/nifi/processors/hl7/TestExtractHL7Attributes.java b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/java/org/apache/nifi/processors/hl7/TestExtractHL7Attributes.java
new file mode 100644
index 0000000..f566288
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/java/org/apache/nifi/processors/hl7/TestExtractHL7Attributes.java
@@ -0,0 +1,48 @@
+/*
+ * 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.hl7;
+
+import java.io.IOException;
+import java.nio.file.Paths;
+import java.util.Map;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+import org.apache.nifi.processors.hl7.ExtractHL7Attributes;
+import org.apache.nifi.util.MockFlowFile;
+import org.apache.nifi.util.TestRunner;
+import org.apache.nifi.util.TestRunners;
+import org.junit.Test;
+
+public class TestExtractHL7Attributes {
+
+	@Test
+	public void testExtract() throws IOException {
+		System.setProperty("org.slf4j.simpleLogger.log.org.apache.nifi", "DEBUG");
+		final TestRunner runner = TestRunners.newTestRunner(ExtractHL7Attributes.class);
+		runner.enqueue(Paths.get("src/test/resources/1.hl7"));
+		
+		runner.run();
+		runner.assertAllFlowFilesTransferred(ExtractHL7Attributes.REL_SUCCESS, 1);
+		final MockFlowFile out = runner.getFlowFilesForRelationship(ExtractHL7Attributes.REL_SUCCESS).get(0);
+		final SortedMap<String, String> sortedAttrs = new TreeMap<>(out.getAttributes());
+		for (final Map.Entry<String, String> entry : sortedAttrs.entrySet()) {
+			System.out.println(entry.getKey() + " : " + entry.getValue());
+		}
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/1.hl7
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/1.hl7 b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/1.hl7
new file mode 100644
index 0000000..bf2b8a5
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/1.hl7
@@ -0,0 +1,16 @@
+MSH|^~`&|ECG REPORTING|ROCHESTER|ERIS|ROCHESTER|20110621050440||ORU^R01|20110621050440|P|2.1
+PID|||999999999||TEST^PATIENT||18450101|F
+OBR|||211088491|0^ADULT^ROCHECG|||20110620170631|||||||||M999999^^^^^^^RACFID||||||20110621060232||EC|F|||||||M999999^LASTNAME MD^FIRSTNAME^^^^^RACFID
+OBX||ST|93000.2^VENTRICULAR RATE EKG/MIN^CPT4|1|52|/SEC
+OBX||ST|93000.4^PR INTERVAL(MSEC)^CPT4|2|208|MSEC
+OBX||ST|93000.5^QRS - INTERVAL(MSEC)^CPT4|3|88|MSEC
+OBX||ST|93000.6^QT - INTERVAL(MSEC)^CPT4|4|466|MSEC
+OBX||ST|93000&PTL^PHYSICAL TEST LOCATION^CPT4|5|STMA
+OBX||ST|93000&PTR^PHYSICAL TEST ROOM^CPT4|6|04254
+OBX||CE|93000.17^^CPT4|7|21&101^Sinus bradycardia`T`with 1st degree A-V block^MEIECG
+OBX||CE|93000.17^^CPT4|8|1687^Otherwise normal ECG^MEIECG
+OBX||CE|93000&CMP^^CPT4|9|1301^When compared with ECG of^MEIECG
+OBX||TS|93000&CMD^EKG COMPARISON DATE^CPT4|10|201106171659
+OBX||CE|93000&CMP^^CPT4|11|1305^No significant change was found^MEIECG
+OBX||TX|93000.48^EKG COMMENT^CPT4|12|9917^LASTNAME MD^FIRSTNAME
+OBX||FT|93000^ECG 12-LEAD^CPT4|13|{\rtf1\ansi \deff1\deflang1033\ {\fonttbl{\f1\fmodern\fcharset0 Courier;}{\f2\fmodern\fcharset0 Courier;}} \pard\plain \f1\fs18\par 20Jun2011 17:06\par VENTRICULAR RATE 52\par Sinus bradycardia with 1st degree A-V block\par Otherwise normal ECG\par When compared with ECG of 17-JUN-2011 16:59,\par No significant change was found\par 47507`S`'LASTNAME MD`S`'FIRSTNAME \par }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/hypoglycemia.hl7
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/hypoglycemia.hl7 b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/hypoglycemia.hl7
new file mode 100644
index 0000000..02e8967
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/hypoglycemia.hl7
@@ -0,0 +1,5 @@
+MSH|^~\&|CERNER||PriorityHealth||||ORU^R01|Q479004375T431430612|P|2.3|
+PID|||001677980||SMITH^CURTIS||19680219|M||||||||||929645156318|123456789|
+PD1||||1234567890^LAST^FIRST^M^^^^^NPI|
+OBR|1|341856649^HNAM_ORDERID|000002006326002362|648088^Basic Metabolic Panel|||20061122151600|||||||||1620^Hooker^Robert^L||||||20061122154733|||F|||||||||||20061122140000|
+OBX|1|NM|GLU^Glucose Lvl|59|mg/dL|65-99^65^99|L|||F|||20061122154733|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/45416dc6/nifi/nifi-nar-bundles/nifi-hl7-bundle/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/pom.xml b/nifi/nifi-nar-bundles/nifi-hl7-bundle/pom.xml
new file mode 100644
index 0000000..3f9fbce
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-nar-bundles</artifactId>
+        <version>0.1.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-hl7-bundle</artifactId>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>nifi-hl7-processors</module>
+        <module>nifi-hl7-nar</module>
+    </modules>
+
+</project>


[08/50] [abbrv] incubator-nifi git commit: NIFI-488: Redirect nifi output streams and redirect bootstrap log messages to file

Posted by jo...@apache.org.
NIFI-488: Redirect nifi output streams and redirect bootstrap log messages to file


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/abd279c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/abd279c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/abd279c1

Branch: refs/heads/NIFI-271
Commit: abd279c1e01e3aea3332e6b378701554722317e6
Parents: 7819afb
Author: Mark Payne <ma...@hotmail.com>
Authored: Wed Apr 8 13:41:34 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Wed Apr 8 13:41:34 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/nifi/bootstrap/RunNiFi.java | 131 ++++++++++++++++---
 .../src/main/resources/conf/bootstrap.conf      |   5 +
 2 files changed, 119 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/abd279c1/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 28a9b71..d25df97 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
@@ -45,9 +45,10 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
-import java.util.logging.ConsoleHandler;
+import java.util.logging.FileHandler;
 import java.util.logging.Handler;
 import java.util.logging.Level;
+import java.util.logging.SimpleFormatter;
 
 
 /**
@@ -92,16 +93,82 @@ public class RunNiFi {
 
 	private final java.util.logging.Logger logger;
 	
-	public RunNiFi(final File bootstrapConfigFile, final boolean verbose) {
+	public RunNiFi(final File bootstrapConfigFile, final boolean verbose) throws IOException {
 		this.bootstrapConfigFile = bootstrapConfigFile;
 		logger = java.util.logging.Logger.getLogger("Bootstrap");
+		
+		final Properties bootstrapProps = new Properties();
+		try (final InputStream configIn = new FileInputStream(bootstrapConfigFile)) {
+			bootstrapProps.load(configIn);
+		}
+
+		String logFilename = bootstrapProps.getProperty("bootstrap.log.file");
+		if ( logFilename == null ) {
+			logFilename = "./logs/bootstrap.log";
+		}
+		
+		File logFile = new File(logFilename);
+		if ( !logFile.isAbsolute() ) {
+			final File workDir = getDefaultWorkingDirectory();
+			logFile = new File(workDir, logFilename);
+		}
+		
+		final File logFileDir = logFile.getParentFile();
+		final Handler fileHandler;
+		if ( logFileDir.exists() || logFileDir.mkdirs() ) {
+			final int maxSize = getIntProp(bootstrapProps, "bootstrap.log.max.bytes", 1024 * 1024 * 10);	// 10 MB
+			final int numFiles = getIntProp(bootstrapProps, "bootstrap.log.count", 10);
+			
+			fileHandler = new FileHandler(logFile.getAbsolutePath(), maxSize, numFiles, true);
+			fileHandler.setFormatter(new SimpleFormatter());
+			logger.addHandler(fileHandler);
+		} else {
+			fileHandler = null;
+			logger.severe("Could not create log file directory " + logFileDir + ". Will not log bootstrap info to file or redirect NiFi standard out to file");
+		}
+		
 		if ( verbose ) {
 		    logger.info("Enabling Verbose Output");
 		    
 		    logger.setLevel(Level.FINE);
-		    final Handler handler = new ConsoleHandler();
-		    handler.setLevel(Level.FINE);
-		    logger.addHandler(handler);
+		    
+		    for ( final Handler handler : logger.getHandlers() ) {
+		    	handler.setLevel(Level.FINE);
+		    }
+		}
+	}
+	
+	
+	private File getLogFile() throws IOException {
+		final Properties bootstrapProps = new Properties();
+		try (final InputStream configIn = new FileInputStream(bootstrapConfigFile)) {
+			bootstrapProps.load(configIn);
+		}
+
+		String logFilename = bootstrapProps.getProperty("bootstrap.log.file");
+		if ( logFilename == null ) {
+			logFilename = "./logs/bootstrap.log";
+		}
+		
+		File logFile = new File(logFilename);
+		if ( !logFile.isAbsolute() ) {
+			final File workDir = getDefaultWorkingDirectory();
+			logFile = new File(workDir, logFilename);
+		}
+
+		return logFile;
+	}
+	
+	private static int getIntProp(final Properties properties, final String name, final int defaultValue) {
+		String propVal = properties.getProperty(name);
+		if ( propVal == null || propVal.trim().isEmpty() ) {
+			return defaultValue;
+		}
+		
+		try {
+			return Integer.parseInt(propVal.trim());
+		} catch (final NumberFormatException nfe) {
+			throw new NumberFormatException("Expected bootstrap property '" + name + "' to be an integer but found value: " + propVal);
 		}
 	}
 	
@@ -581,6 +648,35 @@ public class RunNiFi {
 		}
 	}
 	
+	private void redirectOutput(final Process process) {
+		redirectStreamToLogs(process.getInputStream());
+		redirectStreamToLogs(process.getErrorStream());
+	}
+	
+	private void redirectStreamToLogs(final InputStream in) {
+		final Thread t = new Thread(new Runnable() {
+			@Override
+			public void run() {
+				try (final BufferedReader reader = new BufferedReader(new InputStreamReader(in))) {
+					String line;
+					while ((line = reader.readLine()) != null) {
+						logger.info(line);
+					}
+				} catch (IOException e) {
+					logger.warning("Failed to read output of NiFi console: " + e);
+				}
+			}
+		});
+		t.setDaemon(true);
+		t.start();
+	}
+	
+	private File getDefaultWorkingDirectory() {
+		final File bootstrapConfigAbsoluteFile = bootstrapConfigFile.getAbsoluteFile();
+		final File binDir = bootstrapConfigAbsoluteFile.getParentFile();
+		return binDir.getParentFile();
+	}
+	
 	@SuppressWarnings({ "rawtypes", "unchecked" })
 	public void start(final boolean monitor) throws IOException, InterruptedException {
 		final Integer port = getCurrentPort();
@@ -590,7 +686,6 @@ public class RunNiFi {
 		}
 		
 		final ProcessBuilder builder = new ProcessBuilder();
-
 		if ( !bootstrapConfigFile.exists() ) {
 			throw new FileNotFoundException(bootstrapConfigFile.getAbsolutePath());
 		}
@@ -604,18 +699,17 @@ public class RunNiFi {
 		props.putAll( (Map) properties );
 
 		final String specifiedWorkingDir = props.get("working.dir");
-		if ( specifiedWorkingDir != null ) {
-			builder.directory(new File(specifiedWorkingDir));
-		}
-
-		final File bootstrapConfigAbsoluteFile = bootstrapConfigFile.getAbsoluteFile();
-		final File binDir = bootstrapConfigAbsoluteFile.getParentFile();
-		final File workingDir = binDir.getParentFile();
-		
+		final File workingDir = getDefaultWorkingDirectory();
 		if ( specifiedWorkingDir == null ) {
 			builder.directory(workingDir);
+		} else {
+			builder.directory(new File(specifiedWorkingDir));
 		}
 		
+		final File logDir = getLogFile().getParentFile();
+		builder.redirectError(new File(logDir, "nifi.err"));
+		builder.redirectOutput(new File(logDir, "nifi.out"));
+		
 		final String libFilename = replaceNull(props.get("lib.dir"), "./lib").trim();
 		File libDir = getFile(libFilename, workingDir);
 		
@@ -738,14 +832,15 @@ public class RunNiFi {
 			try {
 				gracefulShutdownSeconds = Integer.parseInt(gracefulShutdown);
 			} catch (final NumberFormatException nfe) {
-				throw new NumberFormatException("The '" + GRACEFUL_SHUTDOWN_PROP + "' property in Bootstrap Config File " + bootstrapConfigAbsoluteFile.getAbsolutePath() + " has an invalid value. Must be a non-negative integer");
+				throw new NumberFormatException("The '" + GRACEFUL_SHUTDOWN_PROP + "' property in Bootstrap Config File " + bootstrapConfigFile.getAbsolutePath() + " has an invalid value. Must be a non-negative integer");
 			}
 			
 			if ( gracefulShutdownSeconds < 0 ) {
-				throw new NumberFormatException("The '" + GRACEFUL_SHUTDOWN_PROP + "' property in Bootstrap Config File " + bootstrapConfigAbsoluteFile.getAbsolutePath() + " has an invalid value. Must be a non-negative integer");
+				throw new NumberFormatException("The '" + GRACEFUL_SHUTDOWN_PROP + "' property in Bootstrap Config File " + bootstrapConfigFile.getAbsolutePath() + " has an invalid value. Must be a non-negative integer");
 			}
 			
 			Process process = builder.start();
+			redirectOutput(process);
 			Long pid = getPid(process);
 		    if ( pid != null ) {
                 nifiPid = pid;
@@ -776,7 +871,8 @@ public class RunNiFi {
 					if (autoRestartNiFi) {
 						logger.warning("Apache NiFi appears to have died. Restarting...");
 						process = builder.start();
-						
+						redirectOutput(process);
+
 						pid = getPid(process);
 						if ( pid != null ) {
 			                nifiPid = pid;
@@ -802,6 +898,7 @@ public class RunNiFi {
 			}
 		} else {
 			final Process process = builder.start();
+			redirectOutput(process);
 			final Long pid = getPid(process);
 			
 			if ( pid != null ) {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/abd279c1/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/bootstrap.conf
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/bootstrap.conf b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/bootstrap.conf
index c1536d8..e87bde2 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/bootstrap.conf
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/bootstrap.conf
@@ -21,6 +21,11 @@ java=java
 # Username to use when running NiFi. This value will be ignored on Windows.
 run.as=
 
+# Bootstrap logger info
+bootstrap.log.file=logs/nifi-bootstrap.log
+bootstrap.log.max.bytes=10485760
+bootstrap.log.count=10
+
 # Configure where NiFi's lib and conf directories live
 lib.dir=./lib
 conf.dir=./conf


[29/50] [abbrv] incubator-nifi git commit: NIFI-506: Fixed unit tests and resources, and added RAT exclusions

Posted by jo...@apache.org.
NIFI-506: Fixed unit tests and resources, and added RAT exclusions


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/c83c7afd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/c83c7afd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/c83c7afd

Branch: refs/heads/NIFI-271
Commit: c83c7afd9898e1032984a81d3792b174222930df
Parents: 3515f2c
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 10 14:25:53 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 10 14:25:53 2015 -0400

----------------------------------------------------------------------
 .../nifi-hl7-query-language/pom.xml             | 10 ++++
 .../apache/nifi/hl7/query/antlr/HL7QueryLexer.g | 17 ++++++
 .../nifi/hl7/query/antlr/HL7QueryParser.g       | 17 ++++++
 .../org/apache/nifi/hl7/query/TestHL7Query.java | 52 ++---------------
 .../src/test/resources/hyperglycemia            |  8 +--
 .../src/test/resources/hypoglycemia             |  8 +--
 .../src/test/resources/metabolic-panel          | 23 --------
 .../resources/unsolicited-vaccine-update-long   | 16 ------
 .../resources/unsolicited-vaccine-update-short  |  4 --
 .../src/test/resources/vaccine-query            |  3 -
 .../src/test/resources/vaers-message-long       | 60 --------------------
 .../nifi-hl7-bundle/nifi-hl7-processors/pom.xml | 14 +++++
 .../hl7/TestExtractHL7Attributes.java           |  2 +-
 .../src/test/resources/1.hl7                    | 16 ------
 .../src/test/resources/hypoglycemia.hl7         | 10 ++--
 15 files changed, 77 insertions(+), 183 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/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 447a88b..9d0003f 100644
--- a/nifi/nifi-commons/nifi-hl7-query-language/pom.xml
+++ b/nifi/nifi-commons/nifi-hl7-query-language/pom.xml
@@ -48,6 +48,16 @@
 					</execution>
 				</executions>
 			</plugin>
+			<plugin>
+				<groupId>org.apache.rat</groupId>
+				<artifactId>apache-rat-plugin</artifactId>
+				<configuration>
+					<excludes>
+						<exclude>src/test/resources/hypoglycemia</exclude>
+						<exclude>src/test/resources/hyperglycemia</exclude>
+					</excludes>
+				</configuration>
+			</plugin>
 		</plugins>
 	</build>
 

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryLexer.g
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryLexer.g b/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryLexer.g
index 7fe3386..478028b 100644
--- a/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryLexer.g
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryLexer.g
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
 lexer grammar HL7QueryLexer;
 
 @header {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryParser.g
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryParser.g b/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryParser.g
index 4d8d13c..f051872 100644
--- a/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryParser.g
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/main/antlr3/org/apache/nifi/hl7/query/antlr/HL7QueryParser.g
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
 parser grammar HL7QueryParser;
 
 options {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-commons/nifi-hl7-query-language/src/test/java/org/apache/nifi/hl7/query/TestHL7Query.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/java/org/apache/nifi/hl7/query/TestHL7Query.java b/nifi/nifi-commons/nifi-hl7-query-language/src/test/java/org/apache/nifi/hl7/query/TestHL7Query.java
index fbe4a8d..596440c 100644
--- a/nifi/nifi-commons/nifi-hl7-query-language/src/test/java/org/apache/nifi/hl7/query/TestHL7Query.java
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/java/org/apache/nifi/hl7/query/TestHL7Query.java
@@ -23,7 +23,6 @@ import static org.junit.Assert.assertTrue;
 import java.io.File;
 import java.io.IOException;
 import java.nio.file.Files;
-import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -32,8 +31,6 @@ import java.util.Map;
 import org.apache.nifi.hl7.hapi.HapiMessage;
 import org.apache.nifi.hl7.model.HL7Field;
 import org.apache.nifi.hl7.model.HL7Message;
-import org.apache.nifi.hl7.query.HL7Query;
-import org.apache.nifi.hl7.query.QueryResult;
 import org.junit.Test;
 
 import ca.uhn.hl7v2.DefaultHapiContext;
@@ -99,7 +96,7 @@ public class TestHL7Query {
 	@Test
 	public void testSelectMessage() throws HL7Exception, IOException {
 		final HL7Query query = HL7Query.compile("SELECT MESSAGE");
-		final HL7Message msg = createMessage(new File("src/test/resources/vaers-message-long"));
+		final HL7Message msg = createMessage(new File("src/test/resources/hypoglycemia"));
 		final QueryResult result = query.evaluate(msg);
 		assertTrue(result.isMatch());
 		final List<String> labels = result.getLabels();
@@ -114,7 +111,7 @@ public class TestHL7Query {
 	@SuppressWarnings({ "unchecked", "rawtypes" })
 	public void testSelectField() throws HL7Exception, IOException {
 		final HL7Query query = HL7Query.compile("SELECT PID.5");
-		final HL7Message msg = createMessage(new File("src/test/resources/unsolicited-vaccine-update-short"));
+		final HL7Message msg = createMessage(new File("src/test/resources/hypoglycemia"));
 		final QueryResult result = query.evaluate(msg);
 		assertTrue(result.isMatch());
 		final List<String> labels = result.getLabels();
@@ -126,7 +123,7 @@ public class TestHL7Query {
 		final List<Object> nameList = (List) names;
 		assertEquals(1, nameList.size());
 		final HL7Field nameField = (HL7Field) nameList.get(0);
-		assertEquals("KENNEDY^JOHN^FITZGERALD^JR", nameField.getValue());
+		assertEquals("SMITH^JOHN", nameField.getValue());
 	}
 	
 	@Test
@@ -134,8 +131,8 @@ public class TestHL7Query {
 		final String query = "DECLARE result AS REQUIRED OBX SELECT result WHERE result.7 != 'N' AND result.1 = 1";
 		
 		final HL7Query hl7Query = HL7Query.compile(query);
-		final QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/vaers-message-long")));
-		assertFalse( result.isMatch() );
+		final QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
+		assertTrue( result.isMatch() );
 	}
 	
 	
@@ -224,18 +221,6 @@ public class TestHL7Query {
 		QueryResult result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
 		assertTrue( result.isMatch() );
 		assertEquals(1, result.getHitCount());
-		
-		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT result WHERE result.1 = 1");
-		HL7Message msg = createMessage(new File("src/test/resources/vaers-message-long"));
-		result = hl7Query.evaluate(msg);
-		assertTrue( result.isMatch() );
-		assertEquals(9, result.getHitCount());
-		
-		hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT result WHERE result.1 = 1 AND result.3.1.1 = '30961-7'");
-		result = hl7Query.evaluate(msg);
-		assertTrue( result.isMatch() );
-		assertEquals(1, result.getHitCount());
-
 	}
 	
 	@Test
@@ -288,10 +273,6 @@ public class TestHL7Query {
 		hl7Query = HL7Query.compile("SELECT MESSAGE WHERE OBX IS NULL");
 		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
 		assertFalse( result.isMatch() );
-
-		hl7Query = HL7Query.compile("SELECT MESSAGE WHERE NK1.1 = '1' AND NK1.8 IS NULL");
-		result = hl7Query.evaluate(createMessage(new File("src/test/resources/unsolicited-vaccine-update-long")));
-		assertTrue( result.isMatch() );
 	}
 	
 	
@@ -312,14 +293,6 @@ public class TestHL7Query {
 		hl7Query = HL7Query.compile("SELECT MESSAGE WHERE OBX NOT NULL");
 		result = hl7Query.evaluate(createMessage(new File("src/test/resources/hypoglycemia")));
 		assertTrue( result.isMatch() );
-
-		hl7Query = HL7Query.compile("SELECT MESSAGE WHERE NK1.1 = '1' AND NK1.33 NOT NULL");
-		result = hl7Query.evaluate(createMessage(new File("src/test/resources/unsolicited-vaccine-update-long")));
-		assertTrue( result.isMatch() );
-		
-		hl7Query = HL7Query.compile("SELECT MESSAGE WHERE NK1.1 = 1 AND NK1.33 NOT NULL");
-		result = hl7Query.evaluate(createMessage(new File("src/test/resources/unsolicited-vaccine-update-long")));
-		assertTrue( result.isMatch() );
 	}
 	
 	private HL7Message createMessage(final File file) throws HL7Exception, IOException {
@@ -334,19 +307,4 @@ public class TestHL7Query {
 		return new HapiMessage(message);
 	}
 	
-	@Test
-	@SuppressWarnings("unused")
-	public void createMessage() throws IOException, HL7Exception {
-		final byte[] bytes = Files.readAllBytes(Paths.get("src/test/resources/vaers-message-long"));
-		final String msgText = new String(bytes, "UTF-8");
-		
-		final HapiContext hapiContext = new DefaultHapiContext();
-		hapiContext.setValidationContext(ValidationContextFactory.noValidation());
-		
-		final PipeParser parser = hapiContext.getPipeParser();
-		final Message message = parser.parse(msgText);
-		
-		final HL7Message hl7Msg = new HapiMessage(message);
-	}
-	
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia
index dc44b89..9c6888c 100644
--- a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hyperglycemia
@@ -1,5 +1,5 @@
-MSH|^~\&|CERNER||PriorityHealth||||ORU^R01|Q479004375T431430612|P|2.3|
-PID|||001677980||SMITH^CURTIS||19680219|M||||||||||929645156318|123456789|
+MSH|^~\&|XXXXXXXX||HealthProvider||||ORU^R01|Q1111111111111111111|P|2.3|
+PID|||111111111||SMITH^JOHN||19700100|M||||||||||111111111111|123456789|
 PD1||||1234567890^LAST^FIRST^M^^^^^NPI|
-OBR|1|341856649^HNAM_ORDERID|000002006326002362|648088^Basic Metabolic Panel|||20061122151600|||||||||1620^Hooker^Robert^L||||||20061122154733|||F|||||||||||20061122140000|
-OBX|1|NM|GLU^Glucose Lvl|159|mg/dL|65-99^65^99|H|||F|||20061122154733|
\ No newline at end of file
+OBR|1|341856649^HNAM_ORDERID|000000000000000000|648088^Basic Metabolic Panel|||20150101000000|||||||||1620^Johnson^Corey^A||||||20150101000000|||F|||||||||||20150101000000|
+OBX|1|NM|GLU^Glucose Lvl|159|mg/dL|65-99^65^99|H|||F|||20150102000000|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia
index 02e8967..d7bdeec 100644
--- a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia
+++ b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/hypoglycemia
@@ -1,5 +1,5 @@
-MSH|^~\&|CERNER||PriorityHealth||||ORU^R01|Q479004375T431430612|P|2.3|
-PID|||001677980||SMITH^CURTIS||19680219|M||||||||||929645156318|123456789|
+MSH|^~\&|XXXXXXXX||HealthProvider||||ORU^R01|Q1111111111111111111|P|2.3|
+PID|||111111111||SMITH^JOHN||19700100|M||||||||||111111111111|123456789|
 PD1||||1234567890^LAST^FIRST^M^^^^^NPI|
-OBR|1|341856649^HNAM_ORDERID|000002006326002362|648088^Basic Metabolic Panel|||20061122151600|||||||||1620^Hooker^Robert^L||||||20061122154733|||F|||||||||||20061122140000|
-OBX|1|NM|GLU^Glucose Lvl|59|mg/dL|65-99^65^99|L|||F|||20061122154733|
\ No newline at end of file
+OBR|1|341856649^HNAM_ORDERID|000000000000000000|648088^Basic Metabolic Panel|||20150101000000|||||||||1620^Johnson^Corey^A||||||20150101000000|||F|||||||||||20150101000000|
+OBX|1|NM|GLU^Glucose Lvl|59|mg/dL|65-99^65^99|L|||F|||20150102000000|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/metabolic-panel
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/metabolic-panel b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/metabolic-panel
deleted file mode 100644
index c62fc45..0000000
--- a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/metabolic-panel
+++ /dev/null
@@ -1,23 +0,0 @@
-MSH|^~\&|Lab1^1234^CLIA|^1234^CLIA|ELR^2.16.840.1.113883.19.3.2^ISO|SPH^2.16.840.1.113883.19.3.2^ISO|20110410140502-0500||ORU^R01^ORU_R01|1234567890|P^T|2.5.1|||NE|NE|USA||||USELR1.0^^2.16.840.1.114222.4.10.3^ISO 
-SFT|1|Level Seven Healthcare Software, Inc.^L^^^^&2.16.840.1.113883.19.4.6^ISO^XX^^^1234|1.2|An Lab System|56734||20080817 
-PID|1||36363636^^^MPI&2.16.840.1.113883.19.3.2.1&ISO^MR^A&2.16.840.1.113883.19.3.2.1&ISO~444333333^^^&2.16.840.1.113883.4.1^IS O^SS||Everyman^Adam^A^^^^L^^^^^^^BS|Mum^Martha^M^^^^M|19800602|M||2106-3^White^CDCREC^^^^04/24/2007|2222 Home Street^^Ann Arbor^MI^99999^USA^H||^PRN^PH^^1^555^5552004|^WPN^PH^^1^955^5551009|eng^English^ISO6392^^^^3/29/2007|M^Married^HL70002^^^^2.5.1||||||N^Not Hispanic or Latino^HL70189^^^^2.5.1||||||||N|||200808151000-0700| Reliable^2.16.840.1.113883.19.3.1^ISO 
-ORC|RE|23456^EHR^2.16.840.1.113883.19.3.2.3^ISO|9700123^Lab^2.16.840.1.113883.19.3.1.6^ISO|||||||||1234^Admit^Alan^A^III^Dr^^^&2.16.840.1.113883.19.4.6^ISO^L^^^EI^&2.16.840.1.113883.19.4.6^ISO^^^^^^^^MD||^WPN^PH^^1^555^5551005|||||||Level Seven Healthcare, Inc.^L^^^^&2.16.840.1.113883.19.4.6^ISO^XX^^^1234|1005 Healthcare Drive^^Ann Arbor^MI^99999^USA^B|^WPN^PH^^1^555^5553001|4444 Healthcare Drive^Suite 123^Ann Arbor^MI^99999^USA^B 
-OBR|1|23456^EHR^2.16.840.1.113883.19.3.2.3^ISO|9700123^Lab^2.16.840.1.113883.19.3.1.6^ISO|24323-8^Comprehensive metabolic 2000 panel in Serum or Plasma^LN^3436442^Metaboloic Panel 2000, Comprehensive^99USI|||201104101130-0500||||||angina|||1234^Admit^Alan^A^III^Dr^^^&2.16.840.1.113883.19.4.6^ISO^L^^^EI^&2.16.840.1.113883.19.4.6^ISO^^^^^^^^MD|^WPN^PH^^1^555^5551005|||||201104101405-0500|||F||||||413^Angina pectoris^I9CDX^^^^07/09/2008|1235&Slide&Stan&S&&Dr&MD&&DOC&2.16.840.1.113883.19.4.6&ISO 
-OBX|1|NM|17861-6^Calcium [Mass/volume] in Serum or Plasma^LN||27.3|mg/dL^milligrams per deciliter^UCUM|8.7-10.7|HH|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|2|NM|3094-0^Urea nitrogen [Mass/volume] in Serum of Plasma^LN||15|mg/dL^milligrams per deciliter^UCUM|6 to 23|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|3|NM|2160-0^Creatinine [Mass/volume] in Serum or Plasma^LN||1.8|mg/dL^milligrams per deciliter^UCUM|0.7 to 1.2|H|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|4|NM|3097-3^Urea nitrogen/Creatinine [Mass ratio] in Serum or Plasma^LN||15||6 to 25|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI
-OBX|5|NM|2885-2^Protein [Mass/volume] in Serum or Plasma^LN||8.9|gm/dL^grams per deciliter^UCUM|6.3 to 8.2|H|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|6|NM|1751-7^Albumin [Mass/volume] in Serum or Plasma^LN||5.7|gm/dL^grams per deciliter^UCUM|3.5 to 5.0|H|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|7|NM|2336-6^Globulin [Mass/volume] in Serum or Plasma^LN||4.7|gm/dL^grams per deciliter^UCUM|2.2 to 4.2|H|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|8|NM|1759-0^Albumin/Globulin [Mass ratio] in Serum or Plasma^LN||1.7||0.8 to 2.0|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI
-OBX|9|NM|1975-2^Bilirubin.total [Mass/volume] in Serum or Plasma^LN||0.7|mg/dL^milligrams per deciliter^UCUM|0.3 to 1.9|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|10|NM|2345-7^Glucose [Mass/volume] in Serum or Plasma^LN||55|mg/dL^milligrams per deciliter^UCUM|60 to 109|L|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|11|NM|6768-6^Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma^LN||64|U/L^units per liter^UCUM|32 to 110|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|12|NM|1920-8^Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma^LN||6|U/L^units per liter^UCUM|6 to 18|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|13|NM|1742-6^Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma^LN||10|U/L^units per liter^UCUM|5 to 35|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|14|NM|2951-2^Sodium [Moles/volume] in Serum or Plasma^LN||140|mmol/L^millimoles per liter^UCUM|137 to 147|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|15|NM|2823-3^Potassium [Moles/volume] in Serum or Plasma^LN||4.5|mmol/L^millimoles per liter^UCUM|3.4 to 5.3|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|16|NM|2075-0^Chloride [Moles/volume] in Serum or Plasma^LN||99|mmol/L^millimoles per liter^UCUM|99 to 108|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-OBX|17|NM|2028-9^Carbon dioxide, total [Moles/volume] in Serum or Plasma^LN||27|mmol/L^millimoles per liter^UCUM|22 to 29|N|||F|||201104101130-0500|||||201104101325-0500||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI 
-SPM|1|23456&EHR&2.16.840.1.113883.19.3.2.3&ISO^9700122&Lab&2.16.840.1.113883.19.3.1.6&ISO||119364003^Serum specimen^SCT^^^^20080131|||||||||||||201104101130-0500|201104101130-0500

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-long
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-long b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-long
deleted file mode 100644
index 8edd3fd..0000000
--- a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-long
+++ /dev/null
@@ -1,16 +0,0 @@
-MSH|^~\&||MA0000||GA0000|19970901||VXU^V04|19970522MA53|T|2.3.1|||AL
-PID|||1234^^^^SR^~1234-12^^^^LR^~3872^^^^MR~221345671^^^^SS^~430078856^^^^MA^ ||KENNEDY^JOHN^FITZGERALD^JR^^^L|BOUVIER^^^^^^M|19900607|M|KENNEDY^BABY BOY^^^^^^ B|W^WHITE^NY8 RACE CODES^W^WHITE^HL70005|123 MAIN ST^APT 3B^LEXINGTON^MA^00210^ ^M^MSA CODE^MA034~345 ELM ST^^BOSTON^MA^00314^^BLD~^^^^^^BR^^MA002| |(617) 555-1212 ^PRN^PH^^^617^5551212^^||EN^ENGLISH^HL70296^^^|||||||WN^NOT HISPANIC^LOCAL CODE SET^NH^NOT OF HISPANIC ORIGIN^HL70189|CHILDREN=S HOSPITAL
-PD1|||CHILDREN=S HOSPITAL^^1234^^^^XX~LEXINGTON CLINIC^^1234A^^^^FI|12345^CARE^ PRIMARY^^^DR^MD^^^L^^^DN|||||||03^REMINDER/RECALL - NO CALLS^HL70215|Y
-NK1|1|KENNEDY^JACQUELINE^LEE|32^MOTHER^HL70063||||||||||||||||||||||||||||||898666725^^^^SS
-NK1|2|KENNEDY^JOHN^FITZGERALD|33^FATHER^HL70063||||||||||||||||||||||||||||||822546618^^^^SS
-PV1||R|||||||||||||||A|||V02^19900607~H02^19900607
-RXA|0|1|19900607|19900607|08^HEPB-PEDIATRIC/ADOLESCENT^CVX^90744^HEPB-PEDATRIC/ADOLESCENT^CPT|.5|ML^^ISO+||03^HISTORICAL INFORMATION - FROM PARENT=S WRITTEN RECORD^NIP0001|^JONES^LISA|^^^CHILDREN=S HOSPITAL||5|MCG^^ISO+|MRK12345| 199206|MSD^MERCK^MVX
-RXA|0|4|19910907|19910907|50^DTAP-HIB^CVX^90721^DTAP-HIB^CPT|.5|ML^^ISO+||00^NEW IMMUNIZATION RECORD^NIP0001|1234567890^SMITH^SALLY^S^^^^^^^^^VEI~1234567891 ^O=BRIAN^ROBERT^A^^DR^MD^^^^^^OEI|^^^CHILD HEALTHCARE CLINIC^^^^^101 MAIN STREET^^ BOSTON^MA||||W46932777|199208|PMC^PASTEUR MERIEUX CONNAUGHT^MVX|||CP|A| 19910907120030
-RXR|IM^INTRAMUSCULAR^HL70162|LA^LEFT ARM^HL70163
-RXA|0|1|19910907|19910907|03^MMR^CVX|.5|ML^^ISO+|||1234567890^SMITH^SALLY^S^^^^^^^^^VEI~1234567891^O=BRIAN^ROBERT^A^^DR^MD^^^^^^OEI|^^^CHILD HEALTHCARE CLINIC^^^^^101 MAIN STREET^^BOSTON^MA||||W2348796456|19920731|MSD^MERCK^MVX
-RXR|SC^SUBCUTANEOUS^HL70162|LA^LEFT ARM^HL70163
-RXA|0|5|19950520|19950520|20^DTAP^CVX|.5|ML^^ISO+|||1234567891^O=BRIAN^ROBERT^A^^DR|^^^CHILD HEALTHCARE CLINIC^^^^^101 MAIN STREET^^BOSTON^MA||||W22532806|19950705|PMC^ PASTEUR MERIEUX CONNAUGHT^MVX
-RXR|IM^INTRAMUSCULAR^HL70162|LA^LEFT ARM^HL70163
-NTE|PATIENT DEVELOPED HIGH FEVER APPROX 3 HRS AFTER VACCINE INJECTION
-RXA|0|2|19950520|19950520|03^MMR^CVX|.5|ML^^ISO+|||1234567891^O=BRIAN^ROBERT^A^^DR|^^^CHILD HEALTHCARE CLINIC^^^^^101 MAIN STREET^^BOSTON^MA||||W2341234567|19950630| MSD^MERCK^MVX
-RXR|SC^SUBCUTANEOUS^HL70162|LA^LEFT ARM^HL70163

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-short
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-short b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-short
deleted file mode 100644
index c3e7cf0..0000000
--- a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/unsolicited-vaccine-update-short
+++ /dev/null
@@ -1,4 +0,0 @@
-MSH|^~\&|||||||VXU^V04|19970522MA53|P|2.3.1
-PID|||221345671^^^^SS||KENNEDY^JOHN^FITZGERALD^JR|BOUVIER^^^^^^M|19900607|M|||^^^^MA^^^BLD
-NK1|1|KENNEDY^JACQUELINE^LEE|32^MOTHER^HL70063
-RXA|0|1|19900607|19900607|08^HEPB-PEDIATRIC/ADOLESCENT^CVX|.5|ML^^ISO+||||||||MRK12345||MSD^MERCK^MVX

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaccine-query
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaccine-query b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaccine-query
deleted file mode 100644
index 1bd47b2..0000000
--- a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaccine-query
+++ /dev/null
@@ -1,3 +0,0 @@
-MSH|^~\&||GA0000||MA0000|199705221605||VXQ^V01|19970522GA40|T|2.3.1|||AL
-QRD|199705221605|R|I|19970522GA05|||25^RD|^KENNEDY^JOHN^FITZGERALD^JR|VXI^VACCINE INFORMATION^HL70048|^SIIS
-QRF|MA0000||||256946789~19900607~MA~MA99999999~88888888~KENNEDY^JACQUELINE^LEE~BOUVIER~898666725~KENNEDY^JOHN^FITZGERALD~822546618

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaers-message-long
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaers-message-long b/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaers-message-long
deleted file mode 100644
index 888b04c..0000000
--- a/nifi/nifi-commons/nifi-hl7-query-language/src/test/resources/vaers-message-long
+++ /dev/null
@@ -1,60 +0,0 @@
-MSH|^~\&||GA0000||VAERS PROCESSOR|20010331605||ORU^R01|20010422GA03|T|2.3.1|||AL|
-PID|||1234^^^^SR~1234-12^^^^LR~00725^^^^MR||Doe^John^Fitzgerald^JR^^^L||20001007|M||2106-3^White^HL70005|123 Peachtree St^APT 3B^Atlanta^GA^30210^^M^^GA067||(678) 555-1212^^PRN|
-NK1|1|Jones^Jane^Lee^^RN|VAB^Vaccine administered by (Name)^HL70063|
-NK1|2|Jones^Jane^Lee^^RN|FVP^Form completed by (Name)-Vaccine provider^HL70063|101 Main Street^^Atlanta^GA^38765^^O^^GA121||(404) 554-9097^^WPN|
-ORC|CN|||||||||||1234567^Welby^Marcus^J^Jr^Dr.^MD^L|||||||||Peachtree Clinic|101 Main Street^^Atlanta^GA^38765^^O^^GA121|(404) 554-9097^^WPN|101 Main Street^^Atlanta^GA^38765^^O^^GA121|
-OBR|1|||^CDC VAERS-1 (FDA) Report|||20010316|
-OBX|1|NM|21612-7^Reported Patient Age^LN||05|mo^month^ANSI|
-OBX|1|TS|30947-6^Date form completed^LN||20010316|
-OBX|2|FT|30948-4^Vaccination adverse events and treatment, if any^LN|1|fever of 106F, with vomiting, seizures, persistent crying lasting over 3 hours, loss of appetite|
-OBX|3|CE|30949-2^Vaccination adverse event outcome^LN|1|E^required emergency room/doctor visit^NIP005|
-OBX|4|CE|30949-2^Vaccination adverse event outcome^LN|1|H^required hospitalization^NIP005|
-OBX|5|NM|30950-0^Number of days hospitalized due to vaccination adverse event^LN|1|02|d^day^ANSI|
-OBX|6|CE|30951-8^Patient recovered^LN||Y^Yes^ HL70239|
-OBX|7|TS|30952-6^Date of vaccination^LN||20010216|
-OBX|8|TS|30953-4^Adverse event onset date and time^LN||200102180900|
-OBX|9|FT|30954-2^Relevant diagnostic tests/lab data^LN||Electrolytes, CBC, Blood culture|
-OBR|2|||30955-9^All vaccines given on date listed in #10^LN|
-OBX|1|CE30955-9&30956-7^Vaccine type^LN|1|08^HepB-Adolescent/pediatric^CVX|
-OBX|2|CE|30955-9&30957-5^Manufacturer^LN|1|MSD^Merck^MVX|
-OBX|3|ST|30955-9&30959-1^Lot number^LN|1|MRK12345|
-OBX|4|CE|30955-9&30958-3^ Route^LN|1|IM^Intramuscular ^HL70162|
-OBX|5|CE|30955-9&31034-2^Site^LN|1|LA^Left arm^ HL70163|
-OBX|6|NM|30955-9&30960-9^Number of previous doses^LN|1|01I
-OBX|7|CE|CE|30955-9&30956-7^Vaccine type^LN|2|50^DTaP-Hib^CVX|
-OBX|8|CE|30955-9&30957-5^ Manufacturer^LN|2|WAL^Wyeth_Ayerst^MVX|
-OBX|9|ST|30955-9&30959-1^Lot number^LN|2|W46932777|
-OBX|10|CE|30955-9&30958-3^ Route^LN|2|IM^Intramuscular^HL70162|
-OBX|11|CE|30955-9&31034-2^Site^LN|2|LA^Left arm^HL70163|
-OBX|12|NM|30955-9&30960-9^Number of previous doses^LN|2|01|
-OBR|3|||30961-7^Any other vaccinations within 4 weeks prior to the date listed in #10|
-OBX|1|CE|30961-7&30956-7^Vaccine type^LN|1|10^IPV^CVX|
-OBX|2|CE|30961-7&30957-5^Manufacturer^LN|1|PMC^Aventis Pasteur ^MVX|
-OBX|3|ST|30961-7&30959-1^Lot number^LN|1|PMC123456|
-OBX|4|CE|30961-7&30958-3^Route^LN|1|SC^Subcutaneaous^HL70162|
-OBX|5|CE|30961-7&31034-2^Site^LN|1|LA^Left arm^HL70163|
-OBX|6|NM|30961-7&30960-9^Number of previous doses^LN|1|01|
-OBX|7|TS|30961-7&31035-9^date given^LN|1|20001216|
-OBX|8|CE|30962-^Vaccinated at^LN||PVT^Private doctor�s office/hospital^NIP009|
-OBX|9|CE|30963-3^Vaccine purchased with^LN||PBF^Public funds^NIP008|
-OBX|10|FT|30964-1^Other medications^LN||None|
-OBX|11|FT|30965-8^Illness at time of vaccination (specify)^LN||None|
-OBX|12|FT|30966-6^Pre-existing physician diagnosed allergies, birth defects, medical conditions^LN||Past conditions convulsions|
-OBX|13|CE|30967-4^Was adverse event reported previously^LN||N^no^NIP009|
-OBR|4||30968-2^Adverse event following prior vaccination in patient^LN|
-OBX|1|TX|30968-2&30971-6^Adverse event^LN||None|
-OBR|5||30969-0^Adverse event following prior vaccination in brother^LN|
-OBX|1|TX||30969-0&30971-6^Adverse event^LN||vomiting, fever, otitis media|
-OBX|2|NM||30969-0&30972-4^Onset age^LN||04|mo^month^ANSI|
-OBX|3|CE||30969-0&30956-7^Vaccine Type ^LN||10^IPV^CVX|
-OBX|4|NM||30969-0&30973-2^Dose number in series^LN||02|
-OBR|6|||30970-8^Adverse event following prior vaccination in sister^LN|
-OBX|1|TX|30970-8&30971-6^Adverse event^LN||None|
-OBR|7||^For children 5 and under|
-OBX|1|NM|8339-4^Body weight at birth^LN||82|oz^ounces^ANSI|
-OBX|2|NM|30974-0^Number of brothers and sisters^LN||2|
-OBR|8|||^Only for reports submitted by manufacturer/immunization project|
-OBX|1|ST|30975-7^Mfr./Imm. Proj. report no.^LN||12345678|
-OBX|2|TS|30976-5^Date received by manufacturer/immunization project^LN||12345678|
-OBX|3|CE|30977-3^15 day report^LN||N^No^HL70136|
-OBX|4|CE|30978-1^Report type^LN||IN^Initial^NIP010|

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/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 2a0c909..5f29cd8 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,6 +25,20 @@
     <artifactId>nifi-hl7-processors</artifactId>
     <packaging>jar</packaging>
 
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.rat</groupId>
+				<artifactId>apache-rat-plugin</artifactId>
+				<configuration>
+					<excludes>
+						<exclude>src/test/resources/hypoglycemia.hl7</exclude>
+					</excludes>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.nifi</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/java/org/apache/nifi/processors/hl7/TestExtractHL7Attributes.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/java/org/apache/nifi/processors/hl7/TestExtractHL7Attributes.java b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/java/org/apache/nifi/processors/hl7/TestExtractHL7Attributes.java
index f566288..c156810 100644
--- a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/java/org/apache/nifi/processors/hl7/TestExtractHL7Attributes.java
+++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/java/org/apache/nifi/processors/hl7/TestExtractHL7Attributes.java
@@ -34,7 +34,7 @@ public class TestExtractHL7Attributes {
 	public void testExtract() throws IOException {
 		System.setProperty("org.slf4j.simpleLogger.log.org.apache.nifi", "DEBUG");
 		final TestRunner runner = TestRunners.newTestRunner(ExtractHL7Attributes.class);
-		runner.enqueue(Paths.get("src/test/resources/1.hl7"));
+		runner.enqueue(Paths.get("src/test/resources/hypoglycemia.hl7"));
 		
 		runner.run();
 		runner.assertAllFlowFilesTransferred(ExtractHL7Attributes.REL_SUCCESS, 1);

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/1.hl7
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/1.hl7 b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/1.hl7
deleted file mode 100644
index bf2b8a5..0000000
--- a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/1.hl7
+++ /dev/null
@@ -1,16 +0,0 @@
-MSH|^~`&|ECG REPORTING|ROCHESTER|ERIS|ROCHESTER|20110621050440||ORU^R01|20110621050440|P|2.1
-PID|||999999999||TEST^PATIENT||18450101|F
-OBR|||211088491|0^ADULT^ROCHECG|||20110620170631|||||||||M999999^^^^^^^RACFID||||||20110621060232||EC|F|||||||M999999^LASTNAME MD^FIRSTNAME^^^^^RACFID
-OBX||ST|93000.2^VENTRICULAR RATE EKG/MIN^CPT4|1|52|/SEC
-OBX||ST|93000.4^PR INTERVAL(MSEC)^CPT4|2|208|MSEC
-OBX||ST|93000.5^QRS - INTERVAL(MSEC)^CPT4|3|88|MSEC
-OBX||ST|93000.6^QT - INTERVAL(MSEC)^CPT4|4|466|MSEC
-OBX||ST|93000&PTL^PHYSICAL TEST LOCATION^CPT4|5|STMA
-OBX||ST|93000&PTR^PHYSICAL TEST ROOM^CPT4|6|04254
-OBX||CE|93000.17^^CPT4|7|21&101^Sinus bradycardia`T`with 1st degree A-V block^MEIECG
-OBX||CE|93000.17^^CPT4|8|1687^Otherwise normal ECG^MEIECG
-OBX||CE|93000&CMP^^CPT4|9|1301^When compared with ECG of^MEIECG
-OBX||TS|93000&CMD^EKG COMPARISON DATE^CPT4|10|201106171659
-OBX||CE|93000&CMP^^CPT4|11|1305^No significant change was found^MEIECG
-OBX||TX|93000.48^EKG COMMENT^CPT4|12|9917^LASTNAME MD^FIRSTNAME
-OBX||FT|93000^ECG 12-LEAD^CPT4|13|{\rtf1\ansi \deff1\deflang1033\ {\fonttbl{\f1\fmodern\fcharset0 Courier;}{\f2\fmodern\fcharset0 Courier;}} \pard\plain \f1\fs18\par 20Jun2011 17:06\par VENTRICULAR RATE 52\par Sinus bradycardia with 1st degree A-V block\par Otherwise normal ECG\par When compared with ECG of 17-JUN-2011 16:59,\par No significant change was found\par 47507`S`'LASTNAME MD`S`'FIRSTNAME \par }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/c83c7afd/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/hypoglycemia.hl7
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/hypoglycemia.hl7 b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/hypoglycemia.hl7
index 02e8967..aaff9fc 100644
--- a/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/hypoglycemia.hl7
+++ b/nifi/nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/test/resources/hypoglycemia.hl7
@@ -1,5 +1,5 @@
-MSH|^~\&|CERNER||PriorityHealth||||ORU^R01|Q479004375T431430612|P|2.3|
-PID|||001677980||SMITH^CURTIS||19680219|M||||||||||929645156318|123456789|
-PD1||||1234567890^LAST^FIRST^M^^^^^NPI|
-OBR|1|341856649^HNAM_ORDERID|000002006326002362|648088^Basic Metabolic Panel|||20061122151600|||||||||1620^Hooker^Robert^L||||||20061122154733|||F|||||||||||20061122140000|
-OBX|1|NM|GLU^Glucose Lvl|59|mg/dL|65-99^65^99|L|||F|||20061122154733|
\ No newline at end of file
+MSH|^~\&|XXXXXXXX||HealthProvider||||ORU^R01|Q1111111111111111111|P|2.3|
+PID|||111111111||SMITH^JOHN||19700100|M||||||||||111111111111|123456789|
+PD1||||1234567890^LAST^FIRST^M^^^^^NPI|
+OBR|1|341856649^HNAM_ORDERID|000000000000000000|648088^Basic Metabolic Panel|||20150101000000|||||||||1620^Johnson^Corey^A||||||20150101000000|||F|||||||||||20150101000000|
+OBX|1|NM|GLU^Glucose Lvl|59|mg/dL|65-99^65^99|L|||F|||20150102000000|
\ No newline at end of file


[04/50] [abbrv] incubator-nifi git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop

Posted by jo...@apache.org.
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/e456ea37
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e456ea37
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e456ea37

Branch: refs/heads/NIFI-271
Commit: e456ea37f4232e9072631af986f54336904318bd
Parents: d769b50 39735c3
Author: Matt Gilman <ma...@gmail.com>
Authored: Wed Apr 8 11:28:44 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Wed Apr 8 11:28:44 2015 -0400

----------------------------------------------------------------------
 .../org/apache/nifi/remote/client/socket/SocketClient.java   | 8 +++++++-
 .../nifi/controller/scheduling/StandardProcessScheduler.java | 4 ++--
 .../java/org/apache/nifi/processor/SimpleProcessLogger.java  | 2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[23/50] [abbrv] incubator-nifi git commit: Merge branch 'develop' into NIFI-25

Posted by jo...@apache.org.
Merge branch 'develop' into NIFI-25

Conflicts:
	nifi/nifi-assembly/NOTICE
	nifi/nifi-nar-bundles/pom.xml


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/93a12104
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/93a12104
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/93a12104

Branch: refs/heads/NIFI-271
Commit: 93a121044b1a7efcfc3023178fb39f2f44ad836c
Parents: 373f470 c201aa1
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Apr 10 09:42:53 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Apr 10 09:42:53 2015 -0400

----------------------------------------------------------------------
 nifi/NOTICE                                     |    5 -
 nifi/nifi-api/pom.xml                           |    2 +-
 .../annotation/behavior/DynamicProperties.java  |   42 +
 .../annotation/behavior/DynamicProperty.java    |   67 +
 .../behavior/DynamicRelationship.java           |   56 +
 .../annotation/behavior/ReadsAttribute.java     |   50 +
 .../annotation/behavior/ReadsAttributes.java    |   44 +
 .../annotation/behavior/WritesAttribute.java    |   51 +
 .../annotation/behavior/WritesAttributes.java   |   44 +
 .../nifi/annotation/documentation/SeeAlso.java  |   59 +
 .../nifi/annotation/lifecycle/OnAdded.java      |   13 +-
 .../nifi/annotation/lifecycle/OnDisabled.java   |   29 +-
 .../nifi/annotation/lifecycle/OnEnabled.java    |   34 +-
 .../nifi/annotation/lifecycle/OnRemoved.java    |   14 +-
 .../nifi/annotation/lifecycle/OnShutdown.java   |   13 +-
 .../nifi/annotation/lifecycle/OnStopped.java    |    9 +
 .../annotation/lifecycle/OnUnscheduled.java     |    2 -
 .../AbstractConfigurableComponent.java          |    5 +-
 .../nifi/components/PropertyDescriptor.java     |   14 +-
 .../nifi/components/ValidationContext.java      |   28 +
 .../controller/AbstractControllerService.java   |   13 +-
 .../ControllerServiceInitializationContext.java |   10 +
 .../controller/ControllerServiceLookup.java     |   19 +
 .../org/apache/nifi/logging/ComponentLog.java   |  100 +
 .../org/apache/nifi/logging/ProcessorLog.java   |   61 +-
 .../apache/nifi/processor/ProcessSession.java   |   40 +-
 .../nifi/reporting/AbstractReportingTask.java   |   10 +
 .../ReportingInitializationContext.java         |   10 +
 .../nifi/web/ClusterRequestException.java       |    1 +
 .../org/apache/nifi/web/ComponentDetails.java   |  157 +
 .../apache/nifi/web/ConfigurationAction.java    |  137 +
 .../nifi/web/NiFiWebConfigurationContext.java   |  102 +
 .../web/NiFiWebConfigurationRequestContext.java |   31 +
 .../org/apache/nifi/web/NiFiWebContext.java     |    1 +
 .../apache/nifi/web/NiFiWebContextConfig.java   |    1 +
 .../apache/nifi/web/NiFiWebRequestContext.java  |   58 +
 .../nifi/web/ProcessorConfigurationAction.java  |    1 +
 .../java/org/apache/nifi/web/ProcessorInfo.java |    1 +
 .../main/java/org/apache/nifi/web/Revision.java |   32 +-
 .../org/apache/nifi/web/UiExtensionType.java    |   31 +
 .../org/apache/nifi/web/ViewableContent.java    |   74 +
 nifi/nifi-assembly/NOTICE                       |   55 +
 nifi/nifi-assembly/pom.xml                      |  928 ++--
 nifi/nifi-bootstrap/pom.xml                     |    2 +-
 .../java/org/apache/nifi/bootstrap/RunNiFi.java |  131 +-
 .../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/.gitignore          |    3 +
 .../nifi-hl7-query-language/pom.xml             |  115 +
 .../apache/nifi/hl7/query/antlr/HL7QueryLexer.g |  156 +
 .../nifi/hl7/query/antlr/HL7QueryParser.g       |   91 +
 .../org/apache/nifi/hl7/hapi/EmptyField.java    |   37 +
 .../org/apache/nifi/hl7/hapi/HapiField.java     |   83 +
 .../org/apache/nifi/hl7/hapi/HapiMessage.java   |   94 +
 .../org/apache/nifi/hl7/hapi/HapiSegment.java   |   69 +
 .../apache/nifi/hl7/hapi/SingleValueField.java  |   42 +
 .../java/org/apache/nifi/hl7/io/HL7Reader.java  |   27 +
 .../hl7/io/exception/InvalidHL7Exception.java   |   40 +
 .../org/apache/nifi/hl7/model/HL7Component.java |   24 +
 .../org/apache/nifi/hl7/model/HL7Field.java     |   21 +
 .../org/apache/nifi/hl7/model/HL7Message.java   |   27 +
 .../org/apache/nifi/hl7/model/HL7Segment.java   |   27 +
 .../org/apache/nifi/hl7/query/Declaration.java  |   29 +
 .../org/apache/nifi/hl7/query/HL7Query.java     |  412 ++
 .../org/apache/nifi/hl7/query/QueryResult.java  |   29 +
 .../org/apache/nifi/hl7/query/ResultHit.java    |   25 +
 .../org/apache/nifi/hl7/query/Selection.java    |   37 +
 .../hl7/query/evaluator/BooleanEvaluator.java   |   24 +
 .../nifi/hl7/query/evaluator/Evaluator.java     |   27 +
 .../hl7/query/evaluator/IntegerEvaluator.java   |   26 +
 .../hl7/query/evaluator/StringEvaluator.java    |   25 +
 .../comparison/AbstractComparisonEvaluator.java |  106 +
 .../comparison/AbstractNumericComparison.java   |   67 +
 .../evaluator/comparison/EqualsEvaluator.java   |   32 +
 .../comparison/GreaterThanEvaluator.java        |   34 +
 .../comparison/GreaterThanOrEqualEvaluator.java |   34 +
 .../evaluator/comparison/IsNullEvaluator.java   |   69 +
 .../evaluator/comparison/LessThanEvaluator.java |   31 +
 .../comparison/LessThanOrEqualEvaluator.java    |   31 +
 .../comparison/NotEqualsEvaluator.java          |   32 +
 .../evaluator/comparison/NotEvaluator.java      |   36 +
 .../evaluator/comparison/NotNullEvaluator.java  |   65 +
 .../literal/IntegerLiteralEvaluator.java        |   36 +
 .../literal/StringLiteralEvaluator.java         |   35 +
 .../hl7/query/evaluator/logic/AndEvaluator.java |   43 +
 .../hl7/query/evaluator/logic/OrEvaluator.java  |   43 +
 .../message/DeclaredReferenceEvaluator.java     |   42 +
 .../query/evaluator/message/DotEvaluator.java   |   88 +
 .../query/evaluator/message/FieldEvaluator.java |   67 +
 .../evaluator/message/MessageEvaluator.java     |   34 +
 .../evaluator/message/SegmentEvaluator.java     |   51 +
 .../exception/HL7QueryParsingException.java     |   37 +
 .../nifi/hl7/query/result/MissedResult.java     |   56 +
 .../hl7/query/result/StandardQueryResult.java   |   69 +
 .../hl7/query/result/StandardResultHit.java     |   41 +
 .../org/apache/nifi/hl7/query/TestHL7Query.java |  352 ++
 .../src/test/resources/hyperglycemia            |    5 +
 .../src/test/resources/hypoglycemia             |    5 +
 .../src/test/resources/metabolic-panel          |   23 +
 .../resources/unsolicited-vaccine-update-long   |   16 +
 .../resources/unsolicited-vaccine-update-short  |    4 +
 .../src/test/resources/vaccine-query            |    3 +
 .../src/test/resources/vaers-message-long       |   60 +
 nifi/nifi-commons/nifi-logging-utils/pom.xml    |    2 +-
 .../nifi-processor-utilities/pom.xml            |    2 +-
 .../nifi/processor/util/StandardValidators.java |  116 +-
 .../processor/util/TestStandardValidators.java  |   49 +-
 nifi/nifi-commons/nifi-properties/pom.xml       |    2 +-
 .../org/apache/nifi/util/NiFiProperties.java    |    2 -
 nifi/nifi-commons/nifi-security-utils/pom.xml   |    2 +-
 .../nifi-site-to-site-client/pom.xml            |    8 +-
 .../client/socket/EndpointConnectionPool.java   |   59 +-
 .../nifi/remote/client/socket/SocketClient.java |    9 +-
 .../protocol/socket/SocketClientProtocol.java   |    8 +-
 .../socket/SocketClientTransaction.java         |   25 +-
 .../socket/TestEndpointConnectionStatePool.java |    4 +-
 nifi/nifi-commons/nifi-socket-utils/pom.xml     |    2 +-
 nifi/nifi-commons/nifi-utils/pom.xml            |    4 +-
 .../java/org/apache/nifi/util/EscapeUtils.java  |   42 +
 nifi/nifi-commons/nifi-web-utils/pom.xml        |    2 +-
 nifi/nifi-commons/nifi-write-ahead-log/pom.xml  |    2 +-
 nifi/nifi-commons/pom.xml                       |    3 +-
 nifi/nifi-docs/pom.xml                          |    2 +-
 .../src/main/asciidoc/administration-guide.adoc |   26 +-
 .../src/main/asciidoc/developer-guide.adoc      |   35 +
 nifi/nifi-external/nifi-spark-receiver/pom.xml  |   72 +-
 nifi/nifi-external/pom.xml                      |    2 +-
 .../nifi-processor-bundle-archetype/pom.xml     |    6 +-
 .../META-INF/maven/archetype-metadata.xml       |    2 +-
 .../src/main/java/MyProcessor.java              |    8 +
 .../docs/__package__.MyProcessor/index.html     |   96 -
 nifi/nifi-maven-archetypes/pom.xml              |    5 +-
 nifi/nifi-mock/pom.xml                          |    2 +-
 ...kControllerServiceInitializationContext.java |   17 +
 .../nifi/util/MockControllerServiceLookup.java  |   11 +
 .../MockProcessorInitializationContext.java     |   10 +
 .../org/apache/nifi/util/MockProcessorLog.java  |   34 +-
 .../MockReportingInitializationContext.java     |   10 +-
 .../apache/nifi/util/MockValidationContext.java |   42 +
 .../nifi/util/StandardProcessorTestRunner.java  |    9 +-
 .../nifi-framework-nar/pom.xml                  |    2 +-
 .../nifi-framework/nifi-administration/pom.xml  |    2 +-
 .../org/apache/nifi/admin/dao/ActionDAO.java    |    6 +-
 .../nifi/admin/dao/impl/StandardActionDAO.java  |   60 +-
 .../apache/nifi/admin/service/AuditService.java |    6 +-
 .../admin/service/action/GetPreviousValues.java |    8 +-
 .../service/impl/StandardAuditService.java      |    4 +-
 .../nifi-framework/nifi-client-dto/pom.xml      |    2 +-
 .../nifi/web/api/dto/ComponentHistoryDTO.java   |   56 +
 .../web/api/dto/ControllerConfigurationDTO.java |   18 +
 .../nifi/web/api/dto/ControllerServiceDTO.java  |  190 +
 ...ontrollerServiceReferencingComponentDTO.java |  207 +
 .../nifi/web/api/dto/DocumentedTypeDTO.java     |    6 +-
 .../apache/nifi/web/api/dto/FlowSnippetDTO.java |   15 +-
 .../nifi/web/api/dto/NiFiComponentDTO.java      |    4 +-
 .../nifi/web/api/dto/ProcessorConfigDTO.java    |  218 +-
 .../nifi/web/api/dto/ProcessorHistoryDTO.java   |   56 -
 .../nifi/web/api/dto/PropertyDescriptorDTO.java |  244 +
 .../nifi/web/api/dto/ReportingTaskDTO.java      |  228 +
 .../apache/nifi/web/api/dto/RevisionDTO.java    |   15 +
 .../component/details/ComponentDetailsDTO.java  |    2 +-
 .../component/details/ExtensionDetailsDTO.java  |   41 +
 .../component/details/ProcessorDetailsDTO.java  |   41 -
 .../web/api/entity/ComponentHistoryEntity.java  |   45 +
 .../web/api/entity/ControllerServiceEntity.java |   45 +
 ...ollerServiceReferencingComponentsEntity.java |   46 +
 .../entity/ControllerServiceTypesEntity.java    |   46 +
 .../api/entity/ControllerServicesEntity.java    |   46 +
 .../web/api/entity/ProcessorHistoryEntity.java  |   45 -
 .../api/entity/PropertyDescriptorEntity.java    |   46 +
 .../web/api/entity/ReportingTaskEntity.java     |   45 +
 .../api/entity/ReportingTaskTypesEntity.java    |   46 +
 .../web/api/entity/ReportingTasksEntity.java    |   46 +
 .../nifi-cluster-authorization-provider/pom.xml |    2 +-
 .../nifi-cluster-protocol/.gitignore            |    1 -
 .../nifi-cluster-protocol/pom.xml               |   67 -
 .../protocol/ClusterManagerProtocolSender.java  |   69 -
 .../cluster/protocol/ConnectionRequest.java     |   44 -
 .../cluster/protocol/ConnectionResponse.java    |  141 -
 .../apache/nifi/cluster/protocol/Heartbeat.java |   68 -
 .../nifi/cluster/protocol/NodeBulletins.java    |   44 -
 .../nifi/cluster/protocol/NodeIdentifier.java   |  172 -
 .../cluster/protocol/NodeProtocolSender.java    |   73 -
 .../nifi/cluster/protocol/ProtocolContext.java  |   39 -
 .../cluster/protocol/ProtocolException.java     |   40 -
 .../nifi/cluster/protocol/ProtocolHandler.java  |   44 -
 .../nifi/cluster/protocol/ProtocolListener.java |   72 -
 .../protocol/ProtocolMessageMarshaller.java     |   38 -
 .../protocol/ProtocolMessageUnmarshaller.java   |   38 -
 .../nifi/cluster/protocol/StandardDataFlow.java |  105 -
 .../UnknownServiceAddressException.java         |   39 -
 .../impl/ClusterManagerProtocolSenderImpl.java  |  245 -
 .../ClusterManagerProtocolSenderListener.java   |  118 -
 .../protocol/impl/ClusterServiceDiscovery.java  |  181 -
 .../protocol/impl/ClusterServiceLocator.java    |  229 -
 .../impl/ClusterServicesBroadcaster.java        |  182 -
 .../protocol/impl/CopyingInputStream.java       |   77 -
 .../impl/MulticastProtocolListener.java         |  204 -
 .../protocol/impl/NodeProtocolSenderImpl.java   |  171 -
 .../impl/NodeProtocolSenderListener.java        |  115 -
 .../protocol/impl/SocketProtocolListener.java   |  205 -
 .../protocol/jaxb/JaxbProtocolContext.java      |  148 -
 .../jaxb/message/AdaptedConnectionRequest.java  |   40 -
 .../jaxb/message/AdaptedConnectionResponse.java |  109 -
 .../protocol/jaxb/message/AdaptedCounter.java   |   56 -
 .../protocol/jaxb/message/AdaptedDataFlow.java  |   64 -
 .../protocol/jaxb/message/AdaptedHeartbeat.java |   66 -
 .../jaxb/message/AdaptedNodeBulletins.java      |   50 -
 .../jaxb/message/AdaptedNodeIdentifier.java     |   76 -
 .../jaxb/message/ConnectionRequestAdapter.java  |   41 -
 .../jaxb/message/ConnectionResponseAdapter.java |   55 -
 .../protocol/jaxb/message/DataFlowAdapter.java  |   50 -
 .../protocol/jaxb/message/HeartbeatAdapter.java |   54 -
 .../jaxb/message/JaxbProtocolUtils.java         |   42 -
 .../jaxb/message/NodeBulletinsAdapter.java      |   48 -
 .../jaxb/message/NodeIdentifierAdapter.java     |   51 -
 .../protocol/jaxb/message/ObjectFactory.java    |  104 -
 .../message/ConnectionRequestMessage.java       |   46 -
 .../message/ConnectionResponseMessage.java      |   66 -
 .../ControllerStartupFailureMessage.java        |   49 -
 .../protocol/message/DisconnectMessage.java     |   55 -
 .../protocol/message/ExceptionMessage.java      |   44 -
 .../protocol/message/FlowRequestMessage.java    |   46 -
 .../protocol/message/FlowResponseMessage.java   |   44 -
 .../protocol/message/HeartbeatMessage.java      |   43 -
 .../message/MulticastProtocolMessage.java       |   66 -
 .../protocol/message/NodeBulletinsMessage.java  |   43 -
 .../cluster/protocol/message/PingMessage.java   |   55 -
 .../message/PrimaryRoleAssignmentMessage.java   |   56 -
 .../protocol/message/ProtocolMessage.java       |   61 -
 .../message/ReconnectionFailureMessage.java     |   45 -
 .../message/ReconnectionRequestMessage.java     |   94 -
 .../message/ReconnectionResponseMessage.java    |   32 -
 .../message/ServiceBroadcastMessage.java        |   64 -
 .../MulticastConfigurationFactoryBean.java      |   60 -
 .../ServerSocketConfigurationFactoryBean.java   |   65 -
 .../spring/SocketConfigurationFactoryBean.java  |   66 -
 .../resources/nifi-cluster-protocol-context.xml |  110 -
 .../ClusterManagerProtocolSenderImplTest.java   |  134 -
 .../impl/ClusterServiceDiscoveryTest.java       |  135 -
 .../impl/ClusterServiceLocatorTest.java         |  121 -
 .../impl/ClusterServicesBroadcasterTest.java    |  133 -
 .../impl/MulticastProtocolListenerTest.java     |  171 -
 .../impl/NodeProtocolSenderImplTest.java        |  203 -
 .../impl/testutils/DelayedProtocolHandler.java  |   57 -
 .../testutils/ReflexiveProtocolHandler.java     |   47 -
 .../nifi-framework/nifi-cluster-web/.gitignore  |    1 -
 .../nifi-framework/nifi-cluster-web/pom.xml     |   48 -
 .../nifi/cluster/context/ClusterContext.java    |   59 -
 .../cluster/context/ClusterContextImpl.java     |   69 -
 .../context/ClusterContextThreadLocal.java      |   47 -
 .../ClusterAwareOptimisticLockingManager.java   |   96 -
 .../nifi-framework/nifi-cluster/.gitignore      |    1 -
 .../nifi-framework/nifi-cluster/pom.xml         |  130 -
 .../cluster/client/MulticastTestClient.java     |  151 -
 .../org/apache/nifi/cluster/event/Event.java    |  122 -
 .../apache/nifi/cluster/event/EventManager.java |   65 -
 .../cluster/event/impl/EventManagerImpl.java    |  143 -
 .../cluster/firewall/ClusterNodeFirewall.java   |   35 -
 .../impl/FileBasedClusterNodeFirewall.java      |  207 -
 .../nifi/cluster/flow/ClusterDataFlow.java      |   45 -
 .../apache/nifi/cluster/flow/DaoException.java  |   40 -
 .../apache/nifi/cluster/flow/DataFlowDao.java   |   62 -
 .../cluster/flow/DataFlowManagementService.java |  115 -
 .../nifi/cluster/flow/PersistedFlowState.java   |   37 -
 .../nifi/cluster/flow/StaleFlowException.java   |   42 -
 .../nifi/cluster/flow/impl/DataFlowDaoImpl.java |  600 ---
 .../impl/DataFlowManagementServiceImpl.java     |  356 --
 .../nifi/cluster/manager/ClusterManager.java    |  225 -
 .../cluster/manager/HttpClusterManager.java     |  169 -
 .../cluster/manager/HttpRequestReplicator.java  |   99 -
 .../cluster/manager/HttpResponseMapper.java     |   42 -
 .../nifi/cluster/manager/NodeResponse.java      |  329 --
 .../exception/BlockedByFirewallException.java   |   60 -
 .../manager/exception/ClusterException.java     |   40 -
 .../ConnectingNodeMutableRequestException.java  |   41 -
 ...DisconnectedNodeMutableRequestException.java |   41 -
 .../exception/IllegalClusterStateException.java |   41 -
 .../exception/IllegalNodeDeletionException.java |   41 -
 .../IllegalNodeDisconnectionException.java      |   42 -
 .../IllegalNodeReconnectionException.java       |   41 -
 .../IneligiblePrimaryNodeException.java         |   41 -
 .../exception/MutableRequestException.java      |   42 -
 .../exception/NoConnectedNodesException.java    |   41 -
 .../exception/NoResponseFromNodesException.java |   42 -
 .../exception/NodeDisconnectionException.java   |   41 -
 .../exception/NodeReconnectionException.java    |   40 -
 .../PrimaryRoleAssignmentException.java         |   41 -
 .../SafeModeMutableRequestException.java        |   41 -
 .../manager/exception/UnknownNodeException.java |   41 -
 .../exception/UriConstructionException.java     |   42 -
 .../manager/impl/ClusteredEventAccess.java      |  135 -
 .../manager/impl/ClusteredReportingContext.java |  165 -
 .../manager/impl/HttpRequestReplicatorImpl.java |  531 ---
 .../manager/impl/HttpResponseMapperImpl.java    |   85 -
 .../cluster/manager/impl/WebClusterManager.java | 3628 ---------------
 .../java/org/apache/nifi/cluster/node/Node.java |  252 --
 ...anagerProtocolServiceLocatorFactoryBean.java |  116 -
 ...FileBasedClusterNodeFirewallFactoryBean.java |   58 -
 .../spring/WebClusterManagerFactoryBean.java    |  139 -
 .../reporting/ClusteredReportingTaskNode.java   |   49 -
 .../resources/nifi-cluster-manager-context.xml  |  124 -
 .../event/impl/EventManagerImplTest.java        |  119 -
 .../impl/FileBasedClusterNodeFirewallTest.java  |   98 -
 .../impl/DataFlowManagementServiceImplTest.java |  343 --
 .../impl/HttpRequestReplicatorImplTest.java     |  368 --
 .../impl/HttpResponseMapperImplTest.java        |  126 -
 .../manager/impl/TestWebClusterManager.java     |   54 -
 .../cluster/manager/testutils/HttpRequest.java  |  239 -
 .../cluster/manager/testutils/HttpResponse.java |   93 -
 .../manager/testutils/HttpResponseAction.java   |   60 -
 .../cluster/manager/testutils/HttpServer.java   |  240 -
 .../ClusterManagerProtocolSenderImplTest.java   |  133 -
 .../impl/ClusterServiceLocatorTest.java         |  119 -
 .../impl/ClusterServicesBroadcasterTest.java    |  131 -
 .../impl/MulticastProtocolListenerTest.java     |  171 -
 .../impl/NodeProtocolSenderImplTest.java        |  201 -
 .../impl/SocketProtocolListenerTest.java        |  132 -
 .../testutils/DelayedProtocolHandler.java       |   57 -
 .../testutils/ReflexiveProtocolHandler.java     |   47 -
 .../src/test/resources/logback-test.xml         |   48 -
 .../apache/nifi/cluster/firewall/impl/empty.txt |    0
 .../apache/nifi/cluster/firewall/impl/ips.txt   |   12 -
 .../nifi-framework/nifi-documentation/pom.xml   |   41 +
 .../ConfigurableComponentInitializer.java       |   38 +
 .../apache/nifi/documentation/DocGenerator.java |  179 +
 .../nifi/documentation/DocumentationWriter.java |   33 +
 .../html/HtmlDocumentationWriter.java           |  573 +++
 .../html/HtmlProcessorDocumentationWriter.java  |  275 ++
 .../init/ControllerServiceInitializer.java      |   38 +
 .../init/ProcessorInitializer.java              |   37 +
 .../init/ReportingTaskingInitializer.java       |   37 +
 ...kControllerServiceInitializationContext.java |   46 +
 .../mock/MockControllerServiceLookup.java       |   65 +
 .../MockProcessorInitializationContext.java     |   45 +
 .../MockReportingInitializationContext.java     |   67 +
 .../FullyDocumentedControllerService.java       |   57 +
 .../example/FullyDocumentedProcessor.java       |  121 +
 .../example/FullyDocumentedReportingTask.java   |   50 +
 .../documentation/example/NakedProcessor.java   |   31 +
 .../documentation/example/SampleService.java    |   25 +
 .../html/HtmlDocumentationWriterTest.java       |  101 +
 .../html/ProcessorDocumentationWriterTest.java  |  103 +
 .../nifi/documentation/html/XmlValidator.java   |   50 +
 .../nifi-file-authorization-provider/pom.xml    |    2 +-
 .../nifi-framework-cluster-protocol/.gitignore  |    1 +
 .../nifi-framework-cluster-protocol/pom.xml     |   67 +
 .../protocol/ClusterManagerProtocolSender.java  |   69 +
 .../cluster/protocol/ConnectionRequest.java     |   44 +
 .../cluster/protocol/ConnectionResponse.java    |  141 +
 .../apache/nifi/cluster/protocol/Heartbeat.java |   68 +
 .../nifi/cluster/protocol/NodeBulletins.java    |   44 +
 .../nifi/cluster/protocol/NodeIdentifier.java   |  172 +
 .../cluster/protocol/NodeProtocolSender.java    |   73 +
 .../nifi/cluster/protocol/ProtocolContext.java  |   39 +
 .../cluster/protocol/ProtocolException.java     |   40 +
 .../nifi/cluster/protocol/ProtocolHandler.java  |   44 +
 .../nifi/cluster/protocol/ProtocolListener.java |   72 +
 .../protocol/ProtocolMessageMarshaller.java     |   38 +
 .../protocol/ProtocolMessageUnmarshaller.java   |   38 +
 .../nifi/cluster/protocol/StandardDataFlow.java |  105 +
 .../UnknownServiceAddressException.java         |   39 +
 .../impl/ClusterManagerProtocolSenderImpl.java  |  245 +
 .../ClusterManagerProtocolSenderListener.java   |  118 +
 .../protocol/impl/ClusterServiceDiscovery.java  |  181 +
 .../protocol/impl/ClusterServiceLocator.java    |  229 +
 .../impl/ClusterServicesBroadcaster.java        |  182 +
 .../protocol/impl/CopyingInputStream.java       |   77 +
 .../impl/MulticastProtocolListener.java         |  204 +
 .../protocol/impl/NodeProtocolSenderImpl.java   |  171 +
 .../impl/NodeProtocolSenderListener.java        |  115 +
 .../protocol/impl/SocketProtocolListener.java   |  205 +
 .../protocol/jaxb/JaxbProtocolContext.java      |  148 +
 .../jaxb/message/AdaptedConnectionRequest.java  |   40 +
 .../jaxb/message/AdaptedConnectionResponse.java |  109 +
 .../protocol/jaxb/message/AdaptedCounter.java   |   56 +
 .../protocol/jaxb/message/AdaptedDataFlow.java  |   64 +
 .../protocol/jaxb/message/AdaptedHeartbeat.java |   66 +
 .../jaxb/message/AdaptedNodeBulletins.java      |   50 +
 .../jaxb/message/AdaptedNodeIdentifier.java     |   76 +
 .../jaxb/message/ConnectionRequestAdapter.java  |   41 +
 .../jaxb/message/ConnectionResponseAdapter.java |   55 +
 .../protocol/jaxb/message/DataFlowAdapter.java  |   50 +
 .../protocol/jaxb/message/HeartbeatAdapter.java |   54 +
 .../jaxb/message/JaxbProtocolUtils.java         |   42 +
 .../jaxb/message/NodeBulletinsAdapter.java      |   48 +
 .../jaxb/message/NodeIdentifierAdapter.java     |   51 +
 .../protocol/jaxb/message/ObjectFactory.java    |  104 +
 .../message/ConnectionRequestMessage.java       |   46 +
 .../message/ConnectionResponseMessage.java      |   66 +
 .../ControllerStartupFailureMessage.java        |   49 +
 .../protocol/message/DisconnectMessage.java     |   55 +
 .../protocol/message/ExceptionMessage.java      |   44 +
 .../protocol/message/FlowRequestMessage.java    |   46 +
 .../protocol/message/FlowResponseMessage.java   |   44 +
 .../protocol/message/HeartbeatMessage.java      |   43 +
 .../message/MulticastProtocolMessage.java       |   66 +
 .../protocol/message/NodeBulletinsMessage.java  |   43 +
 .../cluster/protocol/message/PingMessage.java   |   55 +
 .../message/PrimaryRoleAssignmentMessage.java   |   56 +
 .../protocol/message/ProtocolMessage.java       |   61 +
 .../message/ReconnectionFailureMessage.java     |   45 +
 .../message/ReconnectionRequestMessage.java     |   94 +
 .../message/ReconnectionResponseMessage.java    |   32 +
 .../message/ServiceBroadcastMessage.java        |   64 +
 .../MulticastConfigurationFactoryBean.java      |   60 +
 .../ServerSocketConfigurationFactoryBean.java   |   65 +
 .../spring/SocketConfigurationFactoryBean.java  |   66 +
 .../resources/nifi-cluster-protocol-context.xml |  110 +
 .../ClusterManagerProtocolSenderImplTest.java   |  134 +
 .../impl/ClusterServiceDiscoveryTest.java       |  135 +
 .../impl/ClusterServiceLocatorTest.java         |  121 +
 .../impl/ClusterServicesBroadcasterTest.java    |  133 +
 .../impl/MulticastProtocolListenerTest.java     |  171 +
 .../impl/NodeProtocolSenderImplTest.java        |  203 +
 .../impl/testutils/DelayedProtocolHandler.java  |   57 +
 .../testutils/ReflexiveProtocolHandler.java     |   47 +
 .../nifi-framework-cluster-web/.gitignore       |    1 +
 .../nifi-framework-cluster-web/pom.xml          |   44 +
 .../nifi/cluster/context/ClusterContext.java    |   59 +
 .../cluster/context/ClusterContextImpl.java     |   69 +
 .../context/ClusterContextThreadLocal.java      |   42 +
 .../nifi-framework-cluster/.gitignore           |    1 +
 .../nifi-framework-cluster/pom.xml              |  148 +
 .../cluster/client/MulticastTestClient.java     |  151 +
 .../org/apache/nifi/cluster/event/Event.java    |  122 +
 .../apache/nifi/cluster/event/EventManager.java |   65 +
 .../cluster/event/impl/EventManagerImpl.java    |  143 +
 .../cluster/firewall/ClusterNodeFirewall.java   |   35 +
 .../impl/FileBasedClusterNodeFirewall.java      |  207 +
 .../nifi/cluster/flow/ClusterDataFlow.java      |   56 +
 .../apache/nifi/cluster/flow/DaoException.java  |   40 +
 .../apache/nifi/cluster/flow/DataFlowDao.java   |   62 +
 .../cluster/flow/DataFlowManagementService.java |  132 +
 .../nifi/cluster/flow/PersistedFlowState.java   |   37 +
 .../nifi/cluster/flow/StaleFlowException.java   |   42 +
 .../nifi/cluster/flow/impl/DataFlowDaoImpl.java |  615 +++
 .../impl/DataFlowManagementServiceImpl.java     |  413 ++
 .../nifi/cluster/manager/ClusterManager.java    |  225 +
 .../cluster/manager/HttpClusterManager.java     |  169 +
 .../cluster/manager/HttpRequestReplicator.java  |   99 +
 .../cluster/manager/HttpResponseMapper.java     |   42 +
 .../nifi/cluster/manager/NodeResponse.java      |  343 ++
 .../exception/BlockedByFirewallException.java   |   60 +
 .../manager/exception/ClusterException.java     |   40 +
 .../ConnectingNodeMutableRequestException.java  |   41 +
 ...DisconnectedNodeMutableRequestException.java |   41 +
 .../exception/IllegalClusterStateException.java |   41 +
 .../exception/IllegalNodeDeletionException.java |   41 +
 .../IllegalNodeDisconnectionException.java      |   42 +
 .../IllegalNodeReconnectionException.java       |   41 +
 .../IneligiblePrimaryNodeException.java         |   41 +
 .../exception/MutableRequestException.java      |   42 +
 .../exception/NoConnectedNodesException.java    |   41 +
 .../exception/NoResponseFromNodesException.java |   42 +
 .../exception/NodeDisconnectionException.java   |   41 +
 .../exception/NodeReconnectionException.java    |   40 +
 .../PrimaryRoleAssignmentException.java         |   41 +
 .../SafeModeMutableRequestException.java        |   41 +
 .../manager/exception/UnknownNodeException.java |   41 +
 .../exception/UriConstructionException.java     |   42 +
 .../manager/impl/ClusteredEventAccess.java      |  135 +
 .../manager/impl/ClusteredReportingContext.java |  165 +
 .../manager/impl/HttpRequestReplicatorImpl.java |  531 +++
 .../manager/impl/HttpResponseMapperImpl.java    |   85 +
 .../cluster/manager/impl/WebClusterManager.java | 4237 ++++++++++++++++++
 .../java/org/apache/nifi/cluster/node/Node.java |  252 ++
 ...anagerProtocolServiceLocatorFactoryBean.java |  116 +
 ...FileBasedClusterNodeFirewallFactoryBean.java |   58 +
 .../spring/WebClusterManagerFactoryBean.java    |  134 +
 .../reporting/ClusteredReportingTaskNode.java   |   49 +
 .../resources/nifi-cluster-manager-context.xml  |  128 +
 .../event/impl/EventManagerImplTest.java        |  119 +
 .../impl/FileBasedClusterNodeFirewallTest.java  |   98 +
 .../impl/DataFlowManagementServiceImplTest.java |  343 ++
 .../impl/HttpRequestReplicatorImplTest.java     |  368 ++
 .../impl/HttpResponseMapperImplTest.java        |  126 +
 .../manager/impl/TestWebClusterManager.java     |   54 +
 .../cluster/manager/testutils/HttpRequest.java  |  239 +
 .../cluster/manager/testutils/HttpResponse.java |   93 +
 .../manager/testutils/HttpResponseAction.java   |   60 +
 .../cluster/manager/testutils/HttpServer.java   |  240 +
 .../ClusterManagerProtocolSenderImplTest.java   |  133 +
 .../impl/ClusterServiceLocatorTest.java         |  119 +
 .../impl/ClusterServicesBroadcasterTest.java    |  131 +
 .../impl/MulticastProtocolListenerTest.java     |  171 +
 .../impl/NodeProtocolSenderImplTest.java        |  201 +
 .../impl/SocketProtocolListenerTest.java        |  132 +
 .../testutils/DelayedProtocolHandler.java       |   57 +
 .../testutils/ReflexiveProtocolHandler.java     |   47 +
 .../src/test/resources/logback-test.xml         |   48 +
 .../apache/nifi/cluster/firewall/impl/empty.txt |    0
 .../apache/nifi/cluster/firewall/impl/ips.txt   |   12 +
 .../nifi-framework-core-api/.gitignore          |    1 +
 .../nifi-framework-core-api/pom.xml             |    2 +-
 .../controller/AbstractConfiguredComponent.java |   18 +-
 .../apache/nifi/controller/Availability.java    |   24 -
 .../nifi/controller/ProcessScheduler.java       |   27 +-
 .../apache/nifi/controller/ProcessorNode.java   |   16 +
 .../nifi/controller/ReportingTaskNode.java      |   26 +-
 .../controller/ValidationContextFactory.java    |    4 +
 .../exception/ComponentLifeCycleException.java  |   30 +
 ...ControllerServiceInstantiationException.java |   51 +
 .../ControllerServiceNotFoundException.java     |   51 -
 .../exception/ProcessorLifeCycleException.java  |   30 -
 .../reporting/ReportingTaskProvider.java        |  103 +
 .../service/ControllerServiceNode.java          |   39 +-
 .../service/ControllerServiceProvider.java      |   83 +-
 .../service/ControllerServiceReference.java     |    7 +-
 .../service/ControllerServiceState.java         |   45 +
 .../org/apache/nifi/groups/ProcessGroup.java    |   44 +-
 .../nifi-framework/nifi-framework-core/pom.xml  |   21 +-
 .../apache/nifi/controller/FlowController.java  |  280 +-
 .../nifi/controller/FlowFromDOMFactory.java     |   60 +-
 .../nifi/controller/StandardFlowSerializer.java |   68 +-
 .../nifi/controller/StandardFlowService.java    |   30 +-
 .../controller/StandardFlowSynchronizer.java    |  242 +-
 .../nifi/controller/StandardProcessorNode.java  |   47 +-
 .../apache/nifi/controller/TemplateManager.java |   33 +-
 .../reporting/AbstractReportingTaskNode.java    |   76 +-
 .../reporting/StandardReportingContext.java     |   11 +
 .../StandardReportingInitializationContext.java |   23 +-
 .../repository/FileSystemRepository.java        |   78 +-
 .../repository/StandardProcessSession.java      |   11 +-
 .../repository/StandardRepositoryRecord.java    |   15 +-
 .../io/DisableOnCloseInputStream.java           |   93 +
 .../scheduling/StandardProcessScheduler.java    |  210 +-
 .../service/ControllerServiceLoader.java        |  149 +-
 ...dControllerServiceInitializationContext.java |   20 +-
 .../service/StandardControllerServiceNode.java  |  128 +-
 .../StandardControllerServiceProvider.java      |  460 +-
 .../StandardControllerServiceReference.java     |   19 +-
 .../tasks/ContinuallyRunConnectableTask.java    |   15 +-
 .../controller/tasks/ReportingTaskWrapper.java  |   29 +-
 .../nifi/fingerprint/FingerprintFactory.java    |   79 +
 .../nifi/groups/StandardProcessGroup.java       |   90 +-
 .../nifi/persistence/FlowConfigurationDAO.java  |   25 -
 .../StandardXMLFlowConfigurationDAO.java        |  191 +-
 .../nifi/processor/SimpleProcessLogger.java     |   38 +-
 .../nifi/processor/StandardProcessContext.java  |   10 +
 .../processor/StandardSchedulingContext.java    |    5 +-
 .../processor/StandardValidationContext.java    |   37 +-
 .../StandardValidationContextFactory.java       |    5 +
 .../java/org/apache/nifi/util/DomUtils.java     |   10 +
 .../ControllerServiceConfiguration.xsd          |   61 -
 .../src/main/resources/FlowConfiguration.xsd    |   49 +-
 .../resources/ReportingTaskConfiguration.xsd    |   87 -
 .../repository/TestStandardProcessSession.java  |  149 +
 .../StandardControllerServiceProviderTest.java  |   71 +
 .../TestStandardControllerServiceProvider.java  |  385 ++
 .../controller/service/mock/DummyProcessor.java |   49 +
 .../nifi/controller/service/mock/ServiceA.java  |   49 +
 .../nifi/controller/service/mock/ServiceB.java  |   23 +
 .../service/util/TestControllerService.java     |   61 +
 .../processor/TestStandardPropertyValue.java    |   11 +-
 ...org.apache.nifi.controller.ControllerService |   15 +
 .../nifi-framework/nifi-nar-utils/.gitignore    |    1 +
 .../nifi-framework/nifi-nar-utils/pom.xml       |    2 +-
 .../nifi-framework/nifi-resources/LICENSE       |  202 +
 .../nifi-framework/nifi-resources/NOTICE        |    5 +
 .../nifi-framework/nifi-resources/pom.xml       |    2 +-
 .../src/main/assembly/dependencies.xml          |   16 +
 .../src/main/resources/conf/bootstrap.conf      |    5 +
 .../main/resources/conf/controller-services.xml |   18 -
 .../src/main/resources/conf/nifi.properties     |    2 -
 .../src/main/resources/conf/reporting-tasks.xml |   49 -
 .../nifi-framework/nifi-runtime/pom.xml         |    7 +-
 .../src/main/java/org/apache/nifi/NiFi.java     |    3 +
 .../nifi-framework/nifi-security/pom.xml        |    2 +-
 .../nifi-framework/nifi-site-to-site/pom.xml    |    2 +-
 .../nifi/remote/StandardRemoteGroupPort.java    |    6 +-
 .../nifi/remote/StandardRootGroupPort.java      |   11 +-
 .../nifi-framework/nifi-user-actions/pom.xml    |    2 +-
 .../java/org/apache/nifi/action/Component.java  |    4 +-
 .../component/details/ExtensionDetails.java     |   34 +
 .../component/details/ProcessorDetails.java     |   34 -
 .../nifi-web/nifi-custom-ui-utilities/pom.xml   |    2 +-
 .../HttpServletConfigurationRequestContext.java |   56 +
 .../nifi/web/HttpServletRequestContext.java     |  100 +
 .../web/HttpServletRequestContextConfig.java    |    1 +
 .../nifi-framework/nifi-web/nifi-jetty/pom.xml  |   17 +-
 .../org/apache/nifi/web/server/JettyServer.java |  282 +-
 .../nifi-web/nifi-ui-extension/pom.xml          |   21 +
 .../apache/nifi/ui/extension/UiExtension.java   |   52 +
 .../nifi/ui/extension/UiExtensionMapping.java   |   52 +
 .../nifi-web/nifi-web-api/pom.xml               |   14 +-
 .../nifi/audit/ControllerServiceAuditor.java    |  475 ++
 .../org/apache/nifi/audit/FunnelAuditor.java    |    8 +-
 .../java/org/apache/nifi/audit/NiFiAuditor.java |   11 +-
 .../java/org/apache/nifi/audit/PortAuditor.java |   17 +-
 .../apache/nifi/audit/ProcessGroupAuditor.java  |   18 +-
 .../org/apache/nifi/audit/ProcessorAuditor.java |   20 +-
 .../apache/nifi/audit/RelationshipAuditor.java  |   18 +-
 .../nifi/audit/RemoteProcessGroupAuditor.java   |   22 +-
 .../apache/nifi/audit/ReportingTaskAuditor.java |  353 ++
 .../org/apache/nifi/audit/SnippetAuditor.java   |   13 +-
 .../org/apache/nifi/web/NiFiServiceFacade.java  |  208 +-
 .../nifi/web/StandardNiFiContentAccess.java     |  147 +
 .../nifi/web/StandardNiFiServiceFacade.java     | 1374 +++---
 .../StandardNiFiWebConfigurationContext.java    |  736 +++
 .../apache/nifi/web/StandardNiFiWebContext.java |   30 +-
 .../nifi/web/api/ApplicationResource.java       |   76 +-
 .../apache/nifi/web/api/ClusterResource.java    |    2 +-
 .../apache/nifi/web/api/ConnectionResource.java |    6 +-
 .../apache/nifi/web/api/ControllerResource.java |  102 +-
 .../nifi/web/api/ControllerServiceResource.java |  803 ++++
 .../org/apache/nifi/web/api/FunnelResource.java |    6 +-
 .../apache/nifi/web/api/HistoryResource.java    |   70 +-
 .../apache/nifi/web/api/InputPortResource.java  |    6 +-
 .../org/apache/nifi/web/api/LabelResource.java  |    6 +-
 .../apache/nifi/web/api/OutputPortResource.java |    6 +-
 .../nifi/web/api/ProcessGroupResource.java      |   16 +-
 .../apache/nifi/web/api/ProcessorResource.java  |   72 +-
 .../apache/nifi/web/api/ProvenanceResource.java |    2 +-
 .../web/api/RemoteProcessGroupResource.java     |   10 +-
 .../nifi/web/api/ReportingTaskResource.java     |  663 +++
 .../apache/nifi/web/api/SnippetResource.java    |    6 +-
 .../web/api/config/NotFoundExceptionMapper.java |   48 +
 .../nifi/web/api/config/ThrowableMapper.java    |    7 +-
 .../org/apache/nifi/web/api/dto/DtoFactory.java |  303 +-
 .../ApplicationStartupContextListener.java      |    6 +-
 .../nifi/web/controller/ControllerFacade.java   |  114 +-
 .../nifi/web/dao/ControllerServiceDAO.java      |  110 +
 .../apache/nifi/web/dao/ReportingTaskDAO.java   |   88 +
 .../dao/impl/StandardControllerServiceDAO.java  |  320 ++
 .../nifi/web/dao/impl/StandardProcessorDAO.java |   13 +-
 .../web/dao/impl/StandardReportingTaskDAO.java  |  365 ++
 .../nifi/web/dao/impl/StandardSnippetDAO.java   |   36 +-
 .../ControllerServiceProviderFactoryBean.java   |   68 +
 .../OptimisticLockingManagerFactoryBean.java    |   67 +
 .../ReportingTaskProviderFactoryBean.java       |   69 +
 .../org/apache/nifi/web/util/Availability.java  |   34 +
 .../nifi/web/util/DownloadableContent.java      |   47 -
 .../org/apache/nifi/web/util/SnippetUtils.java  |  181 +-
 .../src/main/resources/nifi-web-api-context.xml |   68 +-
 .../nifi/integration/util/NiFiTestServer.java   |    5 +
 .../nifi-web/nifi-web-content-access/pom.xml    |   25 +
 .../java/org/apache/nifi/web/ContentAccess.java |   33 +
 .../apache/nifi/web/ContentRequestContext.java  |   51 +
 .../apache/nifi/web/DownloadableContent.java    |   62 +
 .../nifi-web/nifi-web-content-viewer/.gitignore |    1 +
 .../nifi-web/nifi-web-content-viewer/pom.xml    |   91 +
 .../nifi/web/ContentViewerController.java       |  290 ++
 .../src/main/resources/META-INF/NOTICE          |   19 +
 .../src/main/webapp/WEB-INF/jsp/footer.jsp      |   20 +
 .../src/main/webapp/WEB-INF/jsp/header.jsp      |   96 +
 .../src/main/webapp/WEB-INF/jsp/hexview.jsp     |   32 +
 .../src/main/webapp/WEB-INF/jsp/no-viewer.jsp   |   20 +
 .../src/main/webapp/WEB-INF/web.xml             |   26 +
 .../src/main/webapp/css/main.css                |  113 +
 .../src/main/webapp/js/hexview/LICENSE          |   32 +
 .../main/webapp/js/hexview/hexview.default.css  |   10 +
 .../src/main/webapp/js/hexview/hexview.js       |  199 +
 .../nifi-web/nifi-web-docs/pom.xml              |    8 +-
 .../nifi/web/docs/DocumentationController.java  |    5 +-
 .../main/webapp/WEB-INF/jsp/documentation.jsp   |   20 +-
 .../src/main/webapp/css/component-usage.css     |   98 +-
 .../src/main/webapp/js/application.js           |    7 +-
 .../nifi-web/nifi-web-error/pom.xml             |    2 +-
 .../nifi-web-optimistic-locking/pom.xml         |   14 +-
 .../apache/nifi/web/ConfigurationRequest.java   |   34 +
 .../apache/nifi/web/ConfigurationSnapshot.java  |   22 +-
 .../org/apache/nifi/web/FlowModification.java   |   57 +
 .../nifi/web/OptimisticLockingManager.java      |   76 +-
 .../web/StandardOptimisticLockingManager.java   |  150 +-
 .../org/apache/nifi/web/UpdateRevision.java     |   31 +
 .../nifi-web/nifi-web-security/pom.xml          |    2 +-
 .../nifi/web/security/user/NiFiUserUtils.java   |   10 +
 .../nifi-framework/nifi-web/nifi-web-ui/pom.xml |   33 +-
 .../main/resources/filters/canvas.properties    |    8 +-
 .../src/main/webapp/WEB-INF/pages/canvas.jsp    |   11 +-
 .../main/webapp/WEB-INF/pages/message-page.jsp  |    6 +-
 .../src/main/webapp/WEB-INF/pages/summary.jsp   |    2 +
 .../WEB-INF/partials/canvas/canvas-header.jsp   |    2 +-
 .../canvas/controller-service-configuration.jsp |   90 +
 .../disable-controller-service-dialog.jsp       |   71 +
 .../canvas/enable-controller-service-dialog.jsp |   70 +
 .../canvas/new-controller-service-dialog.jsp    |   53 +
 .../partials/canvas/new-processor-dialog.jsp    |    6 +-
 .../canvas/new-processor-property-dialog.jsp    |   34 -
 .../canvas/new-reporting-task-dialog.jsp        |   53 +
 .../partials/canvas/processor-configuration.jsp |   21 +-
 .../WEB-INF/partials/canvas/registration.jsp    |    2 +-
 .../canvas/reporting-task-configuration.jsp     |  107 +
 .../partials/canvas/settings-content.jsp        |   98 +-
 .../WEB-INF/partials/processor-details.jsp      |    4 -
 .../nifi-web-ui/src/main/webapp/WEB-INF/web.xml |   11 +
 .../nifi-web-ui/src/main/webapp/css/about.css   |    1 -
 .../nifi-web-ui/src/main/webapp/css/canvas.css  |    4 +
 .../webapp/css/connection-configuration.css     |    1 -
 .../src/main/webapp/css/connection-details.css  |    1 -
 .../src/main/webapp/css/controller-service.css  |  269 ++
 .../nifi-web-ui/src/main/webapp/css/dialog.css  |   25 +-
 .../src/main/webapp/css/label-configuration.css |    1 -
 .../nifi-web-ui/src/main/webapp/css/main.css    |   42 +-
 .../css/new-controller-service-dialog.css       |  152 +
 .../main/webapp/css/new-processor-dialog.css    |   53 +-
 .../webapp/css/new-reporting-task-dialog.css    |  152 +
 .../src/main/webapp/css/port-configuration.css  |    2 -
 .../src/main/webapp/css/port-details.css        |    2 -
 .../webapp/css/process-group-configuration.css  |    1 -
 .../main/webapp/css/process-group-details.css   |    1 -
 .../main/webapp/css/processor-configuration.css |  153 -
 .../src/main/webapp/css/processor-details.css   |   27 -
 .../src/main/webapp/css/registration.css        |    8 -
 .../css/remote-process-group-configuration.css  |    3 -
 .../src/main/webapp/css/reporting-task.css      |  116 +
 .../src/main/webapp/css/settings.css            |  123 +-
 .../nifi-web-ui/src/main/webapp/css/shell.css   |    2 +-
 .../src/main/webapp/css/status-history.css      |    1 -
 .../main/webapp/images/buttonNewProperty.png    |  Bin 590 -> 0 bytes
 .../src/main/webapp/images/iconEnable.png       |  Bin 0 -> 472 bytes
 .../src/main/webapp/images/iconUndo.png         |  Bin 642 -> 0 bytes
 .../js/codemirror/addon/fold/foldgutter.css     |   20 +
 .../js/codemirror/lib/codemirror-compressed.js  |   14 +-
 .../webapp/js/jquery/combo/jquery.combo.css     |    8 +
 .../src/main/webapp/js/jquery/jquery.each.js    |    2 +-
 .../webapp/js/jquery/modal/jquery.modal.css     |   12 +-
 .../main/webapp/js/jquery/modal/jquery.modal.js |  117 +-
 .../js/jquery/nfeditor/jquery.nfeditor.js       |    5 +-
 .../jquery/propertytable/buttonNewProperty.png  |  Bin 0 -> 590 bytes
 .../propertytable/jquery.propertytable.css      |  216 +
 .../propertytable/jquery.propertytable.js       | 1608 +++++++
 .../main/webapp/js/jquery/tabbs/jquery.tabbs.js |    2 +
 .../js/jquery/tagcloud/jquery.tagcloud.css      |   62 +
 .../js/jquery/tagcloud/jquery.tagcloud.js       |  226 +
 .../js/nf/bulletin-board/nf-bulletin-board.js   |    3 +
 .../src/main/webapp/js/nf/canvas/nf-actions.js  |   17 +-
 .../src/main/webapp/js/nf/canvas/nf-birdseye.js |    3 +
 .../webapp/js/nf/canvas/nf-canvas-header.js     |   64 +-
 .../webapp/js/nf/canvas/nf-canvas-toolbar.js    |    3 +
 .../webapp/js/nf/canvas/nf-canvas-toolbox.js    |  164 +-
 .../main/webapp/js/nf/canvas/nf-canvas-utils.js |    3 +
 .../src/main/webapp/js/nf/canvas/nf-canvas.js   |  107 +-
 .../main/webapp/js/nf/canvas/nf-clipboard.js    |    3 +
 .../main/webapp/js/nf/canvas/nf-connectable.js  |    3 +
 .../js/nf/canvas/nf-connection-configuration.js |    3 +
 .../main/webapp/js/nf/canvas/nf-connection.js   |    3 +
 .../main/webapp/js/nf/canvas/nf-context-menu.js |    3 +
 .../js/nf/canvas/nf-controller-service.js       | 1743 +++++++
 .../js/nf/canvas/nf-custom-processor-ui.js      |   43 -
 .../main/webapp/js/nf/canvas/nf-custom-ui.js    |   47 +
 .../main/webapp/js/nf/canvas/nf-draggable.js    |    3 +
 .../src/main/webapp/js/nf/canvas/nf-funnel.js   |    3 +
 .../src/main/webapp/js/nf/canvas/nf-go-to.js    |    3 +
 .../webapp/js/nf/canvas/nf-graph-control.js     |    3 +
 .../src/main/webapp/js/nf/canvas/nf-graph.js    |    3 +
 .../js/nf/canvas/nf-label-configuration.js      |    3 +
 .../src/main/webapp/js/nf/canvas/nf-label.js    |    3 +
 .../js/nf/canvas/nf-port-configuration.js       |    3 +
 .../main/webapp/js/nf/canvas/nf-port-details.js |    3 +
 .../src/main/webapp/js/nf/canvas/nf-port.js     |    3 +
 .../nf/canvas/nf-process-group-configuration.js |    3 +
 .../js/nf/canvas/nf-process-group-details.js    |    3 +
 .../webapp/js/nf/canvas/nf-process-group.js     |    3 +
 .../js/nf/canvas/nf-processor-configuration.js  |  500 ++-
 .../nf-processor-property-combo-editor.js       |  177 -
 .../canvas/nf-processor-property-nfel-editor.js |  207 -
 .../js/nf/canvas/nf-processor-property-table.js |  567 ---
 .../canvas/nf-processor-property-text-editor.js |  212 -
 .../main/webapp/js/nf/canvas/nf-processor.js    |    3 +
 .../main/webapp/js/nf/canvas/nf-registration.js |    7 +-
 .../nf-remote-process-group-configuration.js    |    3 +
 .../canvas/nf-remote-process-group-details.js   |    3 +
 .../nf/canvas/nf-remote-process-group-ports.js  |    3 +
 .../js/nf/canvas/nf-remote-process-group.js     |    3 +
 .../webapp/js/nf/canvas/nf-reporting-task.js    |  732 +++
 .../js/nf/canvas/nf-secure-port-details.js      |    3 +
 .../main/webapp/js/nf/canvas/nf-selectable.js   |    3 +
 .../src/main/webapp/js/nf/canvas/nf-settings.js | 1526 ++++++-
 .../src/main/webapp/js/nf/canvas/nf-snippet.js  |    3 +
 .../src/main/webapp/js/nf/canvas/nf-storage.js  |    3 +
 .../webapp/js/nf/canvas/nf-toolbar-action.js    |    3 +
 .../webapp/js/nf/cluster/nf-cluster-table.js    |    3 +
 .../src/main/webapp/js/nf/cluster/nf-cluster.js |    3 +
 .../webapp/js/nf/counters/nf-counters-table.js  |    3 +
 .../main/webapp/js/nf/counters/nf-counters.js   |    3 +
 .../webapp/js/nf/history/nf-history-model.js    |    3 +
 .../webapp/js/nf/history/nf-history-table.js    |    7 +-
 .../src/main/webapp/js/nf/history/nf-history.js |    3 +
 .../src/main/webapp/js/nf/nf-client.js          |    3 +
 .../src/main/webapp/js/nf/nf-common.js          |   83 +-
 .../main/webapp/js/nf/nf-connection-details.js  |    3 +
 .../src/main/webapp/js/nf/nf-dialog.js          |   18 +-
 .../main/webapp/js/nf/nf-processor-details.js   |  358 +-
 .../src/main/webapp/js/nf/nf-shell.js           |    3 +
 .../src/main/webapp/js/nf/nf-status-history.js  |    3 +
 .../js/nf/provenance/nf-provenance-lineage.js   |    3 +
 .../js/nf/provenance/nf-provenance-table.js     |    3 +
 .../webapp/js/nf/provenance/nf-provenance.js    |    3 +
 .../webapp/js/nf/summary/nf-summary-table.js    |    2 +
 .../src/main/webapp/js/nf/summary/nf-summary.js |    3 +
 .../js/nf/templates/nf-templates-table.js       |    3 +
 .../main/webapp/js/nf/templates/nf-templates.js |    3 +
 .../main/webapp/js/nf/users/nf-users-table.js   |    3 +
 .../nifi-framework/nifi-web/pom.xml             |   22 +-
 .../nifi-framework/pom.xml                      |    9 +-
 .../nifi-framework-bundle/pom.xml               |   44 +-
 .../nifi-geo-bundle/nifi-geo-nar/pom.xml        |   33 +
 .../nifi-geo-processors/.gitignore              |    1 +
 .../nifi-geo-bundle/nifi-geo-processors/pom.xml |   43 +
 .../org/apache/nifi/processors/GeoEnrichIP.java |  210 +
 .../nifi/processors/maxmind/DatabaseReader.java |  286 ++
 .../org.apache.nifi.processor.Processor         |   16 +
 nifi/nifi-nar-bundles/nifi-geo-bundle/pom.xml   |   42 +
 .../nifi-hadoop-bundle/nifi-hadoop-nar/pom.xml  |    2 +-
 .../nifi-hdfs-processors/pom.xml                |    2 +-
 .../hadoop/CreateHadoopSequenceFile.java        |    2 +
 .../apache/nifi/processors/hadoop/GetHDFS.java  |   21 +-
 .../processors/hadoop/GetHDFSSequenceFile.java  |    2 +
 .../apache/nifi/processors/hadoop/PutHDFS.java  |   20 +-
 .../additionalDetails.html                      |   46 +
 .../index.html                                  |   88 -
 .../index.html                                  |  162 -
 .../index.html                                  |  150 -
 .../index.html                                  |  159 -
 .../nifi-nar-bundles/nifi-hadoop-bundle/pom.xml |    4 +-
 .../nifi-hadoop-libraries-nar/pom.xml           |    5 +-
 .../nifi-hadoop-libraries-bundle/pom.xml        |    2 +-
 .../nifi-hl7-bundle/nifi-hl7-nar/pom.xml        |   36 +
 .../nifi-hl7-processors/.gitignore              |    1 +
 .../nifi-hl7-bundle/nifi-hl7-processors/pom.xml |  106 +
 .../processors/hl7/ExtractHL7Attributes.java    |  247 +
 .../apache/nifi/processors/hl7/RouteHL7.java    |  217 +
 .../org.apache.nifi.processor.Processor         |   16 +
 .../hl7/TestExtractHL7Attributes.java           |   48 +
 .../src/test/resources/1.hl7                    |   16 +
 .../src/test/resources/hypoglycemia.hl7         |    5 +
 nifi/nifi-nar-bundles/nifi-hl7-bundle/pom.xml   |   33 +
 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 +-
 .../apache/nifi/processors/kafka/GetKafka.java  |    6 +
 .../apache/nifi/processors/kafka/PutKafka.java  |   90 +-
 .../additionalDetails.html                      |   45 +
 .../index.html                                  |  173 -
 .../additionalDetails.html                      |   45 +
 .../index.html                                  |  189 -
 .../nifi/processors/kafka/TestPutKafka.java     |   76 +-
 nifi/nifi-nar-bundles/nifi-kafka-bundle/pom.xml |    4 +-
 .../nifi-kite-bundle/nifi-kite-nar/pom.xml      |   44 +-
 .../src/main/resources/META-INF/LICENSE         |   38 -
 .../src/main/resources/META-INF/NOTICE          |   37 +-
 .../nifi-kite-processors/pom.xml                |   18 +-
 .../processors/kite/AbstractKiteProcessor.java  |   39 +-
 .../nifi/processors/kite/ConvertCSVToAvro.java  |   29 +-
 .../nifi/processors/kite/ConvertJSONToAvro.java |   20 +-
 .../nifi/processors/kite/JSONFileReader.java    |  114 -
 .../processors/kite/StoreInKiteDataset.java     |   10 +-
 .../data/spi/filesystem/CSVFileReaderFixed.java |  172 -
 .../nifi/processors/kite/TestGetSchema.java     |    3 +
 nifi/nifi-nar-bundles/nifi-kite-bundle/pom.xml  |   18 +-
 .../nifi-language-translation-nar/pom.xml       |   36 +
 .../nifi-yandex-processors/.gitignore           |    1 +
 .../nifi-yandex-processors/pom.xml              |   63 +
 .../nifi/processors/yandex/YandexTranslate.java |  325 ++
 .../processors/yandex/model/Translation.java    |   52 +
 .../nifi/processors/yandex/util/Languages.java  |   86 +
 .../yandex/util/ObjectMapperResolver.java       |   48 +
 .../org.apache.nifi.processor.Processor         |   16 +
 .../processors/yandex/TestYandexTranslate.java  |  141 +
 .../nifi-language-translation-bundle/pom.xml    |   48 +
 .../pom.xml                                     |    2 +-
 .../PersistentProvenanceRepository.java         |   10 +-
 .../TestPersistentProvenanceRepository.java     |   42 +-
 .../nifi-provenance-repository-nar/pom.xml      |    2 +-
 .../nifi-volatile-provenance-repository/pom.xml |    2 +-
 .../nifi-provenance-repository-bundle/pom.xml   |    6 +-
 .../nifi-social-media-nar/pom.xml               |   36 +
 .../nifi-twitter-processors/.gitignore          |    1 +
 .../nifi-twitter-processors/pom.xml             |   60 +
 .../nifi/processors/twitter/GetTwitter.java     |  360 ++
 .../org.apache.nifi.processor.Processor         |   16 +
 .../nifi-social-media-bundle/pom.xml            |   33 +
 .../nifi-standard-content-viewer/pom.xml        |   76 +
 .../web/StandardContentViewerController.java    |  103 +
 .../src/main/resources/META-INF/NOTICE          |   19 +
 .../main/webapp/META-INF/nifi-content-viewer    |    3 +
 .../src/main/webapp/WEB-INF/jsp/codemirror.jsp  |   50 +
 .../src/main/webapp/WEB-INF/web.xml             |   29 +
 .../src/main/webapp/css/main.css                |   20 +
 .../nifi-standard-nar/pom.xml                   |    7 +-
 .../nifi-standard-prioritizers/pom.xml          |    2 +-
 .../nifi-standard-processors/pom.xml            |   88 +-
 .../standard/Base64EncodeContent.java           |    2 +-
 .../processors/standard/CompressContent.java    |    4 +
 .../nifi/processors/standard/ControlRate.java   |    2 +-
 .../processors/standard/DetectDuplicate.java    |   15 +-
 .../processors/standard/DistributeLoad.java     |   24 +-
 .../processors/standard/EvaluateJsonPath.java   |   32 +-
 .../standard/EvaluateRegularExpression.java     |   19 +-
 .../nifi/processors/standard/EvaluateXPath.java |    5 +
 .../processors/standard/EvaluateXQuery.java     |   22 +-
 .../processors/standard/ExecuteProcess.java     |    2 +
 .../standard/ExecuteStreamCommand.java          |   25 +-
 .../nifi/processors/standard/ExtractText.java   |  316 ++
 .../apache/nifi/processors/standard/GetFTP.java |   12 +
 .../nifi/processors/standard/GetFile.java       |   21 +-
 .../nifi/processors/standard/GetHTTP.java       |    8 +-
 .../nifi/processors/standard/GetJMSQueue.java   |    2 +
 .../nifi/processors/standard/GetJMSTopic.java   |    2 +
 .../nifi/processors/standard/GetSFTP.java       |   17 +-
 .../processors/standard/HandleHttpRequest.java  |   26 +-
 .../processors/standard/HandleHttpResponse.java |    8 +-
 .../nifi/processors/standard/HashAttribute.java |   23 +-
 .../nifi/processors/standard/HashContent.java   |    2 +
 .../processors/standard/IdentifyMimeType.java   |   13 +-
 .../nifi/processors/standard/InvokeHTTP.java    |   52 +-
 .../nifi/processors/standard/MergeContent.java  |   17 +
 .../processors/standard/MonitorActivity.java    |   15 +-
 .../nifi/processors/standard/PostHTTP.java      |   13 +-
 .../nifi/processors/standard/PutEmail.java      |  149 +-
 .../apache/nifi/processors/standard/PutFTP.java |   22 +-
 .../nifi/processors/standard/PutFile.java       |    8 +-
 .../apache/nifi/processors/standard/PutJMS.java |    6 +-
 .../nifi/processors/standard/PutSFTP.java       |   10 +-
 .../processors/standard/RouteOnAttribute.java   |   15 +-
 .../processors/standard/RouteOnContent.java     |    5 +
 .../nifi/processors/standard/ScanContent.java   |   18 +-
 .../processors/standard/SegmentContent.java     |   12 +
 .../nifi/processors/standard/SplitContent.java  |  116 +-
 .../nifi/processors/standard/SplitText.java     |   10 +
 .../nifi/processors/standard/TransformXml.java  |   15 +-
 .../nifi/processors/standard/UnpackContent.java |   37 +-
 .../org.apache.nifi.processor.Processor         |    1 +
 .../index.html                                  |   63 -
 .../index.html                                  |  166 -
 .../index.html                                  |  116 -
 .../index.html                                  |   65 -
 .../index.html                                  |  147 -
 .../index.html                                  |  106 -
 .../index.html                                  |   97 -
 .../additionalDetails.html                      |   31 +
 .../index.html                                  |  155 -
 .../index.html                                  |  160 -
 .../index.html                                  |  135 -
 .../additionalDetails.html                      |  149 +
 .../index.html                                  |  311 --
 .../index.html                                  |  100 -
 .../index.html                                  |  111 -
 .../index.html                                  |   64 -
 .../index.html                                  |  227 -
 .../index.html                                  |  186 -
 .../index.html                                  |  143 -
 .../index.html                                  |  118 -
 .../index.html                                  |  122 -
 .../index.html                                  |  250 --
 .../additionalDetails.html                      |   43 +
 .../index.html                                  |  255 --
 .../additionalDetails.html                      |   44 +
 .../index.html                                  |  112 -
 .../index.html                                  |   88 -
 .../index.html                                  |   89 -
 .../additionalDetails.html                      |   59 +
 .../index.html                                  |  136 -
 .../index.html                                  |  181 -
 .../index.html                                  |   86 -
 .../index.html                                  |  144 -
 .../index.html                                  |   80 -
 .../index.html                                  |  347 --
 .../index.html                                  |   64 -
 .../index.html                                  |  143 -
 .../index.html                                  |  187 -
 .../index.html                                  |  114 -
 .../index.html                                  |  283 --
 .../index.html                                  |  109 -
 .../index.html                                  |  152 -
 .../index.html                                  |  281 --
 .../index.html                                  |   91 -
 .../index.html                                  |  114 -
 .../additionalDetails.html                      |   46 +
 .../index.html                                  |  110 -
 .../index.html                                  |   82 -
 .../index.html                                  |   85 -
 .../index.html                                  |  100 -
 .../index.html                                  |  123 -
 .../index.html                                  |  107 -
 .../index.html                                  |   85 -
 .../index.html                                  |  121 -
 .../index.html                                  |   64 -
 .../index.html                                  |   63 -
 .../index.html                                  |  163 -
 .../index.html                                  |   56 -
 .../standard/TestDetectDuplicate.java           |    5 +-
 .../standard/TestEvaluateRegularExpression.java |  319 --
 .../processors/standard/TestExtractText.java    |  314 ++
 .../nifi/processors/standard/TestPutEmail.java  |   40 +-
 .../processors/standard/TestSplitContent.java   |  123 +
 .../nifi-standard-reporting-tasks/pom.xml       |    2 +-
 .../additionalDetails.html                      |   70 +
 .../index.html                                  |   85 -
 .../index.html                                  |   58 -
 .../index.html                                  |   77 -
 .../additionalDetails.html                      |   41 +
 .../index.html                                  |   65 -
 .../nifi-standard-bundle/pom.xml                |   18 +-
 .../pom.xml                                     |    2 +-
 .../pom.xml                                     |    2 +-
 .../DistributedMapCacheClientService.java       |   23 +-
 .../DistributedSetCacheClientService.java       |   16 +-
 .../additionalDetails.html                      |   45 +
 .../index.html                                  |   98 -
 .../index.html                                  |   51 -
 .../nifi-distributed-cache-protocol/pom.xml     |    2 +-
 .../cache/protocol/ProtocolHandshake.java       |    2 +-
 .../nifi-distributed-cache-server/pom.xml       |    2 +-
 .../cache/server/AbstractCacheServer.java       |    2 +-
 .../cache/server/DistributedCacheServer.java    |   13 +-
 .../server/map/DistributedMapCacheServer.java   |    2 +
 .../additionalDetails.html                      |   46 +
 .../index.html                                  |  103 -
 .../nifi-distributed-cache-services-nar/pom.xml |    2 +-
 .../pom.xml                                     |    2 +-
 .../nifi-http-context-map-api/pom.xml           |    4 +-
 .../nifi-http-context-map-nar/pom.xml           |    2 +-
 .../nifi-http-context-map/pom.xml               |    2 +-
 .../nifi/http/StandardHttpContextMap.java       |    9 +
 .../nifi-http-context-map-bundle/pom.xml        |    2 +-
 .../nifi-load-distribution-service-api/pom.xml  |    2 +-
 .../nifi-ssl-context-nar/pom.xml                |    2 +-
 .../nifi-ssl-context-service/pom.xml            |    2 +-
 .../nifi/ssl/StandardSSLContextService.java     |   39 +-
 .../additionalDetails.html                      |   49 +
 .../index.html                                  |   63 -
 .../nifi-ssl-context-bundle/pom.xml             |    2 +-
 .../nifi-ssl-context-service-api/pom.xml        |    2 +-
 .../nifi-standard-services-api-nar/pom.xml      |    2 +-
 .../nifi-standard-services/pom.xml              |    2 +-
 .../nifi-update-attribute-model/pom.xml         |    2 +-
 .../nifi-update-attribute-nar/pom.xml           |    2 +-
 .../nifi-update-attribute-processor/pom.xml     |    2 +-
 .../processors/attributes/UpdateAttribute.java  |    5 +
 .../additionalDetails.html                      |  253 ++
 .../index.html                                  |  253 --
 .../nifi-update-attribute-ui/pom.xml            |    7 +-
 .../update/attributes/api/RuleResource.java     |  131 +-
 .../src/main/webapp/META-INF/nifi-processor     |   15 -
 .../META-INF/nifi-processor-configuration       |   15 +
 .../src/main/webapp/WEB-INF/jsp/worksheet.jsp   |   10 +-
 .../src/main/webapp/WEB-INF/web.xml             |    4 +-
 .../src/main/webapp/js/application.js           |   12 +-
 .../nifi-update-attribute-bundle/pom.xml        |    8 +-
 nifi/nifi-nar-bundles/pom.xml                   |   38 +-
 nifi/pom.xml                                    |  132 +-
 1045 files changed, 54421 insertions(+), 34367 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/93a12104/nifi/nifi-assembly/NOTICE
----------------------------------------------------------------------
diff --cc nifi/nifi-assembly/NOTICE
index 92c48f0,9da37ae..f14c662
--- a/nifi/nifi-assembly/NOTICE
+++ b/nifi/nifi-assembly/NOTICE
@@@ -496,22 -501,39 +501,55 @@@ The following binary components are pro
        Apache License Version 2.0 http://www.apache.org/licenses/.
        (c) Daniel Lemire, http://lemire.me/en/
  
+   (ASLv2) Twitter4J
+     The following NOTICE information applies:
+       Copyright 2007 Yusuke Yamamoto
+       
+       Twitter4J includes software from JSON.org to parse JSON response from the Twitter API. You can see the license term at http://www.JSON.org/license.html
+   
+   (ASLv2) JOAuth
+     The following NOTICE information applies:
+       JOAuth
+       Copyright 2010-2013 Twitter, Inc
+ 
+       Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
+   
+   (ASLv2) Hosebird Client
+     The following NOTICE information applies:
+       Hosebird Client (hbc)
+       Copyright 2013 Twitter, Inc.
+ 
+       Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
+ 
+   (ASLv2) GeoIP2 Java API
+     The following NOTICE information applies:
+       GeoIP2 Java API
+       This software is Copyright (c) 2013 by MaxMind, Inc.
+       
+       This is free software, licensed under the Apache License, Version 2.0.
+       
+   (ASLv2) Google HTTP Client Library for Java
+     The following NOTICE information applies:
+       Google HTTP Client Library for Java
+       
+       This is free software, licensed under the Apache License, Version 2.0.
+ 
 +  (ASLv2) Amazon Web Services SDK
 +    The following NOTICE information applies:
 +		Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 +
 +		This product includes software developed by
 +		Amazon Technologies, Inc (http://www.amazon.com/).
 +
 +		**********************
 +		THIRD PARTY COMPONENTS
 +		**********************
 +		This software includes third party software subject to the following copyrights:
 +		- XML parsing and utility functions from JetS3t - Copyright 2006-2009 James Murty.
 +		- JSON parsing and utility functions from JSON.org - Copyright 2002 JSON.org.
 +		- PKCS#1 PEM encoded private key parsing and utility functions from oauth.googlecode.com - Copyright 1998-2010 AOL Inc.
 +
 +
  ************************
  Common Development and Distribution License 1.1
  ************************

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/93a12104/nifi/nifi-nar-bundles/pom.xml
----------------------------------------------------------------------
diff --cc nifi/nifi-nar-bundles/pom.xml
index 374304a,50a9407..7d80826
--- a/nifi/nifi-nar-bundles/pom.xml
+++ b/nifi/nifi-nar-bundles/pom.xml
@@@ -34,8 -35,11 +34,12 @@@
          <module>nifi-update-attribute-bundle</module>
          <module>nifi-kafka-bundle</module>
  		<module>nifi-kite-bundle</module>
 +		<module>nifi-aws-bundle</module>
-   </modules>
+ 		<module>nifi-social-media-bundle</module>
+ 		<module>nifi-geo-bundle</module>
+ 		<module>nifi-hl7-bundle</module>
+ 		<module>nifi-language-translation-bundle</module>
+     </modules>
      <dependencyManagement>
          <dependencies>
              <dependency>