From a3ddb3b4fae69c4d841caa8c5d6d342ef94a9884 Mon Sep 17 00:00:00 2001 From: Pierre Villard Date: Wed, 16 Aug 2017 17:12:16 +0200 Subject: [PATCH] NIFI-1604 - PutSolrContentStream - Evaluate stream path against flow file This closes #2092. Signed-off-by: Bryan Bende --- .../apache/nifi/processors/solr/PutSolrContentStream.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/PutSolrContentStream.java b/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/PutSolrContentStream.java index 69bc071e99..4a1695324f 100755 --- a/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/PutSolrContentStream.java +++ b/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/PutSolrContentStream.java @@ -192,16 +192,13 @@ public class PutSolrContentStream extends SolrProcessor { final boolean isSolrCloud = SOLR_TYPE_CLOUD.equals(context.getProperty(SOLR_TYPE).getValue()); final String collection = context.getProperty(COLLECTION).evaluateAttributeExpressions(flowFile).getValue(); final Long commitWithin = context.getProperty(COMMIT_WITHIN).evaluateAttributeExpressions(flowFile).asLong(); - + final String contentStreamPath = context.getProperty(CONTENT_STREAM_PATH).evaluateAttributeExpressions(flowFile).getValue(); final MultiMapSolrParams requestParams = new MultiMapSolrParams(getRequestParams(context, flowFile)); StopWatch timer = new StopWatch(true); session.read(flowFile, new InputStreamCallback() { @Override public void process(final InputStream in) throws IOException { - final String contentStreamPath = context.getProperty(CONTENT_STREAM_PATH) - .evaluateAttributeExpressions().getValue(); - ContentStreamUpdateRequest request = new ContentStreamUpdateRequest(contentStreamPath); request.setParams(new ModifiableSolrParams());