[
https://issues.apache.org/jira/browse/SOLR-10340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shalin Shekhar Mangar updated SOLR-10340:
-----------------------------------------
Attachment: SOLR-10340.patch
Supports stage, beforeAction, afterAction as both single string (for single
item) and array of strings for ease of use.
I'll commit this to the features/autoscaling branch.
> Implement set-listener and remove-listener API
> ----------------------------------------------
>
> Key: SOLR-10340
> URL: https://issues.apache.org/jira/browse/SOLR-10340
> Project: Solr
> Issue Type: Sub-task
> Security Level: Public(Default Security Level. Issues are Public)
> Components: SolrCloud
> Reporter: Shalin Shekhar Mangar
> Assignee: Shalin Shekhar Mangar
> Labels: autoscaling
> Fix For: master (7.0)
>
> Attachments: SOLR-10340.patch, SOLR-10340.patch
>
>
> Implement set-listener and remove-listener API to listen to various lifecycle
> stages of a trigger.
> The set-listeners API can be invoked to add a listener to any trigger at any
> stage of its execution. The parameters are :
> * ‘name’ - a unique string identifying the listener so that it can be read,
> updated and removed
> * ‘trigger’ - the name of the trigger to listen to
> * ‘stage’ - the stage of the trigger (multiple values can be specified as an
> array of strings), possible values are:
> ** STARTED,
> ** ABORTED,
> ** FAILED,
> ** SUCCEEDED
> * ‘beforeAction’ - the action name before which the listener should be
> notified. Multiple values can be specified as an array of strings.
> * ‘afterAction’ - the action name after which the listener should be
> notified. Multiple values can be specified as an array of strings
> * ‘class’ - an implementation of ‘TriggerListener’ class
> * Other parameters depend on the listener class
> An example invocation of this API is:
> {code}
> curl -H 'Content-type:application/json' -d '{
> “set-listener” :
> {
> “name” : “xyz”,
> “trigger” : “node_lost_trigger”,
> “stage” : [“STARTED”,”ABORTED”,”SUCCEEDED”],
> “beforeAction” : “execute_plan”,
> “class” : “solr.HttpCallback”,
> “url” :
> “http://xyz.com/on_node_lost?node={$LOST_NODE_NAME}”
> }' http://localhost:8983/solr/admin/cluster
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]