lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (SOLR-2880) Investigate adding an overseer that can assign shards, later do re-balancing, etc
Date Tue, 06 Dec 2011 20:17:40 GMT

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

Yonik Seeley edited comment on SOLR-2880 at 12/6/11 8:15 PM:
-------------------------------------------------------------

For those following along, here's what the ZK layout looks like after starting 4 nodes (with
the default 3 shards).

{code}
...../NODE_ASSIGNMENTS (v=0 children=4)
          ROGUE:7574_SOLR (v=4) "[{ "_collection":"collection1", "_core":"Rogue:7574_solr_",
"shard_name":"shard2"}]"
          ROGUE:2222_SOLR (v=2) "[{ "_collection":"collection1", "_core":"Rogue:2222_solr_",
"shard_name":"shard1"}]"
          ROGUE:1111_SOLR (v=2) "[{ "_collection":"collection1", "_core":"Rogue:1111_solr_",
"shard_name":"shard3"}]"
          ROGUE:8983_SOLR (v=2) "[{ "_collection":"collection1", "_core":"Rogue:8983_solr_",
"shard_name":"shard1"}]"
     /NODE_STATES (v=0 children=4)
          ROGUE:7574_SOLR (v=4) "[{ "shard_id":"shard2", "_collection":"collection1", "roles":"",
"_core":"Rogue:7574_solr_", "s..."
          ROGUE:2222_SOLR (v=2) "[{ "shard_id":"shard1", "_collection":"collection1", "roles":"",
"_core":"Rogue:2222_solr_", "s..."
          ROGUE:1111_SOLR (v=2) "[{ "shard_id":"shard3", "_collection":"collection1", "roles":"",
"_core":"Rogue:1111_solr_", "s..."
          ROGUE:8983_SOLR (v=2) "[{ "shard_id":"shard1", "_collection":"collection1", "roles":"",
"_core":"Rogue:8983_solr_", "s..."
     /ZOOKEEPER (v=0 children=1) ""
          QUOTA (v=0) ""
     /CLUSTERSTATE.JSON (v=10) "{"collection1":{ "shard1":{ "Rogue:2222_solr_":{ "shard_id":"shard1",
"_collection":"collection1..."
     /LIVE_NODES (v=4 children=3)
          ROGUE:2222_SOLR (ephemeral v=0)
          ROGUE:1111_SOLR (ephemeral v=0)
          ROGUE:8983_SOLR (ephemeral v=0)
     /COLLECTIONS (v=1 children=1)
          COLLECTION1 (v=0 children=2) "{ "configName":"myconf", "num_shards":"3"}"
               SHARDS_LOCK (v=0)
               LEADER_ELECT (v=0 children=3)
                    SHARD1 (v=0 children=2)
                         ELECTION (v=0 children=2)
                              N_0000000001 (ephemeral v=0)
                              N_0000000000 (ephemeral v=0)
                         LEADER (v=0 children=1)
                              ROGUE:8983_SOLR_ (ephemeral v=0) "{ "shard_id":"shard1", "roles":"",
"state":"recovering", "node_name":"Rogue:8983_solr", "url":"..."
                    SHARD2 (v=0 children=2)
                         ELECTION (v=0 children=1)
                              N_0000000000 (ephemeral v=0)
                         LEADER (v=0 children=1)
                              ROGUE:7574_SOLR_ (ephemeral v=0) "{ "shard_id":"shard2", "roles":"",
"state":"recovering", "node_name":"Rogue:7574_solr", "url":"..."
                    SHARD3 (v=0 children=2)
                         ELECTION (v=0 children=1)
                              N_0000000000 (ephemeral v=0)
                         LEADER (v=0 children=1)
                              ROGUE:1111_SOLR_ (ephemeral v=0) "{ "shard_id":"shard3", "roles":"",
"state":"recovering", "node_name":"Rogue:1111_solr", "url":"..."
     /OVERSEER_ELECT (v=0 children=2)
          ELECTION (v=0 children=4)
               N_0000000004 (ephemeral v=0)
               N_0000000003 (ephemeral v=0)
               N_0000000001 (ephemeral v=0)
               N_0000000000 (ephemeral v=0)
          LEADER (v=0)
{code}

Notes: Starting up the first node by bootstrapping fails the first time you try.  Run it again
and it works.
java -Dbootstrap_confdir=./solr/conf -Dcollection.configName=myconf -DzkRun -jar start.jar

                
      was (Author: yseeley@gmail.com):
    For those following along, here's what the ZK layout looks like after starting 4 nodes
