mirror of https://github.com/apache/nifi.git
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:
parent
4b3b2ebf24
commit
a3ddb3b4fa
|
@ -192,16 +192,13 @@ public class PutSolrContentStream extends SolrProcessor {
|
||||||
final boolean isSolrCloud = SOLR_TYPE_CLOUD.equals(context.getProperty(SOLR_TYPE).getValue());
|
final boolean isSolrCloud = SOLR_TYPE_CLOUD.equals(context.getProperty(SOLR_TYPE).getValue());
|
||||||
final String collection = context.getProperty(COLLECTION).evaluateAttributeExpressions(flowFile).getValue();
|
final String collection = context.getProperty(COLLECTION).evaluateAttributeExpressions(flowFile).getValue();
|
||||||
final Long commitWithin = context.getProperty(COMMIT_WITHIN).evaluateAttributeExpressions(flowFile).asLong();
|
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));
|
final MultiMapSolrParams requestParams = new MultiMapSolrParams(getRequestParams(context, flowFile));
|
||||||
|
|
||||||
StopWatch timer = new StopWatch(true);
|
StopWatch timer = new StopWatch(true);
|
||||||
session.read(flowFile, new InputStreamCallback() {
|
session.read(flowFile, new InputStreamCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void process(final InputStream in) throws IOException {
|
public void process(final InputStream in) throws IOException {
|
||||||
final String contentStreamPath = context.getProperty(CONTENT_STREAM_PATH)
|
|
||||||
.evaluateAttributeExpressions().getValue();
|
|
||||||
|
|
||||||
ContentStreamUpdateRequest request = new ContentStreamUpdateRequest(contentStreamPath);
|
ContentStreamUpdateRequest request = new ContentStreamUpdateRequest(contentStreamPath);
|
||||||
request.setParams(new ModifiableSolrParams());
|
request.setParams(new ModifiableSolrParams());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue