lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Cseh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-12718) StreamContext ctor should always take a SolrClientCache
Date Wed, 12 Sep 2018 09:00:00 GMT

    [ 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message