Class OverseerStatusCmd
- All Implemented Interfaces:
CollApiCmds.CollectionApiCommand
More fundamentally, when the Collection API command execution is distributed, this specific command is not being run on the Overseer anyway (but then not much is running on the overseer as cluster state updates are distributed as well) so Overseer stats and status can't be returned and actually do not even make sense. Zookeeper based queue metrics do not make sense either because Zookeeper queues are then not used.
The Stats instance returned by CollectionCommandContext.getOverseerStats()
when running in the Overseer is created in Overseer.start() and passed to the cluster state
updater from where it is also propagated to the various Zookeeper queues to register various
events. This class is the only place where it is used in the Collection API implementation, and
only to return results.
TODO: create a new command returning node specific Collection API/Config set API/cluster state updates stats such as success and failures?
The structure of the returned results is as follows:
leader:IDof the current overseer leader nodeoverseer_queue_size: count of entries in the/overseer/queueZookeeper queue/directoryoverseer_collection_queue_size: count of entries in the/overseer/collection-queue-workZookeeper queue/directoryoverseer_operations: map (of maps) of success and error counts for operations. The operations (keys) tracked in this map are:am_i_leader(Overseer checking it is still the elected Overseer as it processes cluster state update messages)configset_<config set operation>- Cluster state change operation names from
CollectionParams.CollectionAction(not all of them!) andOverseerAction(the complete list:create,delete,createshard,deleteshard,addreplica,addreplicaprop,deletereplicaprop,balanceshardunique,modifycollection,state,leader,deletecore,addroutingrule,removeroutingrule,updateshardstate,downnodeandquitwith this last one unlikely to be observed since the Overseer is exiting right away) update_state(when Overseer cluster state updater persists changes in Zookeeper)
requests: success count of the given operationerrors: error count of the operation- More metrics (see below)
collection_operations: map (of maps) of success and error counts for collection related operations. The operations(keys) tracked in this map are all operations that start withcollection_, but thecollection_prefix is stripped of the returned value. Possible keys are therefore:am_i_leader: originating in a stat calledcollection_am_i_leaderrepresenting Overseer checking it is still the elected Overseer as it processes Collection API and Config Set API messages.- Collection API operation names from
CollectionParams.CollectionAction(the strippedcollection_prefix gets added inOverseerCollectionMessageHandler.getTimerName(String))
requests: success count of the given operationerrors: error count of the operationrecent_failures: an optional entry containing a list of maps, each map having two entries, one with keyrequestwith a failed request properties (aZkNodeProps) and the other with keyresponsewith the corresponding response properties (aSolrResponse).- More metrics (see below)
overseer_queue: metrics on operations done on the Zookeeper queue/overseer/queue(see metrics below).
The operations that can be done on the queue and that can be keys whose values are a metrics map are:offerpeekpeek_waitpeek_wait_foreverpeekTopN_waitpeekTopN_wait_foreverpollremoveremove_eventtake
collection_queue: same as above but for queue/overseer/collection-queue-work
Maps returned as values of keys in overseer_operations,
collection_operations, overseer_queue and collection_queue
include additional stats. These stats are provided by MetricUtils, and represent metrics
on each type of operation execution (be it failed or successful), see calls to Stats.time(String). The metric keys are:
avgRequestsPerSecond5minRateRequestsPerSecond15minRateRequestsPerSecondavgTimePerRequestmedianRequestTime75thPcRequestTime95thPcRequestTime99thPcRequestTime999thPcRequestTime
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
OverseerStatusCmd
-
-
Method Details
-
call
public void call(org.apache.solr.common.cloud.ClusterState state, org.apache.solr.common.cloud.ZkNodeProps message, org.apache.solr.common.util.NamedList<Object> results) throws Exception - Specified by:
callin interfaceCollApiCmds.CollectionApiCommand- Throws:
Exception
-