(with the default 3 shards).

{code}
     /NODE_ASSIGNMENTS (v=0 children=4)
          ROGUE:7574_SOLR (v=4) "[{ "_collection":"collection1", "_core":"Rogue:7574_solr_",
"shard_name":"shard2"}]"
          ROGUE:2222_SOLR (v=2) "[{ "_collection":"collection1", "_core":"Rogue:2222_solr_",
"shard_name":"shard1"}]"
          ROGUE:1111_SOLR (v=2) "[{ "_collection":"collection1", "_core":"Rogue:1111_solr_",
"shard_name":"shard3"}]"
          ROGUE:8983_SOLR (v=2) "[{ "_collection":"collection1", "_core":"Rogue:8983_solr_",
"shard_name":"shard1"}]"
     /NODE_STATES (v=0 children=4)
          ROGUE:7574_SOLR (v=4) "[{ "shard_id":"shard2", "_collection":"collection1", "roles":"",
"_core":"Rogue:7574_solr_", "s..."
          ROGUE:2222_SOLR (v=2) "[{ "shard_id":"shard1", "_collection":"collection1", "roles":"",
"_core":"Rogue:2222_solr_", "s..."
          ROGUE:1111_SOLR (v=2) "[{ "shard_id":"shard3", "_collection":"collection1", "roles":"",
"_core":"Rogue:1111_solr_", "s..."
          ROGUE:8983_SOLR (v=2) "[{ "shard_id":"shard1", "_collection":"collection1", "roles":"",
"_core":"Rogue:8983_solr_", "s..."
     /ZOOKEEPER (v=0 children=1) ""
          QUOTA (v=0) ""
     /CLUSTERSTATE.JSON (v=10) "{"collection1":{ "shard1":{ "Rogue:2222_solr_":{ "shard_id":"shard1",
"_collection":"collection1..."
     /LIVE_NODES (v=4 children=3)
          ROGUE:2222_SOLR (ephemeral v=0)
          ROGUE:1111_SOLR (ephemeral v=0)
          ROGUE:8983_SOLR (ephemeral v=0)
     /COLLECTIONS (v=1 children=1)
          COLLECTION1 (v=0 children=2) "{ "configName":"myconf", "num_shards":"3"}"
               SHARDS_LOCK (v=0)
               LEADER_ELECT (v=0 children=3)
                    SHARD1 (v=0 children=2)
                         ELECTION (v=0 children=2)
                              N_0000000001 (ephemeral v=0)
                              N_0000000000 (ephemeral v=0)
                         LEADER (v=0 children=1)
                              ROGUE:8983_SOLR_ (ephemeral v=0) "{ "shard_id":"shard1", "roles":"",
"state":"recovering", "node_name":"Rogue:8983_solr", "url":"..."
                    SHARD2 (v=0 children=2)
                         ELECTION (v=0 children=1)
                              N_0000000000 (ephemeral v=0)
                         LEADER (v=0 children=1)
                              ROGUE:7574_SOLR_ (ephemeral v=0) "{ "shard_id":"shard2", "roles":"",
"state":"recovering", "node_name":"Rogue:7574_solr", "url":"..."
                    SHARD3 (v=0 children=2)
                         ELECTION (v=0 children=1)
                              N_0000000000 (ephemeral v=0)
                         LEADER (v=0 children=1)
                              ROGUE:1111_SOLR_ (ephemeral v=0) "{ "shard_id":"shard3", "roles":"",
"state":"recovering", "node_name":"Rogue:1111_solr", "url":"..."
     /OVERSEER_ELECT (v=0 children=2)
          ELECTION (v=0 children=4)
               N_0000000004 (ephemeral v=0)
               N_0000000003 (ephemeral v=0)
               N_0000000001 (ephemeral v=0)
               N_0000000000 (ephemeral v=0)
          LEADER (v=0)
{code}

Notes: Starting up the first node by bootstrapping fails the first time you try.  Run it again
and it works.
java -Dbootstrap_confdir=./solr/conf -Dcollection.configName=myconf -DzkRun -jar start.jar

                  
> Investigate adding an overseer that can assign shards, later do re-balancing, etc
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-2880
>                 URL: https://issues.apache.org/jira/browse/SOLR-2880
>             Project: Solr
>          Issue Type: Sub-task
>          Components: SolrCloud
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>             Fix For: 4.0
>
>         Attachments: SOLR-2880-merge-elections.patch, SOLR-2880.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message