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

Noble Paul edited comment on SOLR-13329 at 5/30/19 5:56 AM:
------------------------------------------------------------

h4. A a new {{nodeset}} attribute
{code:java}
 //eg: 1
//Keep exactly one replica in a set of nodes 'node-1', 'node-2'
{"replica" : 1 , "shard" : "#EACH" , "nodeset" : ["node-1","node-2"]}

//Keep exactly one replica in a set of nodes with system-property "prop-name"== 
"prop-val"
{"replica" : 1 , "shard" : "#EACH" , "nodeset" : {"sysprop.prop-name" : 
"prop-val"}}


Keep exactly one replica in a set of nodes on port '8901','8902'
{"replica" : 1 , "shard" : "#EACH" , "nodeset" : {"port" : [8901,8902] } }
{code}
this could be usable with any of the other properties as well such as 
{{nodeRole}}, {{freedisk}} , {{diskType}}
h4. Support ratios.

The value of replica can be an array . When it's an array,
 * The sum of the numbers must be {{100}}
 * the attribute {{nodeset}} must be present
 * the value of {{nodeset}} must be an array
 * no:of elements in the {{replica}} array must be same as the no:of elements 
in the {{nodeset}} array.
{code:java}
[{
    //for each shard keep 30% on port 8983 and 70% on port 7574
    "shard": "#EACH",
    "replica": [30,70],
    "nodeset": [
      {"port": 8983},
      {"port": 7574}]
  },
  {
   //for each collection, keep 40% on zone 'east', 40% on zone 'west' & 20% on 
zone= 'apac'
    "replica": [40,40,20],
    "nodeset": [
      {"sysprop.zone": "east"},
      {"sysprop.zone": "west"},
      {"sysprop.zone": "apac"}]
  }]
{code}


was (Author: noble.paul):
h4. A a new {{nodeset}} attribute
{code:java}
 //eg: 1
//Keep exactly one replica in a set of nodes 'node-1', 'node-2'
{"replica" : 1 , "shard" : "#EACH" , "nodeset" : ["node-1","node-2"]}

//Keep exactly one replica in a set of nodes with system-property "prop-name"== 
"prop-val"
{"replica" : 1 , "shard" : "#EACH" , "nodeset" : {"sysprop.prop-name" : 
"prop-val"}}


Keep exactly one replica in a set of nodes on port '8901','8902'
{"replica" : 1 , "shard" : "#EACH" , "nodeset" : {"port" : [8901,8902] } }
{code}
this could be usable with any of the other properties as well such as 
{{nodeRole}}, {{freedisk}} , {{diskType}}
h4. Support ratios.

The value of replica can be an array . When it's an array,
 * The sum of the numbers must be {{100}}
the attribute {{nodeset}} must be present
 * the value of {{nodeset}} must be an array
 * no:of elements in the {{replica}} array must be same as the no:of elements 
in the {{nodeset}} array.
{code:java}
[{
    //for each shard keep 30% on port 8983 and 70% on port 7574
    "shard": "#EACH",
    "replica": [30,70],
    "nodeset": [
      {"port": 8983},
      {"port": 7574}]
  },
  {
   //for each collection, keep 40% on zone 'east', 40% on zone 'west' & 20% on 
zone= 'apac'
    "replica": [40,40,20],
    "nodeset": [
      {"sysprop.zone": "east"},
      {"sysprop.zone": "west"},
      {"sysprop.zone": "apac"}]
  }]
{code}

> Placing exact number of replicas on a set of solr nodes, instead of each solr 
> node.
> -----------------------------------------------------------------------------------
>
>                 Key: SOLR-13329
>                 URL: https://issues.apache.org/jira/browse/SOLR-13329
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: AutoScaling
>    Affects Versions: master (9.0)
>            Reporter: Amrit Sarkar
>            Priority: Major
>
> Let's say we have a requirement where we would like to place:
> {code}
> exact X replica on a set of solr nodes comprises of solr-node-1, solr-node-2, 
> ... solr-node-N.
> {code}
> e.g. exact 1 replica on either of the respective 3 solr nodes, solr-node-1, 
> solr-node-2, solr-node-3, and rest of the replicas can be placed on 
> corresponding solr nodes.
> Right now we don't have a straightforward manner of doing the same. 
> Autoscaling cluster policy also doesn't support such behavior, but instead 
> takes an array of solr node names and treat them as separate rules as per 
> https://lucene.apache.org/solr/guide/7_7/solrcloud-autoscaling-policy-preferences.html#sysprop-attribute.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to