mirror of https://github.com/apache/lucene.git
implement MapWriter
This commit is contained in:
parent
7a375fda82
commit
74128cf695
|
@ -17,13 +17,16 @@
|
|||
|
||||
package org.apache.solr.client.solrj.cloud.autoscaling;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.solr.client.solrj.SolrRequest;
|
||||
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
|
||||
import org.apache.solr.common.MapWriter;
|
||||
import org.apache.solr.common.cloud.Replica;
|
||||
import org.apache.solr.common.params.CollectionParams;
|
||||
import org.apache.solr.common.util.Pair;
|
||||
|
||||
class AddReplicaSuggester extends Suggester {
|
||||
|
@ -72,4 +75,10 @@ class AddReplicaSuggester extends Suggester {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeMap(MapWriter.EntryWriter ew) throws IOException {
|
||||
ew.put("action", CollectionParams.CollectionAction.ADDREPLICA.toString());
|
||||
super.writeMap(ew);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,10 +17,12 @@
|
|||
|
||||
package org.apache.solr.client.solrj.cloud.autoscaling;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.solr.client.solrj.SolrRequest;
|
||||
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
|
||||
import org.apache.solr.common.params.CollectionParams;
|
||||
import org.apache.solr.common.util.Pair;
|
||||
|
||||
public class MoveReplicaSuggester extends Suggester {
|
||||
|
@ -79,4 +81,10 @@ public class MoveReplicaSuggester extends Suggester {
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeMap(EntryWriter ew) throws IOException {
|
||||
ew.put("action", CollectionParams.CollectionAction.MOVEREPLICA.toString());
|
||||
super.writeMap(ew);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue