SOLR-4590: Collections API should return a nice error when not in SolrCloud mode.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1526614 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-09-26 17:32:01 +00:00
parent bcff47fc09
commit 2cdfc5cd97
2 changed files with 11 additions and 0 deletions

View File

@ -77,6 +77,11 @@ New Features
* SOLR-5274: Allow JettySolrRunner SSL config to be specified via a constructor.
(Mark Miller)
Bug Fixes
----------------------
* SOLR-4590: Collections API should return a nice error when not in SolrCloud mode.
(Anshum Gupta, Mark Miller)
Security
----------------------

View File

@ -111,6 +111,12 @@ public class CollectionsHandler extends RequestHandlerBase {
"Core container instance missing");
}
// Make sure that the core is ZKAware
if(!cores.isZooKeeperAware()) {
throw new SolrException(ErrorCode.BAD_REQUEST,
"Solr instance is not running in SolrCloud mode.");
}
// Pick the action
SolrParams params = req.getParams();
CollectionAction action = null;