SOLR-3472: ping request handler should force distrib=false default

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1340869 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-05-20 23:10:02 +00:00
parent ff037852fc
commit a29a6c6f29
1 changed files with 10 additions and 1 deletions

View File

@ -25,6 +25,7 @@ import java.util.Locale;
import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException;
import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.NamedList;
import org.apache.solr.core.SolrCore; import org.apache.solr.core.SolrCore;
@ -173,7 +174,15 @@ public class PingRequestHandler extends RequestHandlerBase implements SolrCoreAw
{ {
SolrParams params = req.getParams(); SolrParams params = req.getParams();
SolrCore core = req.getCore();
// in this case, we want to default distrib to false so
// we only ping the single node
Boolean distrib = params.getBool("distrib");
if (distrib == null) {
ModifiableSolrParams mparams = new ModifiableSolrParams(params);
mparams.set("distrib", false);
req.setParams(mparams);
}
String actionParam = params.get("action"); String actionParam = params.get("action");
ACTIONS action = null; ACTIONS action = null;