mirror of https://github.com/apache/lucene.git
SOLR-5874: Unsafe cast in CloudSolrServer's RouteException. Change RouteException to handle Throwable rather than Exception.
SOLR-5899: CloudSolrServer's RouteResponse and RouteException should be publicly accessible. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1580550 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ef3973c589
commit
76ab559958
|
@ -194,6 +194,12 @@ Bug Fixes
|
|||
|
||||
* SOLR-5893: On restarting overseer designate , move itself to front of the queue (Noble Paul)
|
||||
|
||||
* SOLR-5874: Unsafe cast in CloudSolrServer's RouteException. Change
|
||||
RouteException to handle Throwable rather than Exception.
|
||||
(Mark Miller, David Arthur)
|
||||
|
||||
* SOLR-5899: CloudSolrServer's RouteResponse and RouteException should be
|
||||
publicly accessible. (Mark Miller, shalin)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
|
|
@ -311,8 +311,8 @@ public class CloudSolrServer extends SolrServer {
|
|||
return null;
|
||||
}
|
||||
|
||||
NamedList exceptions = new NamedList();
|
||||
NamedList shardResponses = new NamedList();
|
||||
NamedList<Throwable> exceptions = new NamedList<Throwable>();
|
||||
NamedList<NamedList> shardResponses = new NamedList<NamedList>();
|
||||
|
||||
Map<String, LBHttpSolrServer.Req> routes = updateRequest.getRoutes(router, col, urlMap, routableParams, this.idField);
|
||||
if (routes == null) {
|
||||
|
@ -453,7 +453,7 @@ public class CloudSolrServer extends SolrServer {
|
|||
return condensed;
|
||||
}
|
||||
|
||||
class RouteResponse extends NamedList {
|
||||
public static class RouteResponse extends NamedList {
|
||||
private NamedList routeResponses;
|
||||
private Map<String, LBHttpSolrServer.Req> routes;
|
||||
|
||||
|
@ -475,19 +475,19 @@ public class CloudSolrServer extends SolrServer {
|
|||
|
||||
}
|
||||
|
||||
class RouteException extends SolrException {
|
||||
public static class RouteException extends SolrException {
|
||||
|
||||
private NamedList exceptions;
|
||||
private NamedList<Throwable> throwables;
|
||||
private Map<String, LBHttpSolrServer.Req> routes;
|
||||
|
||||
public RouteException(ErrorCode errorCode, NamedList exceptions, Map<String, LBHttpSolrServer.Req> routes){
|
||||
super(errorCode, ((Exception)exceptions.getVal(0)).getMessage(), (Exception)exceptions.getVal(0));
|
||||
this.exceptions = exceptions;
|
||||
public RouteException(ErrorCode errorCode, NamedList<Throwable> throwables, Map<String, LBHttpSolrServer.Req> routes){
|
||||
super(errorCode, throwables.getVal(0).getMessage(), throwables.getVal(0));
|
||||
this.throwables = throwables;
|
||||
this.routes = routes;
|
||||
}
|
||||
|
||||
public NamedList getExceptions() {
|
||||
return exceptions;
|
||||
public NamedList<Throwable> getThrowables() {
|
||||
return throwables;
|
||||
}
|
||||
|
||||
public Map<String, LBHttpSolrServer.Req> getRoutes() {
|
||||
|
|
Loading…
Reference in New Issue