Never mind I think I found it.

There must be some documents into each shardso they havea version number. Then everything seems to work...

On 11/30/2012 04:57 PM, Mark Miller wrote:
Thanks for all the detailed info!

Yes, that is confusing. One of the sore points we have while supporting both 
std Solr and SolrCloud mode.

In SolrCloud, every node is a Master when thinking about std Solr replication. 
However, as you see on the cloud page, only one of them is a *leader*. A leader 
is different than a master.

Being a Master when it comes to the replication handler simply means you can 
replicate the index to other nodes - in SolrCloud we need every node to be 
capable of doing that. Each shard only has one leader, but every node in your 
cluster will be a replication master.

- Mark


On Nov 30, 2012, at 10:32 AM, Arkadi Colson <ark...@smartbit.be> wrote:

This is my setup for solrCloud 4.0 on Tomcat 7.0.33 and zookeeper 3.4.5

hosts:
- solr01-dcg (first started)
- solr01-gs (second started so becomes replicate)

collections:
- smsc

shards:
- mydoc

zookeeper:
- on solr01-dcg
- on solr01-gs

SOLR_OPTS="-Dsolr.solr.home=/opt/solr/ -Dport=8983 -Dcollection.configName=smsc 
-DzkClientTimeout=20000 -DzkHost=solr01-dcg:2181,solr01-gs:2181"

solr.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="true">
   <cores adminPath="/admin/cores" zkClientTimeout="20000" hostPort="8983">
     <core schema="schema.xml" shard="shard1" instanceDir="/solr/mydoc/" name="mydoc" 
config="solrconfig.xml" collection="mydoc"/>
   </cores>
</solr>

I upload the config to zookeeper:
java -classpath .:/usr/local/tomcat/webapps/solr/WEB-INF/lib/* 
org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 
solr01-dcg:2181,solr01-gs:2181 -confdir /opt/solr/conf -confname smsc

Linking the config to the collection:
java -classpath .:/usr/local/tomcat/webapps/solr/WEB-INF/lib/* 
org.apache.solr.cloud.ZkCLI -cmd linkconfig -collection mydoc -zkhost 
solr01-dcg.intnet.smartbit.be:2181,solr01-gs.intnet.smartbit.be:2181 -confname 
smsc

cloud on both hosts:

<dcddagii.png>

solr01-dcg

<hhfgdeab.png>

solr01-gs:

<daafhdef.png>
Any idea?

Thanks!

On 11/30/2012 03:15 PM, Mark Miller wrote:
On Nov 30, 2012, at 5:08 AM, Arkadi Colson <ark...@smartbit.be>
  wrote:


Hi

I've setup an simple 2 machine cloud with 1 shard, one replicator and 2 
collections.Everything went fine. However when I look at the interface:
http://localhost:8983/solr/#/coll1/replication
  is reporting the both machines are master. Did I do something wrong in my 
config or isit a report for manual replication configuration? Can someone else 
check this?

How? You don't really give anything to look at :)


Is it poossible to link 2 collections to the same conf in zookeeper?


Yes, that is no problem.

- Mark







--
Met vriendelijke groeten

Arkadi Colson

Smartbit bvba . Hoogstraat 13 . 3670 Meeuwen
T +32 11 64 08 80 . F +32 11 64 08 81

Reply via email to