You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2009/11/26 10:25:20 UTC
[Solr Wiki] Update of "ZooKeeperIntegration" by NoblePaul
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "ZooKeeperIntegration" page has been changed by NoblePaul.
http://wiki.apache.org/solr/ZooKeeperIntegration?action=diff&rev1=3&rev2=4
--------------------------------------------------
== Distributed Search ==
- For distributed search, create a new !ShardsComponent that moves the shard calculation code from !QueryComponent and handles both the current approach and the !ZooKeeper approach.
+ For distributed search, create a new !ShardHandler that moves the shard calculation code from !QueryComponent and handles both the current approach and the !ZooKeeper approach.
On startup, !ZooKeeper configuration contains whether the node is a shard or not. If it is, it registers itself with !ZooKeeper by adding a value under the appropriate path in !ZooKeeper (this is configurable).
@@ -58, +58 @@
= Configuration and Running =
- !ZooKeeper config in solrconfig.xml looks like:
+ Configure the !ZooKeeperComponent in solrconfig as follows:
{{{
- <zooKeeper>
+ <zookeeper>
- <!-- See the ZooKeeper docs -->
+ <!-- See the ZooKeeper docs -->
- <hostPorts>localhost:2181</hostPorts>
+ <str name="zkhostPorts">localhost:2181</str>
<!-- TODO: figure out how to do this programmatically -->
- <me>localhost:8983/solr</me>
+ <str name="me">localhost:8983/solr/core1</str>
<!-- Timeout for the ZooKeeper. Optional. Default 10000 -->
<!-- Timeout in ms -->
+ <str name="timeout">5000</str>
+ <!- this is the directory in which this node will be added to. The name of the node is a sequential number automatically assigned by zookeeper. The value is a Namedlist which may contain as many values as other components wish to add. This component only adds the key-> value me=localhost:8983/solr/core1. For instance , the Shardhandler may add a key value shard=shard1 . ReplicationHandler may add something like version=124544 etc. -->
+ <str name="nodesDir">/domain/shard1/nodes</str>
- <timeout>5000</timeout>
- <shardsNodeName>/solr_shards</shardsNodeName>
- <mastersNodeName>/solr_masters</mastersNodeName>
-
- </zooKeeper>
+ </zookeepr>
}}}
+ The ZookeeperComponent may expose the Zookeeper client instance which could be used by other plugins for other purposes such as Master Election etc
- Configure the !ZooKeeperRequestHandler:
- {{{
- <requestHandler name="/zoo" class="solr.ZooKeeperRequestHandler">
- <bool name="shard">true</bool>
- <str name="master">master_group_1</str>
- </requestHandler>
- }}}
- The !ShardsComponent is automatically setup.
+ The !ShardHandler is automatically setup.
1. Setup !ZooKeeper according to !ZooKeeper docs, including a ZK config file.
1. Startup the !ZooKeeper server with your configuration file.