[ 
https://issues.apache.org/jira/browse/SOLR-10374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15984571#comment-15984571
 ] 

Cao Manh Dat edited comment on SOLR-10374 at 4/26/17 10:53 AM:
---------------------------------------------------------------

"set-preferences" api violate the description in {{CommandOperation}}
bq. The JSON must be an Object of the form {"command": {...},...
After a discussion with [~noble.paul] about a way to fix this problem. We 
propose a change of "set-prefrences" api 
{code}
curl -H 'Content-type:application/json' -d '{
 "set-preferences": {
     "value" : [
        {"minimize": "replicas", "precision": 3},
        {"maximize": "freedisk","precision": 100},
        {"minimize": "cpu","precision": 10}
     ]
  }
}' http://localhost:8983/solr/admin/autoscaling
{code}


was (Author: caomanhdat):
"set-preferences" api violate the description in {{CommandOperation}}
bq. The JSON must be an Object of the form {"command": {...},...
After a discussion with [~noble.paul] about the way to fix this problem. We 
proposed the change of "set-prefrences" api into 
{code}
curl -H 'Content-type:application/json' -d '{
 "set-preferences": {
     "value" : [
        {"minimize": "replicas", "precision": 3},
        {"maximize": "freedisk","precision": 100},
        {"minimize": "cpu","precision": 10}
     ]
  }
}' http://localhost:8983/solr/admin/autoscaling
{code}

> Implement set-policy and remove-policy APIs
> -------------------------------------------
>
>                 Key: SOLR-10374
>                 URL: https://issues.apache.org/jira/browse/SOLR-10374
>             Project: Solr
>          Issue Type: Sub-task
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud
>            Reporter: Shalin Shekhar Mangar
>            Assignee: Cao Manh Dat
>              Labels: autoscaling
>             Fix For: master (7.0)
>
>         Attachments: SOLR-10374.new.patch, SOLR-10374.patch, 
> SOLR-10374.patch, SOLR-10374.patch
>
>
> Add {{set-policy}} and {{remove-policy}} APIs for adding, updating and 
> deleting autoscaling policies from Zookeeper.
> {code}
> curl -H 'Content-type:application/json' -d '{
>  "set-preferences":[
>         {"minimize": "replicas", "precision": 3},
>         {"maximize": "freedisk","precision": 100},
>         {"minimize": "cpu","precision": 10}]
>   }
>   "set-policy": {
>     "default":[
>       {"cores":"<10", "node":"#ANY"},
>       {"replica":"<2", "shard": "#EACH", "node": "#ANY"},
>       {"nodeRole":"!overseer", "replica":"#ANY"}
>     ],
>     "policy1":[
>       {"cores":"<10", "node":"#ANY"}    
>     ] 
> }' http://localhost:8983/solr/admin/autoscaling
> {code}
> {code}
> curl -H 'Content-type:application/json' -d '{
>   "remove-policy": "policy1"
> }' http://localhost:8983/solr/admin/autoscaling
> {code}
> This issue is only for the CRUD APIs. The actual implementation of these 
> policies will be done in a separate issue.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to