public class TimeRoutedAlias extends RoutedAlias
RoutedAlias.Action| Modifier and Type | Field and Description |
|---|---|
static Set<String> |
OPTIONAL_ROUTER_PARAMS
Optional parameters for creating a routed alias excluding parameters for collection creation.
|
static Set<String> |
REQUIRED_ROUTER_PARAMS
Parameters required for creating a routed alias
|
static String |
ROUTER_AUTO_DELETE_AGE |
static String |
ROUTER_INTERVAL |
static String |
ROUTER_MAX_FUTURE |
static String |
ROUTER_PREEMPTIVE_CREATE_MATH |
static String |
ROUTER_START |
static RoutedAliasTypes |
TYPE |
CREATE_COLLECTION_PREFIX, MINIMAL_REQUIRED_PARAMS, ROUTED_ALIAS_NAME_CORE_PROP, ROUTER_FIELD, ROUTER_TYPE_NAME| Modifier and Type | Method and 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.
|
String |
computeInitialCollectionName()
Create the initial collection for this RoutedAlias if applicable.
|
org.apache.solr.cloud.api.collections.RoutedAlias.CandidateCollection |
findCandidateGivenValue(AddUpdateCommand cmd)
Given the route key, finds the correct collection and an indication of any collection that needs to be created.
|
static String |
formatCollectionNameFromInstant(String aliasName,
Instant timestamp) |
Map<String,String> |
getAliasMetadata() |
String |
getAliasName()
The name of the alias.
|
String |
getAutoDeleteAgeMath() |
protected String |
getHeadCollectionIfOrdered(AddUpdateCommand cmd)
Calculate the head collection (i.e.
|
String |
getIntervalMath() |
long |
getMaxFutureMs() |
Set<String> |
getOptionalParams() |
String |
getPreemptiveCreateWindow() |
Set<String> |
getRequiredParams() |
RoutedAliasTypes |
getRoutedAliasType() |
String |
getRouteField() |
TimeZone |
getTimeZone() |
static Instant |
parseInstantFromCollectionName(String aliasName,
String collection) |
String |
toString() |
boolean |
updateParsedCollectionAliases(ZkStateReader zkStateReader,
boolean contextualize)
Ensure our parsed version of the alias collection list is up to date.
|
void |
validateRouteValue(AddUpdateCommand cmd)
Check that the value we will be routing on is legal for this type of routed alias.
|
createCollectionsIfRequired, fromProps, newAliasMustExistExceptionpublic static final RoutedAliasTypes TYPE
public static final String ROUTER_START
public static final String ROUTER_INTERVAL
public static final String ROUTER_MAX_FUTURE
public static final String ROUTER_AUTO_DELETE_AGE
public static final String ROUTER_PREEMPTIVE_CREATE_MATH
public static final Set<String> REQUIRED_ROUTER_PARAMS
public String computeInitialCollectionName()
RoutedAliasRouted Aliases do not aggregate existing collections, instead they create collections on the fly. If the initial collection can be determined from initialization parameters it should be calculated here.
public static Instant parseInstantFromCollectionName(String aliasName, String collection)
public static String formatCollectionNameFromInstant(String aliasName, Instant timestamp)
public boolean updateParsedCollectionAliases(ZkStateReader zkStateReader, boolean contextualize)
RoutedAliasupdateParsedCollectionAliases in class RoutedAliaspublic String getAliasName()
RoutedAliasgetAliasName in class RoutedAliaspublic String getRouteField()
public RoutedAliasTypes getRoutedAliasType()
public String getIntervalMath()
public long getMaxFutureMs()
public String getPreemptiveCreateWindow()
public String getAutoDeleteAgeMath()
public TimeZone getTimeZone()
public void validateRouteValue(AddUpdateCommand cmd) throws SolrException
RoutedAliasvalidateRouteValue in class RoutedAliascmd - the command containing the documentSolrExceptionpublic Set<String> getRequiredParams()
getRequiredParams in class RoutedAliaspublic Set<String> getOptionalParams()
getOptionalParams in class RoutedAliasprotected String getHeadCollectionIfOrdered(AddUpdateCommand cmd)
RoutedAliasgetHeadCollectionIfOrdered in class RoutedAliaspublic org.apache.solr.cloud.api.collections.RoutedAlias.CandidateCollection findCandidateGivenValue(AddUpdateCommand cmd)
SolrException - if the doc is too old to be stored in the TRAprotected List<RoutedAlias.Action> calculateActions(String targetCol)
RoutedAliascalculateActions in class RoutedAliastargetCol - the collection for which a document is destined.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.