public class IndexSizeTrigger extends TriggerBase
Modifier and Type | Class and Description |
---|---|
static class |
IndexSizeTrigger.IndexSizeEvent |
static class |
IndexSizeTrigger.Unit |
Modifier and Type | Field and Description |
---|---|
static String |
ABOVE_BYTES_PROP |
static String |
ABOVE_DOCS_PROP |
static String |
ABOVE_OP_PROP |
static String |
ABOVE_SIZE_PROP |
static String |
BELOW_BYTES_PROP |
static String |
BELOW_DOCS_PROP |
static String |
BELOW_OP_PROP |
static String |
BELOW_SIZE_PROP |
static String |
BYTES_SIZE_PROP |
static String |
COLLECTIONS_PROP |
static String |
COMMIT_SIZE_PROP |
static int |
DEFAULT_MAX_OPS |
static String |
DOCS_SIZE_PROP |
static String |
MAX_DOC_PROP |
static String |
MAX_OPS_PROP |
static String |
SPLIT_BY_PREFIX |
static String |
SPLIT_FUZZ_PROP |
static String |
SPLIT_METHOD_PROP |
static String |
TOTAL_BYTES_SIZE_PROP |
static String |
VIOLATION_PROP |
actions, cloudManager, enabled, eventType, isClosed, lastState, loader, name, processorRef, properties, requiredProperties, stateManager, validProperties, waitForSecond
Constructor and Description |
---|
IndexSizeTrigger(String name) |
Modifier and Type | Method and Description |
---|---|
void |
configure(SolrResourceLoader loader,
SolrCloudManager cloudManager,
Map<String,Object> properties)
Called when trigger is created but before it's initialized or scheduled for use.
|
static long |
estimatedSize(long maxDoc,
long numDocs,
long commitSize) |
protected Map<String,Object> |
getState()
Prepare and return internal state of this trigger in a format suitable for persisting in ZK.
|
void |
restoreState(AutoScaling.Trigger old)
Set internal state of this trigger from another instance.
|
void |
run() |
protected void |
setState(Map<String,Object> state)
Restore internal state of this trigger from properties retrieved from ZK.
|
close, deepCopyState, equals, getActions, getEventType, getName, getProcessor, getProperties, getWaitForSecond, hashCode, init, isClosed, isEnabled, restoreState, saveState, setProcessor
public static final String ABOVE_BYTES_PROP
public static final String ABOVE_DOCS_PROP
public static final String ABOVE_OP_PROP
public static final String BELOW_BYTES_PROP
public static final String BELOW_DOCS_PROP
public static final String BELOW_OP_PROP
public static final String COLLECTIONS_PROP
public static final String MAX_OPS_PROP
public static final String SPLIT_FUZZ_PROP
public static final String SPLIT_METHOD_PROP
public static final String SPLIT_BY_PREFIX
public static final String BYTES_SIZE_PROP
public static final String TOTAL_BYTES_SIZE_PROP
public static final String DOCS_SIZE_PROP
public static final String MAX_DOC_PROP
public static final String COMMIT_SIZE_PROP
public static final String ABOVE_SIZE_PROP
public static final String BELOW_SIZE_PROP
public static final String VIOLATION_PROP
public static final int DEFAULT_MAX_OPS
public IndexSizeTrigger(String name)
public void configure(SolrResourceLoader loader, SolrCloudManager cloudManager, Map<String,Object> properties) throws TriggerValidationException
AutoScaling.Trigger
configure
in interface AutoScaling.Trigger
configure
in class TriggerBase
properties
- configuration propertiesTriggerValidationException
- contains details of invalid configuration parameters.protected Map<String,Object> getState()
TriggerBase
getState
in class TriggerBase
Utils.toJSON(Object)
.protected void setState(Map<String,Object> state)
TriggerBase
setState
in class TriggerBase
state
- never null but may be empty.public void restoreState(AutoScaling.Trigger old)
AutoScaling.Trigger
public void run()
public static long estimatedSize(long maxDoc, long numDocs, long commitSize)
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.