SOLR-6860: Re-enable REBALANCELEADERS for 5.1. going to let this bake in trunk only until 5.0 is cut

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1647849 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erick Erickson 2014-12-24 21:55:05 +00:00
parent bc8a596303
commit 0c6151e4bc
3 changed files with 11 additions and 17 deletions

View File

@ -658,9 +658,9 @@ public class OverseerCollectionProcessor implements Runnable, Closeable {
case BALANCESHARDUNIQUE: case BALANCESHARDUNIQUE:
balanceProperty(message); balanceProperty(message);
break; break;
// case REBALANCELEADERS: case REBALANCELEADERS:
// processAssignLeaders(message); processAssignLeaders(message);
// break; break;
default: default:
throw new SolrException(ErrorCode.BAD_REQUEST, "Unknown operation:" throw new SolrException(ErrorCode.BAD_REQUEST, "Unknown operation:"
+ operation); + operation);

View File

@ -268,10 +268,10 @@ public class CollectionsHandler extends RequestHandlerBase {
this.handleBalanceShardUnique(req, rsp); this.handleBalanceShardUnique(req, rsp);
break; break;
} }
// case REBALANCELEADERS: { case REBALANCELEADERS: {
// this.handleBalanceLeaders(req, rsp); this.handleBalanceLeaders(req, rsp);
// break; break;
// } }
default: { default: {
throw new RuntimeException("Unknown action: " + action); throw new RuntimeException("Unknown action: " + action);
} }

View File

@ -193,17 +193,11 @@ public class TestReplicaProperties extends ReplicaPropertiesBase {
// leaders _also_ have the preferredLeader property set. // leaders _also_ have the preferredLeader property set.
try { NamedList<Object> res = doPropertyAction(client,
NamedList<Object> res = doPropertyAction(client, "action", CollectionParams.CollectionAction.REBALANCELEADERS.toString(),
"action", CollectionParams.CollectionAction.REBALANCELEADERS.toString(), "collection", COLLECTION_NAME);
"collection", COLLECTION_NAME);
fail("Should have thrown 'Unknown action' error");
} catch (SolrServerException e) {
assertTrue("Should have gotten an error message that REBALANCELEADERS is not supported",
e.getCause().getMessage().contains("Unknown action: REBALANCELEADERS"));
}
// verifyLeaderAssignment(client, COLLECTION_NAME); verifyLeaderAssignment(client, COLLECTION_NAME);
} finally { } finally {
client.shutdown(); client.shutdown();