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.SolrCloseable
getCloseableToLatchOn()
CoreContainer
getCoreContainer()
DistributedClusterStateUpdater
getDistributedClusterStateUpdater()
ExecutorService
getExecutorService()
String
getOverseerId()
Stats
getOverseerStats()
Command delegating to Overseer to retrieve cluster state update stats from a Collection API call.org.apache.solr.client.solrj.cloud.SolrCloudManager
getSolrCloudManager()
org.apache.solr.common.cloud.ZkStateReader
getZkStateReader()
boolean
isDistributedCollectionAPI()
When this method returnstrue
, Overseer specific actions do not make sense and commands should not be doing them.ShardHandler
newShardHandler()
void
offerStateUpdate(byte[] data)
This method enables the commands to enqueue to the overseer cluster state update.void
offerStateUpdate(org.apache.solr.common.MapWriter mw)
void
submitIntraProcessMessage(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:CollectionCommandContext
When this method returnstrue
, Overseer specific actions do not make sense and commands should not be doing them.- Specified by:
isDistributedCollectionAPI
in interfaceCollectionCommandContext
-
newShardHandler
public ShardHandler newShardHandler()
- Specified by:
newShardHandler
in interfaceCollectionCommandContext
-
getSolrCloudManager
public org.apache.solr.client.solrj.cloud.SolrCloudManager getSolrCloudManager()
- Specified by:
getSolrCloudManager
in interfaceCollectionCommandContext
-
getCoreContainer
public CoreContainer getCoreContainer()
- Specified by:
getCoreContainer
in interfaceCollectionCommandContext
-
getZkStateReader
public org.apache.solr.common.cloud.ZkStateReader getZkStateReader()
- Specified by:
getZkStateReader
in interfaceCollectionCommandContext
-
getDistributedClusterStateUpdater
public DistributedClusterStateUpdater getDistributedClusterStateUpdater()
- Specified by:
getDistributedClusterStateUpdater
in interfaceCollectionCommandContext
-
offerStateUpdate
public void offerStateUpdate(byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
Description copied from interface:CollectionCommandContext
This 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:
offerStateUpdate
in interfaceCollectionCommandContext
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
offerStateUpdate
public void offerStateUpdate(org.apache.solr.common.MapWriter mw) throws org.apache.zookeeper.KeeperException, InterruptedException
- Specified by:
offerStateUpdate
in interfaceCollectionCommandContext
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
getCloseableToLatchOn
public org.apache.solr.common.SolrCloseable getCloseableToLatchOn()
- Specified by:
getCloseableToLatchOn
in interfaceCollectionCommandContext
-
getExecutorService
public ExecutorService getExecutorService()
- Specified by:
getExecutorService
in interfaceCollectionCommandContext
-
getOverseerId
public String getOverseerId()
- Specified by:
getOverseerId
in interfaceCollectionCommandContext
-
getOverseerStats
public Stats getOverseerStats()
Description copied from interface:CollectionCommandContext
Command 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:
getOverseerStats
in interfaceCollectionCommandContext
-
submitIntraProcessMessage
public void submitIntraProcessMessage(Overseer.Message message)
Description copied from interface:CollectionCommandContext
Method 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:
submitIntraProcessMessage
in interfaceCollectionCommandContext
-
-