nifi git commit: NIFI-5108 Updated all explicit refs and media nar usage of commons-compress to latest version and updated spring redis client

2018-04-24 Thread alopresto
Repository: nifi
Updated Branches:
  refs/heads/master e3f472079 -> ac9944cce


NIFI-5108 Updated all explicit refs and media nar usage of commons-compress to 
latest version and updated spring redis client

This closes #2651.

Signed-off-by: Andy LoPresto 


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

Branch: refs/heads/master
Commit: ac9944ccee7e085cba3c0addd7d8584f3863631f
Parents: e3f4720
Author: joewitt 
Authored: Mon Apr 23 12:23:18 2018 -0400
Committer: Andy LoPresto 
Committed: Tue Apr 24 15:16:04 2018 -0400

--
 nifi-commons/nifi-flowfile-packager/pom.xml  | 2 +-
 nifi-nar-bundles/nifi-framework-bundle/pom.xml   | 4 ++--
 .../nifi-media-bundle/nifi-media-processors/pom.xml  | 8 +++-
 nifi-nar-bundles/nifi-redis-bundle/pom.xml   | 2 +-
 nifi-nar-bundles/nifi-standard-bundle/pom.xml| 4 ++--
 5 files changed, 13 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/ac9944cc/nifi-commons/nifi-flowfile-packager/pom.xml
--
diff --git a/nifi-commons/nifi-flowfile-packager/pom.xml 
b/nifi-commons/nifi-flowfile-packager/pom.xml
index b06c834..0622bc2 100644
--- a/nifi-commons/nifi-flowfile-packager/pom.xml
+++ b/nifi-commons/nifi-flowfile-packager/pom.xml
@@ -25,7 +25,7 @@
 
 org.apache.commons
 commons-compress
-1.15
+1.16.1
 
 
 org.apache.commons

http://git-wip-us.apache.org/repos/asf/nifi/blob/ac9944cc/nifi-nar-bundles/nifi-framework-bundle/pom.xml
--
diff --git a/nifi-nar-bundles/nifi-framework-bundle/pom.xml 
b/nifi-nar-bundles/nifi-framework-bundle/pom.xml
index d5425e4..e164519 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/pom.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/pom.xml
@@ -194,7 +194,7 @@
 
 org.apache.tika
 tika-core
-1.16
+1.17
 
 
 commons-codec
@@ -594,7 +594,7 @@
 
 org.apache.commons
 commons-compress
-1.15
+1.16.1
 
 
 commons-net

http://git-wip-us.apache.org/repos/asf/nifi/blob/ac9944cc/nifi-nar-bundles/nifi-media-bundle/nifi-media-processors/pom.xml
--
diff --git a/nifi-nar-bundles/nifi-media-bundle/nifi-media-processors/pom.xml 
b/nifi-nar-bundles/nifi-media-bundle/nifi-media-processors/pom.xml
index aa236a0..6070653 100644
--- a/nifi-nar-bundles/nifi-media-bundle/nifi-media-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-media-bundle/nifi-media-processors/pom.xml
@@ -49,7 +49,7 @@
 
 org.apache.tika
 tika-parsers
-1.16
+1.17
 
 
 com.fasterxml.jackson.core
@@ -66,6 +66,12 @@
 
 
 
+
+
+org.apache.commons
+commons-compress
+1.16.1
+
 
 
 

http://git-wip-us.apache.org/repos/asf/nifi/blob/ac9944cc/nifi-nar-bundles/nifi-redis-bundle/pom.xml
--
diff --git a/nifi-nar-bundles/nifi-redis-bundle/pom.xml 
b/nifi-nar-bundles/nifi-redis-bundle/pom.xml
index abf2f26..e48ec39 100644
--- a/nifi-nar-bundles/nifi-redis-bundle/pom.xml
+++ b/nifi-nar-bundles/nifi-redis-bundle/pom.xml
@@ -28,7 +28,7 @@
 pom
 
 
-1.8.3.RELEASE
+1.8.11.RELEASE
 
 
 

http://git-wip-us.apache.org/repos/asf/nifi/blob/ac9944cc/nifi-nar-bundles/nifi-standard-bundle/pom.xml
--
diff --git a/nifi-nar-bundles/nifi-standard-bundle/pom.xml 
b/nifi-nar-bundles/nifi-standard-bundle/pom.xml
index a8d2885..01d888f 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/pom.xml
+++ b/nifi-nar-bundles/nifi-standard-bundle/pom.xml
@@ -169,7 +169,7 @@
 
 org.apache.commons
 commons-compress
-1.15
+1.16.1
 
 
 org.apache.commons
@@ -270,7 +270,7 @@
 
 org.apache.tika
 tika-core
-1.16
+1.17
 
 
 com.squareup.okhttp3



nifi git commit: NIFI-4035 - Adding PutSolrRecord Processor that reads NiFi records and indexes them into Solr as SolrDocuments

2018-04-24 Thread bbende
Repository: nifi
Updated Branches:
  refs/heads/master 0390c0f19 -> e3f472079


NIFI-4035 - Adding PutSolrRecord Processor that reads NiFi records and indexes 
them into Solr as SolrDocuments

Adding Test Cases for PutSolrRecord Processor

Adding PutSolrRecord Processor in the list of Processors

Resolving checkstyle errors

Resolving checkstyle errors in test classes

Adding License information and additional information about the processor

1. Implementing Batch Indexing 2. Changes for nested records 3. Removing 
MockRecordParser

Fixing bugs with nested records

Updating version of dependencies

