On 2/22/2017 4:59 PM, Chetas Joshi wrote:
> 2017-02-22 15:27:06,994 ERROR o.a.s.c.solrj.impl.CloudSolrClient ~ Request
> to collection xxxxxx failed due to (510) org.apache.solr.common.
> SolrException: Could not find a healthy node to handle the request., retry?
>
> Here is my code snippet. I go through a loop until I get the last page to
> get back all the results from Solr using the cursor approach. Do I need to
> take care of the above situation/exceptions in my code?
>
> while(true){
>
> val rsp: QueryResponse = *cloudSolrclient*.query(cursorQ)
> val nextCursorMark: String = rsp.getNextCursorMark
>
> val nextCursorMark: String = rsp.getNextCursorMark
>
> if (cursorMark.equals(nextCursorMark)) break; cloudSolrClient.close()
>
> }

This doesn't look like Java code, so I'm assuming it's Scala, and I do
not have any experience with that language.  There doesn't seem to be
any exception handling.  The query method will throw an exception if the
server's not available.  You must handle that in your code and take
appropriate action, such as breaking out of the loop.

Thanks,
Shawn

Reply via email to