Class OcmhCollectionCommandContext
- java.lang.Object
-
- org.apache.solr.cloud.api.collections.OcmhCollectionCommandContext
-
- All Implemented Interfaces:
CollectionCommandContext
public class OcmhCollectionCommandContext extends Object implements CollectionCommandContext
Context passed to Collection API commands when they execute in the Overseer.
-
-
Constructor Summary
Constructors Constructor Description OcmhCollectionCommandContext(OverseerCollectionMessageHandler ocmh)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.solr.common.SolrCloseablegetCloseableToLatchOn()CoreContainergetCoreContainer()DistributedClusterStateUpdatergetDistributedClusterStateUpdater()ExecutorServicegetExecutorService()StringgetOverseerId()StatsgetOverseerStats()Command delegating to Overseer to retrieve cluster state update stats from a Collection API call.org.apache.solr.client.solrj.cloud.SolrCloudManagergetSolrCloudManager()org.apache.solr.common.cloud.ZkStateReadergetZkStateReader()booleanisDistributedCollectionAPI()When this method returnstrue, Overseer specific actions do not make sense and commands should not be doing them.ShardHandlernewShardHandler()voidofferStateUpdate(byte[] data)This method enables the commands to enqueue to the overseer cluster state update.voidsubmitIntraProcessMessage(Overseer.Message message)Method used by Per Replica States implementation to force the cluster state updater to immediately reload a collection from Zookeeper.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.cloud.api.collections.CollectionCommandContext
asyncRequestTracker, getAdminPath
-
-
-
-
Constructor Detail
-
OcmhCollectionCommandContext
public OcmhCollectionCommandContext(OverseerCollectionMessageHandler ocmh)
-
-
Method Detail
-
isDistributedCollectionAPI
public boolean isDistributedCollectionAPI()
Description copied from interface:CollectionCommandContextWhen this method returnstrue, Overseer specific actions do not make sense and commands should not be doing them.- Specified by:
isDistributedCollectionAPIin interfaceCollectionCommandContext
-
newShardHandler
public ShardHandler newShardHandler()
- Specified by:
newShardHandlerin interfaceCollectionCommandContext
-
getSolrCloudManager
public org.apache.solr.client.solrj.cloud.SolrCloudManager getSolrCloudManager()
- Specified by:
getSolrCloudManagerin interfaceCollectionCommandContext
-
getCoreContainer
public CoreContainer getCoreContainer()
- Specified by:
getCoreContainerin interfaceCollectionCommandContext
-
getZkStateReader
public org.apache.solr.common.cloud.ZkStateReader getZkStateReader()
- Specified by:
getZkStateReaderin interfaceCollectionCommandContext
-
getDistributedClusterStateUpdater
public DistributedClusterStateUpdater getDistributedClusterStateUpdater()
- Specified by:
getDistributedClusterStateUpdaterin interfaceCollectionCommandContext
-
offerStateUpdate
public void offerStateUpdate(byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedExceptionDescription copied from interface:CollectionCommandContextThis method enables the commands to enqueue to the overseer cluster state update. This should only be used when the cluster state update is running in the Overseer (and will throw an exception if called when Collection API is distributed given that distributed Collection API implies distributed Cluster State Update)- Specified by:
offerStateUpdatein interfaceCollectionCommandContext- Throws:
org.apache.zookeeper.KeeperExceptionInterruptedException
-
getCloseableToLatchOn
public org.apache.solr.common.SolrCloseable getCloseableToLatchOn()
- Specified by:
getCloseableToLatchOnin interfaceCollectionCommandContext
-
getExecutorService
public ExecutorService getExecutorService()
- Specified by:
getExecutorServicein interfaceCollectionCommandContext
-
getOverseerId
public String getOverseerId()
- Specified by:
getOverseerIdin interfaceCollectionCommandContext
-
getOverseerStats
public Stats getOverseerStats()
Description copied from interface:CollectionCommandContextCommand delegating to Overseer to retrieve cluster state update stats from a Collection API call. This does not make sense when cluster state updates are distributed given Overseer does not see them and can't collect stats.- Specified by:
getOverseerStatsin interfaceCollectionCommandContext
-
submitIntraProcessMessage
public void submitIntraProcessMessage(Overseer.Message message)
Description copied from interface:CollectionCommandContextMethod used by Per Replica States implementation to force the cluster state updater to immediately reload a collection from Zookeeper. This method is not used when cluster state updates are distributed.- Specified by:
submitIntraProcessMessagein interfaceCollectionCommandContext
-
-