lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aman Deep Singh <amandeep.coo...@gmail.com>
Subject Possible bug in Solrj-6.6.0
Date Fri, 16 Jun 2017 06:17:53 GMT
Hi,
I think their is a possible bug in Solrj version 6.6.0 ,as streaming is not
working
as i have a piece of code

public Set<String> getAllIds(String requestId, String field) {
    LOG.info("Now Trying to fetch all the ids from SOLR for request Id
{}", requestId);
    Map props = new HashMap();
    props.put("q", field + ":*");
    props.put("qt", "/export");
    props.put("sort", field + " asc");
    props.put("fl", field);
    Set<String> idSet = new HashSet<>();
    try (CloudSolrStream cloudSolrStream = new
CloudSolrStream(cloudSolrClient.getZkHost(),
            cloudSolrClient.getDefaultCollection(), new MapSolrParams(props))) {
        cloudSolrStream.open();
        while (true) {
            Tuple tuple = cloudSolrStream.read();
            if (tuple.EOF) {
                break;
            }
            idSet.add(tuple.getString(field));
        }
        return idSet;
    } catch (IOException ex) {
        LOG.error("Error while fetching the ids from SOLR for request
Id {} ", requestId, ex);
    }
    return Collections.emptySet();
}


This is working in the Solrj 6.5.1 but now it start throwing Error
after upgrading to solrj-6.6.0

java.io.IOException: java.lang.NullPointerException
	at org.apache.solr.client.solrj.io.stream.CloudSolrStream.constructStreams(CloudSolrStream.java:408)
~[solr-solrj-6.6.0.jar:6.6.0 5c7a7b65d2aa7ce5ec96458315c661a18b320241
- ishan - 2017-05-30 07:32:54]
	at org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(CloudSolrStream.java:299)
~[solr-solrj-6.6.0.jar:6.6.0 5c7a7b65d2aa7ce5ec96458315c661a18b320241
- ishan - 2017-05-30 07:32:54]


Thanks,

Aman Deep Singh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message