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

Anshum Gupta edited comment on SOLR-4655 at 5/1/13 9:23 PM:
------------------------------------------------------------

I just tested the patch and this seems to work just about fine out of the box 
(other than a few minor hiccups while patching) even for the split shards. We 
don't seem to be using the hostname in the SplitShard code.
Here's how the clusterstate looks like post a shard split call using 
genericNames.
{quote}
  {"collection1":{
      "shards":{
        "shard1":{
          "range":"80000000-ffffffff",
          "state":"active",
          "replicas":{"core_node1":{
              "state":"active",
              "core":"collection1",
              "node_name":"192.168.2.2:8983_solr",
              "base_url":"http://192.168.2.2:8983/solr";,
              "leader":"true"}}},
        "shard2":{
          "range":"0-7fffffff",
          "state":"active",
          "replicas":{"core_node2":{
              "state":"active",
              "core":"collection1",
              "node_name":"192.168.2.2:7574_solr",
              "base_url":"http://192.168.2.2:7574/solr";,
              "leader":"true"}}},
        "shard1_0":{
          "state":"active",
          "replicas":{"core_node3":{
              "state":"active",
              "core":"collection1_shard1_0_replica1",
              "node_name":"192.168.2.2:8983_solr",
              "base_url":"http://192.168.2.2:8983/solr";,
              "leader":"true"}}},
        "shard1_1":{
          "state":"active",
          "replicas":{"core_node4":{
              "state":"active",
              "core":"collection1_shard1_1_replica1",
              "node_name":"192.168.2.2:8983_solr",
              "base_url":"http://192.168.2.2:8983/solr";,
              "leader":"true"}}}},
      "router":"compositeId"}}
{quote}
                
      was (Author: anshumg):
    I just tested the patch and this seems to work just about fine out of the 
box (other than a few minor hiccups while patching) even for the split shards. 
We don't seem to be using the hostname in the SplitShard code.
Here's how the clusterstate looks like post a shard split call using 
genericNames.

  {"collection1":{
      "shards":{
        "shard1":{
          "range":"80000000-ffffffff",
          "state":"active",
          "replicas":{"core_node1":{
              "state":"active",
              "core":"collection1",
              "node_name":"192.168.2.2:8983_solr",
              "base_url":"http://192.168.2.2:8983/solr";,
              "leader":"true"}}},
        "shard2":{
          "range":"0-7fffffff",
          "state":"active",
          "replicas":{"core_node2":{
              "state":"active",
              "core":"collection1",
              "node_name":"192.168.2.2:7574_solr",
              "base_url":"http://192.168.2.2:7574/solr";,
              "leader":"true"}}},
        "shard1_0":{
          "state":"active",
          "replicas":{"core_node3":{
              "state":"active",
              "core":"collection1_shard1_0_replica1",
              "node_name":"192.168.2.2:8983_solr",
              "base_url":"http://192.168.2.2:8983/solr";,
              "leader":"true"}}},
        "shard1_1":{
          "state":"active",
          "replicas":{"core_node4":{
              "state":"active",
              "core":"collection1_shard1_1_replica1",
              "node_name":"192.168.2.2:8983_solr",
              "base_url":"http://192.168.2.2:8983/solr";,
              "leader":"true"}}}},
      "router":"compositeId"}}
                  
> The Overseer should assign node names by default.
> -------------------------------------------------
>
>                 Key: SOLR-4655
>                 URL: https://issues.apache.org/jira/browse/SOLR-4655
>             Project: Solr
>          Issue Type: Improvement
>          Components: SolrCloud
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>             Fix For: 4.3, 5.0
>
>         Attachments: SOLR-4655.patch, SOLR-4655.patch, SOLR-4655.patch, 
> SOLR-4655.patch, SOLR-4655.patch
>
>
> Currently we make a unique node name by using the host address as part of the 
> name. This means that if you want a node with a new address to take over, the 
> node name is misleading. It's best if you set custom names for each node 
> before starting your cluster. This is cumbersome though, and cannot currently 
> be done with the collections API. Instead, the overseer could assign a more 
> generic name such as nodeN by default. Then you can easily swap in another 
> node with no pre planning and no confusion in the name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to