Class OverseerStatusCmd
- java.lang.Object
-
- org.apache.solr.cloud.api.collections.OverseerStatusCmd
-
- All Implemented Interfaces:
CollApiCmds.CollectionApiCommand
public class OverseerStatusCmd extends Object implements CollApiCmds.CollectionApiCommand
This command returns stats about the Overseer, the cluster state updater and collection API activity occurring within the current Overseer node (this is important because distributed operations occurring on other nodes are not included in these stats, for example distributed cluster state updates or Per Replica States updates).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 byCollectionCommandContext.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
:ID
of the current overseer leader nodeoverseer_queue_size
: count of entries in the/overseer/queue
Zookeeper queue/directoryoverseer_work_queue_size
: count of entries in the/overseer/queue-work
Zookeeper queue/directoryoverseer_collection_queue_size
: count of entries in the/overseer/collection-queue-work
Zookeeper 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
,downnode
andquit
with 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_leader
representing 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 keyrequest
with a failed request properties (aZkNodeProps
) and the other with keyresponse
with 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:offer
peek
peek_wait
peek_wait_forever
peekTopN_wait
peekTopN_wait_forever
poll
remove
remove_event
take
overseer_internal_queue
: same as above but for queue/overseer/queue-work
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
,overseer_internal_queue
andcollection_queue
include additional stats. These stats are provided byMetricUtils
, and represent metrics on each type of operation execution (be it failed or successful), see calls toStats.time(String)
. The metric keys are:avgRequestsPerSecond
5minRateRequestsPerSecond
15minRateRequestsPerSecond
avgTimePerRequest
medianRequestTime
75thPcRequestTime
95thPcRequestTime
99thPcRequestTime
999thPcRequestTime
-
-
Constructor Summary
Constructors Constructor Description OverseerStatusCmd(CollectionCommandContext ccc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
call(org.apache.solr.common.cloud.ClusterState state, org.apache.solr.common.cloud.ZkNodeProps message, org.apache.solr.common.util.NamedList<Object> results)
-
-
-
Constructor Detail
-
OverseerStatusCmd
public OverseerStatusCmd(CollectionCommandContext ccc)
-
-
Method Detail
-
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:
call
in interfaceCollApiCmds.CollectionApiCommand
- Throws:
Exception
-
-