Class Suggester
- java.lang.Object
-
- org.apache.solr.client.solrj.cloud.autoscaling.Suggester
-
- All Implemented Interfaces:
MapSerializable
,MapWriter
,NavigableObject
- Direct Known Subclasses:
MoveReplicaSuggester
,NoneSuggester
,UnsupportedSuggester
public abstract class Suggester extends Object implements MapWriter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Suggester.Hint
static class
Suggester.SuggestionInfo
-
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
MapWriter.EntryWriter
-
-
Field Summary
Fields Modifier and Type Field Description protected EnumMap<Suggester.Hint,Object>
hints
protected List<Violation>
originalViolations
-
Constructor Summary
Constructors Constructor Description Suggester()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
findWithCollection(Set<String> collections, Set<Pair<String,String>> s)
Suggester
forceOperation(boolean force)
Normally, only less loaded nodes are used for moving replicas.CollectionParams.CollectionAction
getAction()
Policy.Session
getSession()
SolrRequest
getSuggestion()
protected Optional<String>
getWithCollection(String collectionName)
Suggester
hint(Suggester.Hint hint, Object value)
protected boolean
isAllowed(Object v, Suggester.Hint hint)
protected boolean
isNodeSuitableForReplicaAddition(Row targetRow, Row srcRow)
protected Collection
setupWithCollectionTargetNodes(Set<String> collections, Set<Pair<String,String>> s, String withCollection)
String
toString()
void
writeMap(MapWriter.EntryWriter ew)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.solr.common.NavigableObject
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr
-
-
-
-
Field Detail
-
hints
protected final EnumMap<Suggester.Hint,Object> hints
-
-
Method Detail
-
hint
public Suggester hint(Suggester.Hint hint, Object value)
-
getAction
public CollectionParams.CollectionAction getAction()
-
forceOperation
public Suggester forceOperation(boolean force)
Normally, only less loaded nodes are used for moving replicas. If this is a violation and a MOVE must be performed, set the flag to true.
-
isNodeSuitableForReplicaAddition
protected boolean isNodeSuitableForReplicaAddition(Row targetRow, Row srcRow)
-
getSuggestion
public SolrRequest getSuggestion()
-
getWithCollection
protected Optional<String> getWithCollection(String collectionName) throws IOException
- Throws:
IOException
-
getSession
public Policy.Session getSession()
-
isAllowed
protected boolean isAllowed(Object v, Suggester.Hint hint)
-
writeMap
public void writeMap(MapWriter.EntryWriter ew) throws IOException
- Specified by:
writeMap
in interfaceMapWriter
- Throws:
IOException
-
setupWithCollectionTargetNodes
protected Collection setupWithCollectionTargetNodes(Set<String> collections, Set<Pair<String,String>> s, String withCollection)
-
-