Class OverseerTriggerThread
- java.lang.Object
-
- org.apache.solr.cloud.autoscaling.OverseerTriggerThread
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Runnable
,SolrCloseable
public class OverseerTriggerThread extends Object implements Runnable, SolrCloseable
Overseer thread responsible for reading triggers from zookeeper and adding/removing them fromScheduledTriggers
-
-
Field Summary
Fields Modifier and Type Field Description static String
MARKER_ACTIVE
static String
MARKER_INACTIVE
static String
MARKER_STATE
-
Constructor Summary
Constructors Constructor Description OverseerTriggerThread(SolrResourceLoader loader, SolrCloudManager cloudManager, CloudConfig cloudConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
getProcessedZnodeVersion()
For tests, to ensure that all processing has been completed in response to an update of /autoscaling.json.ScheduledTriggers
getScheduledTriggers()
For tests.boolean
isClosed()
void
run()
-
-
-
Field Detail
-
MARKER_STATE
public static final String MARKER_STATE
- See Also:
- Constant Field Values
-
MARKER_ACTIVE
public static final String MARKER_ACTIVE
- See Also:
- Constant Field Values
-
MARKER_INACTIVE
public static final String MARKER_INACTIVE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OverseerTriggerThread
public OverseerTriggerThread(SolrResourceLoader loader, SolrCloudManager cloudManager, CloudConfig cloudConfig)
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getScheduledTriggers
public ScheduledTriggers getScheduledTriggers()
For tests.- Returns:
- current
ScheduledTriggers
instance - NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
getProcessedZnodeVersion
public int getProcessedZnodeVersion()
For tests, to ensure that all processing has been completed in response to an update of /autoscaling.json.- Returns:
- version of /autoscaling.json for which all configuration updates & processing have been completed. Until then this value will always be smaller than the current znodeVersion of /autoscaling.json.
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfaceSolrCloseable
-
-