Interface CollectionCommandContext
-
- All Known Implementing Classes:
DistributedCollectionCommandContext
,OcmhCollectionCommandContext
public interface CollectionCommandContext
Data passed to Collection API command execution, to allow calls from either theOverseerCollectionMessageHandler
when commands are executed on the Overseer, or - in a future change - allow Collection API commands to be executed in a distributed way, unrelated to and not depending upon Overseer abstractions (including overseer collection message handling).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default CollectionHandlingUtils.ShardRequestTracker
asyncRequestTracker(String asyncId)
default String
getAdminPath()
admin path passed to Overseer is a constant, including in tests.org.apache.solr.common.SolrCloseable
getCloseableToLatchOn()
CoreContainer
getCoreContainer()
DistributedClusterStateUpdater
getDistributedClusterStateUpdater()
ExecutorService
getExecutorService()
default String
getOverseerId()
default 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()
default void
offerStateUpdate(byte[] data)
This method enables the commands to enqueue to the overseer cluster state update.default void
offerStateUpdate(org.apache.solr.common.MapWriter data)
default 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.
-
-
-
Method Detail
-
isDistributedCollectionAPI
boolean isDistributedCollectionAPI()
When this method returnstrue
, Overseer specific actions do not make sense and commands should not be doing them.
-
newShardHandler
ShardHandler newShardHandler()
-
getSolrCloudManager
org.apache.solr.client.solrj.cloud.SolrCloudManager getSolrCloudManager()
-
getZkStateReader
org.apache.solr.common.cloud.ZkStateReader getZkStateReader()
-
getDistributedClusterStateUpdater
DistributedClusterStateUpdater getDistributedClusterStateUpdater()
-
getCoreContainer
CoreContainer getCoreContainer()
-
asyncRequestTracker
default CollectionHandlingUtils.ShardRequestTracker asyncRequestTracker(String asyncId)
-
getAdminPath
default String getAdminPath()
admin path passed to Overseer is a constant, including in tests.
-
getCloseableToLatchOn
org.apache.solr.common.SolrCloseable getCloseableToLatchOn()
-
getExecutorService
ExecutorService getExecutorService()
-
offerStateUpdate
default void offerStateUpdate(byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
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)- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
offerStateUpdate
default void offerStateUpdate(org.apache.solr.common.MapWriter data) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
getOverseerId
default String getOverseerId()
-
getOverseerStats
default Stats getOverseerStats()
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.
-
submitIntraProcessMessage
default 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. This method is not used when cluster state updates are distributed.
-
-