[
https://issues.apache.org/jira/browse/SOLR-12718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16611779#comment-16611779
]
Peter Cseh commented on SOLR-12718:
-----------------------------------
Opened up PR with a patch.
This change breaks everyone's usage of StreamContext. Should I add a
constructor with no parameters and keep the setter as well for compatibility
reasons?
> StreamContext ctor should always take a SolrClientCache
> -------------------------------------------------------
>
> Key: SOLR-12718
> URL: https://issues.apache.org/jira/browse/SOLR-12718
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Varun Thacker
> Priority: Major
> Labels: newdev, streaming
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {code:java}
> StreamExpression expression = StreamExpressionParser.parse(expr);
> TupleStream stream = new CloudSolrStream(expression, factory);
> SolrClientCache solrClientCache = new SolrClientCache();
> StreamContext streamContext = new StreamContext();
> streamContext.setSolrClientCache(solrClientCache);
> stream.setStreamContext(streamContext);
> List<Tuple> tuples = getTuples(stream);{code}
>
> If we don't call {{streamContext.setSolrClientCache}} we will get an NPE.
> Seems like we should always have the user take solrClientCache in
> StreamContext's ctor ?
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]