Setting Expression Language Scope

This closes #2561.

Signed-off-by: Bryan Bende 


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

Branch: refs/heads/master
Commit: e3f4720797a9777264d1732b2e1475b8f344a8f0
Parents: 0390c0f
Author: abhinavrohatgi30 
Authored: Sat Mar 17 16:35:06 2018 +0100
Committer: Bryan Bende 
Committed: Tue Apr 24 10:50:40 2018 -0400

--
 .../nifi-solr-processors/pom.xml|   6 +
 .../nifi/processors/solr/PutSolrRecord.java | 337 
 .../apache/nifi/processors/solr/SolrUtils.java  | 140 +++-
 .../org.apache.nifi.processor.Processor |   1 +
 .../additionalDetails.html  | 114 +++
 .../nifi/processors/solr/TestPutSolrRecord.java | 832 +++
 .../solr/testCollection/conf/schema.xml |  66 +-
 7 files changed, 1465 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/e3f47207/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/pom.xml
--
diff --git a/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/pom.xml 
b/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/pom.xml
index 5684f37..ea1499a 100755
--- a/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/pom.xml
@@ -94,6 +94,12 @@
 test
 
 
+org.apache.nifi
+nifi-mock-record-utils
+1.7.0-SNAPSHOT
+test
+
+
 org.slf4j
 slf4j-simple
 test

http://git-wip-us.apache.org/repos/asf/nifi/blob/e3f47207/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/PutSolrRecord.java
--
diff --git 
a/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/PutSolrRecord.java
 
b/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/PutSolrRecord.java
new file mode 100644
index 000..0b3e107
--- /dev/null
+++ 
b/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/PutSolrRecord.java
@@ -0,0 +1,337 @@
+/*
+ * 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.solr;
+
+import org.apache.nifi.annotation.behavior.DynamicProperty;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.flowfile.FlowFile;
+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.schema.access.Schema

nifi git commit: NIFI-4561 ExecuteSQL returns no FlowFile for some queries

2018-04-24 Thread mthomsen
Repository: nifi
Updated Branches:
  refs/heads/master 5ca6261de -> 0390c0f19


NIFI-4561 ExecuteSQL returns no FlowFile for some queries

This closes #2243

Signed-off-by: Mike Thomsen 


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

Branch: refs/heads/master
Commit: 0390c0f1967d1a57a333d15e1ec41b06ceb88590
Parents: 5ca6261
Author: patricker 
Authored: Wed Nov 1 10:25:26 2017 +0800
Committer: Mike Thomsen 
Committed: Tue Apr 24 10:27:44 2018 -0400

--
 .../nifi/processors/standard/ExecuteSQL.java| 99 
 .../processors/standard/TestExecuteSQL.java | 26 +
 2 files changed, 87 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/0390c0f1/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteSQL.java
--
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteSQL.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteSQL.java
index 203d02a..13be8d5 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteSQL.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteSQL.java
@@ -21,6 +21,7 @@ import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.sql.Statement;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
@@ -91,12 +92,15 @@ import static 
org.apache.nifi.processors.standard.util.JdbcCommon.USE_AVRO_LOGIC
 })
 @WritesAttributes({
 @WritesAttribute(attribute="executesql.row.count", description = "Contains 
the number of rows returned in the select query"),
-@WritesAttribute(attribute="executesql.query.duration", description = 
"Duration of the query in milliseconds")
+@WritesAttribute(attribute="executesql.query.duration", description = 
"Duration of the query in milliseconds"),
+@WritesAttribute(attribute="executesql.resultset.index", description = 
"Assuming multiple result sets are returned, "
+   + "the zero based index of this result set.")
 })
 public class ExecuteSQL extends AbstractProcessor {
 
 public static final String RESULT_ROW_COUNT = "executesql.row.count";
 public static final String RESULT_QUERY_DURATION = 
"executesql.query.duration";
+public static final String RESULTSET_INDEX = "executesql.resultset.index";
 
 // Relationships
 public static final Relationship REL_SUCCESS = new Relationship.Builder()
@@ -220,53 +224,60 @@ public class ExecuteSQL extends AbstractProcessor {
 JdbcCommon.setParameters(st, fileToProcess.getAttributes());
 }
 logger.debug("Executing query {}", new Object[]{selectQuery});
-boolean results = st.execute();
+boolean hasResults = st.execute();
+boolean hasUpdateCount = st.getUpdateCount() != -1;
 
+while(hasResults || hasUpdateCount) {
+//getMoreResults() and execute() return false to indicate that 
the result of the statement is just a number and not a ResultSet
+if (hasResults) {
+FlowFile resultSetFF;
+if (fileToProcess == null) {
+resultSetFF = session.create();
+} else {
+resultSetFF = session.create(fileToProcess);
+resultSetFF = session.putAllAttributes(resultSetFF, 
fileToProcess.getAttributes());
+}
 
-while(results){
-FlowFile resultSetFF;
-if(fileToProcess == null){
-resultSetFF = session.create();
-} else {
-resultSetFF = session.create(fileToProcess);
-resultSetFF = session.putAllAttributes(resultSetFF, 
fileToProcess.getAttributes());
-}
+final AtomicLong nrOfRows = new AtomicLong(0L);
+resultSetFF = session.write(resultSetFF, out -> {
+try {
 
-final AtomicLong nrOfRows = new AtomicLong(0L);
-resultSetFF = session.write(resultSetFF, out -> {
-try {
-
-final ResultSet resultSet = st.getResultSet();
-final