NIFI-1604 - PutSolrContentStream - Evaluate stream path against flow file

This closes #2092.

Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
Pierre Villard 2017-08-16 17:12:16 +02:00 committed by Bryan Bende
parent 4b3b2ebf24
commit a3ddb3b4fa
No known key found for this signature in database
GPG Key ID: A0DDA9ED50711C39
1 changed files with 1 additions and 4 deletions

View File

@ -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());