You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Jonathan Nightingale (Jira)" <ji...@apache.org> on 2020/05/22 14:41:00 UTC
[jira] [Created] (SOLR-14508) TopicStreams do not allow use of
collection aliases
Jonathan Nightingale created SOLR-14508:
-------------------------------------------
Summary: TopicStreams do not allow use of collection aliases
Key: SOLR-14508
URL: https://issues.apache.org/jira/browse/SOLR-14508
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Components: SolrJ
Affects Versions: 8.1, 7.4
Reporter: Jonathan Nightingale
I'm trying to use the solrJ TopicStream class to listen for data in a collection by referencing its alias. It complains about there not being any slices for that alias. On investigation it looked like the code in solrj was explicitly NOT looking at aliases in topic stream.
I made some minor changes and rebuilt and it seems to work.
in two places where getSlices is called, I set the useAlias flag to true
protected void constructStreams() throws IOException {
try {
ZkStateReader zkStateReader = cloudSolrClient.getZkStateReader();
Slice[] slices = CloudSolrStream.getSlices(this.collection, zkStateReader, *true*);
and also here
private void getCheckpoints() throws IOException {
this.checkpoints = new HashMap<>();
ZkStateReader zkStateReader = cloudSolrClient.getZkStateReader();
Slice[] slices = CloudSolrStream.getSlices(this.collection, zkStateReader, *true*);
I don't know how many versions this affects but I'm sure its a bunch. Also I hit the same errors using the REST api as I did using Solrj, so this would probably not affect that
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org