mirror of https://github.com/apache/druid.git
throw ISE when no servers found at all
This commit is contained in:
parent
6306e87a96
commit
c6274762b7
|
@ -20,6 +20,7 @@
|
||||||
package io.druid.server.router;
|
package io.druid.server.router;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
import com.metamx.common.ISE;
|
||||||
import com.metamx.common.Pair;
|
import com.metamx.common.Pair;
|
||||||
import com.metamx.emitter.EmittingLogger;
|
import com.metamx.emitter.EmittingLogger;
|
||||||
import io.druid.client.selector.Server;
|
import io.druid.client.selector.Server;
|
||||||
|
@ -67,7 +68,7 @@ public class QueryHostFinder<T>
|
||||||
"Catastrophic failure! No servers found at all! Failing request!"
|
"Catastrophic failure! No servers found at all! Failing request!"
|
||||||
).emit();
|
).emit();
|
||||||
|
|
||||||
return null;
|
throw new ISE("No server found for query[%s]", query);
|
||||||
}
|
}
|
||||||
|
|
||||||
log.debug("Selected [%s]", server.getHost());
|
log.debug("Selected [%s]", server.getHost());
|
||||||
|
@ -84,7 +85,7 @@ public class QueryHostFinder<T>
|
||||||
"Catastrophic failure! No servers found at all! Failing request!"
|
"Catastrophic failure! No servers found at all! Failing request!"
|
||||||
).emit();
|
).emit();
|
||||||
|
|
||||||
return null;
|
throw new ISE("No default server found!");
|
||||||
}
|
}
|
||||||
|
|
||||||
return server.getHost();
|
return server.getHost();
|
||||||
|
|
Loading…
Reference in New Issue