Class AutoScalingHandler
- java.lang.Object
-
- org.apache.solr.handler.RequestHandlerBase
-
- org.apache.solr.cloud.autoscaling.AutoScalingHandler
-
- All Implemented Interfaces:
AutoCloseable
,ApiSupport
,SolrInfoBean
,NestedRequestHandler
,SolrMetricProducer
,SolrRequestHandler
,PermissionNameProvider
public class AutoScalingHandler extends RequestHandlerBase implements PermissionNameProvider
Handler for /cluster/autoscaling
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.security.PermissionNameProvider
PermissionNameProvider.Name
-
Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoBean
SolrInfoBean.Category, SolrInfoBean.Group
-
-
Field Summary
Fields Modifier and Type Field Description protected SolrCloudManager
cloudManager
static String
HANDLER_PATH
protected SolrResourceLoader
loader
protected AutoScaling.TriggerFactory
triggerFactory
-
Fields inherited from class org.apache.solr.handler.RequestHandlerBase
appends, defaults, httpCaching, initArgs, invariants, solrMetricsContext
-
Fields inherited from interface org.apache.solr.security.PermissionNameProvider
ANY, NULL, values
-
Fields inherited from interface org.apache.solr.request.SolrRequestHandler
TYPE
-
-
Constructor Summary
Constructors Constructor Description AutoScalingHandler(SolrCloudManager cloudManager, SolrResourceLoader loader)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Api>
getApis()
It is possible to support multiple v2 apis by a single requesthandlerString
getDescription()
Simple one or two line descriptionPermissionNameProvider.Name
getPermissionName(AuthorizationContext request)
SolrRequestHandler
getSubHandler(String path)
Return a RequestHandler to handle a subpath from the path this handler is registered.void
handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp)
void
processOps(SolrQueryRequest req, SolrQueryResponse rsp, List<CommandOperation> ops)
Boolean
registerV2()
Whether this request handler must be made available at the /v2/ pathstatic AutoScalingConfig
withSystemLogListener(AutoScalingConfig autoScalingConfig, String triggerName)
-
Methods inherited from class org.apache.solr.handler.RequestHandlerBase
getCategory, getInitArgs, getMetricNames, getName, getPluginInfo, getRequestHandler, getSolrMetricsContext, getSolrParamsFromNamedList, handleRequest, init, initializeMetrics, setPluginInfo
-
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.api.ApiSupport
registerV1
-
Methods inherited from interface org.apache.solr.core.SolrInfoBean
getMetricRegistry, getMetricsSnapshot, registerMetricName
-
Methods inherited from interface org.apache.solr.metrics.SolrMetricProducer
close, initializeMetrics
-
-
-
-
Field Detail
-
HANDLER_PATH
public static final String HANDLER_PATH
- See Also:
- Constant Field Values
-
cloudManager
protected final SolrCloudManager cloudManager
-
loader
protected final SolrResourceLoader loader
-
triggerFactory
protected final AutoScaling.TriggerFactory triggerFactory
-
-
Constructor Detail
-
AutoScalingHandler
public AutoScalingHandler(SolrCloudManager cloudManager, SolrResourceLoader loader)
-
-
Method Detail
-
handleRequestBody
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception
- Specified by:
handleRequestBody
in classRequestHandlerBase
- Throws:
Exception
-
processOps
public void processOps(SolrQueryRequest req, SolrQueryResponse rsp, List<CommandOperation> ops) throws org.apache.zookeeper.KeeperException, InterruptedException, IOException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
IOException
-
withSystemLogListener
public static AutoScalingConfig withSystemLogListener(AutoScalingConfig autoScalingConfig, String triggerName)
-
getDescription
public String getDescription()
Description copied from interface:SolrInfoBean
Simple one or two line description- Specified by:
getDescription
in interfaceSolrInfoBean
- Specified by:
getDescription
in classRequestHandlerBase
-
getPermissionName
public PermissionNameProvider.Name getPermissionName(AuthorizationContext request)
- Specified by:
getPermissionName
in interfacePermissionNameProvider
-
getApis
public Collection<Api> getApis()
Description copied from interface:ApiSupport
It is possible to support multiple v2 apis by a single requesthandler- Specified by:
getApis
in interfaceApiSupport
- Overrides:
getApis
in classRequestHandlerBase
- Returns:
- the list of v2 api implementations
-
registerV2
public Boolean registerV2()
Description copied from interface:ApiSupport
Whether this request handler must be made available at the /v2/ path- Specified by:
registerV2
in interfaceApiSupport
-
getSubHandler
public SolrRequestHandler getSubHandler(String path)
Description copied from interface:NestedRequestHandler
Return a RequestHandler to handle a subpath from the path this handler is registered.- Specified by:
getSubHandler
in interfaceNestedRequestHandler
- Overrides:
getSubHandler
in classRequestHandlerBase
-
-