lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetas Joshi <chetas.jo...@gmail.com>
Subject Re: CloudSolrClient stuck in a loop with a recurring exception
Date Thu, 23 Feb 2017 00:35:39 GMT
Yes, it is scala.
And yes, I just wanted to confirm that I had to add exception handling and
break out of the loop.

Chetas.

On Wed, Feb 22, 2017 at 4:25 PM, Shawn Heisey <apache@elyograg.org> wrote:

> 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
>
>

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