public class ZookeeperStatusHandler extends RequestHandlerBase
SolrInfoBean.Category, SolrInfoBean.Group
appends, defaults, httpCaching, initArgs, invariants, solrMetricsContext
TYPE
Constructor and Description |
---|
ZookeeperStatusHandler(CoreContainer cc) |
Modifier and Type | Method and Description |
---|---|
SolrInfoBean.Category |
getCategory()
Category of this component
|
String |
getDescription()
Simple one or two line description
|
protected List<String> |
getZkRawResponse(String zkHostPort,
String fourLetterWordCommand)
Sends a four-letter-word command to one particular Zookeeper server and returns the response as list of strings
|
protected Map<String,Object> |
getZkStatus(String zkHost,
ZkDynamicConfig zkDynamicConfig)
For each zk host, resolved either from zk connection string or from zk dynamic reconfiguration config,
fetch all config and status info from ZK API and returns as a map, where key is hostname
|
void |
handleRequestBody(SolrQueryRequest req,
SolrQueryResponse rsp) |
protected Map<String,Object> |
monitorZookeeper(String zkHostPort) |
protected boolean |
validateZkRawResponse(List<String> response,
String zkHostPort,
String fourLetterWordCommand)
Takes the raw response lines returned by
getZkRawResponse(String, String) and runs some validations |
getApis, getInitArgs, getMetricNames, getName, getPluginInfo, getRequestHandler, getSolrMetricsContext, getSolrParamsFromNamedList, getSubHandler, handleRequest, init, initializeMetrics, setPluginInfo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetricRegistry, getMetricsSnapshot, registerMetricName
close, getUniqueMetricTag, initializeMetrics
registerV1, registerV2
public ZookeeperStatusHandler(CoreContainer cc)
public String getDescription()
SolrInfoBean
getDescription
in interface SolrInfoBean
getDescription
in class RequestHandlerBase
public SolrInfoBean.Category getCategory()
SolrInfoBean
getCategory
in interface SolrInfoBean
getCategory
in class RequestHandlerBase
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception
handleRequestBody
in class RequestHandlerBase
Exception
protected Map<String,Object> getZkStatus(String zkHost, ZkDynamicConfig zkDynamicConfig)
zkHost
- zookeeper connection stringzkDynamicConfig
- list of zk dynamic config objectsprotected Map<String,Object> monitorZookeeper(String zkHostPort) throws SolrException
SolrException
protected List<String> getZkRawResponse(String zkHostPort, String fourLetterWordCommand)
zkHostPort
- the host:port for one zookeeper server to accessfourLetterWordCommand
- the custom 4-letter command to send to Zookeeperprotected boolean validateZkRawResponse(List<String> response, String zkHostPort, String fourLetterWordCommand)
getZkRawResponse(String, String)
and runs some validationsresponse
- the lineszkHostPort
- the hostfourLetterWordCommand
- the 4lw commandSolrException
- if validation failsCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.