Class DimensionalRoutedAlias
- java.lang.Object
-
- org.apache.solr.cloud.api.collections.RoutedAlias
-
- org.apache.solr.cloud.api.collections.DimensionalRoutedAlias
-
public class DimensionalRoutedAlias extends RoutedAlias
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.cloud.api.collections.RoutedAlias
RoutedAlias.Action
-
-
Field Summary
-
Fields inherited from class org.apache.solr.cloud.api.collections.RoutedAlias
CREATE_COLLECTION_PREFIX, MINIMAL_REQUIRED_PARAMS, ROUTED_ALIAS_NAME_CORE_PROP, ROUTER_FIELD, ROUTER_TYPE_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<RoutedAlias.Action>calculateActions(String targetCol)Determine the combination of adds/deletes implied by the arrival of a document destined for the specified collection.StringcomputeInitialCollectionName()org.apache.solr.cloud.api.collections.RoutedAlias.CandidateCollectionfindCandidateGivenValue(AddUpdateCommand cmd)Map<String,String>getAliasMetadata()StringgetAliasName()The name of the alias.protected StringgetHeadCollectionIfOrdered(AddUpdateCommand cmd)Calculate the head collection (i.e.Set<String>getOptionalParams()Set<String>getRequiredParams()RoutedAliasTypesgetRoutedAliasType()StringgetRouteField()booleanupdateParsedCollectionAliases(ZkStateReader zkStateReader, boolean contextualize)Ensure our parsed version of the alias collection list is up to date.voidvalidateRouteValue(AddUpdateCommand cmd)Check that the value we will be routing on is legal for this type of routed alias.-
Methods inherited from class org.apache.solr.cloud.api.collections.RoutedAlias
createCollectionsIfRequired, fromProps, newAliasMustExistException
-
-
-
-
Method Detail
-
updateParsedCollectionAliases
public boolean updateParsedCollectionAliases(ZkStateReader zkStateReader, boolean contextualize)
Description copied from class:RoutedAliasEnsure our parsed version of the alias collection list is up to date. If it was modified, return true. Note that this will return true if some other alias was modified or if properties were modified. These are spurious and the caller should be written to be tolerant of no material changes.- Specified by:
updateParsedCollectionAliasesin classRoutedAlias
-
computeInitialCollectionName
public String computeInitialCollectionName()
-
getAliasName
public String getAliasName()
Description copied from class:RoutedAliasThe name of the alias. This name is used in place of a collection name for both queries and updates.- Specified by:
getAliasNamein classRoutedAlias- Returns:
- The name of the Alias.
-
getRouteField
public String getRouteField()
-
getRoutedAliasType
public RoutedAliasTypes getRoutedAliasType()
-
validateRouteValue
public void validateRouteValue(AddUpdateCommand cmd) throws SolrException
Description copied from class:RoutedAliasCheck that the value we will be routing on is legal for this type of routed alias.- Specified by:
validateRouteValuein classRoutedAlias- Parameters:
cmd- the command containing the document- Throws:
SolrException
-
getRequiredParams
public Set<String> getRequiredParams()
- Specified by:
getRequiredParamsin classRoutedAlias
-
getOptionalParams
public Set<String> getOptionalParams()
- Specified by:
getOptionalParamsin classRoutedAlias
-
findCandidateGivenValue
public org.apache.solr.cloud.api.collections.RoutedAlias.CandidateCollection findCandidateGivenValue(AddUpdateCommand cmd)
-
getHeadCollectionIfOrdered
protected String getHeadCollectionIfOrdered(AddUpdateCommand cmd)
Description copied from class:RoutedAliasCalculate the head collection (i.e. the most recent one for a TRA) if this routed alias has an implicit order, or if the collection is unordered return the appropriate collection name for the value in the current document. This method should never return null.- Specified by:
getHeadCollectionIfOrderedin classRoutedAlias
-
calculateActions
protected List<RoutedAlias.Action> calculateActions(String targetCol)
Determine the combination of adds/deletes implied by the arrival of a document destined for the specified collection.- Specified by:
calculateActionsin classRoutedAlias- Parameters:
targetCol- the collection for which a document is destined.- Returns:
- A list of actions across the DRA.
-
-