Administering and Monitoring SolrCloud Clusters
- 4. Local SolrCloud Cluster
java -Dbootstrap_confdir=./solr/revolution/conf
-Dcollection.configName=revolution -DzkRun -DnumShards=1 -jar
start.jar
Runs embedded ZooKeeper
Bootstraps collection with 1 shards
Starts Solr
- 5. Starting Solr Cluster
No Collection
No Collection
-DzkHost=192.168.1.1:2181,
192.168.1.2:2181,192.168.1.3:2181
Solr Server
-DzkHost=192.168.1.3:2181,
192.168.1.1:2181,192.168.1.2:2181
Solr Server
No Collection
No Collection
-DzkHost=192.168.1.2:2181,
192.168.1.1:2181,192.168.1.3:2181
-DzkHost=192.168.1.3:2181,
192.168.1.1:2181,192.168.1.2:2181
Solr Server
ZooKeeper
ZooKeeper
ZooKeeper
Solr Server
- 9. Collection Split Example
$ curl
'http://solr1:8983/solr/admin/collections?action=CREATE&
name=collection1&numShards=2&replicationFactor=1'
- 10. Collection Split Example
$ curl 'http://localhost:8983/solr/admin/collections?
action=SPLITSHARD&collection=collection1&shard=shard1'
- 11. Getting Deeper – CoreAdmin API
curl 'http://solrhost:8983/solr/admin/cores?action=CREATE
&name=newcore&collection=revolution&shard=shard2'
collection
shard
numShards
collection.configName
- 12. Schema – the API
Reading (Solr 4.2)
Fields
Dynamic fields
Types
Copy fields
Name (4.3)
Version (4.3)
Unique Key (4.3)
Similarity (4.3)
Writing (Solr 4.4)
Adding new fields
Adding copy fields
- 13. Reading Your Schema
curl -XGET 'http://solrhost:8983/solr/rev/schema/fields/name'
{
"responseHeader" : {
"status" : 0,
"QTime" : 5 },
"field" : {
"name" : "name",
"type" : "text_general",
"indexed" : true,
"stored" : true }
}
Full reference: http://wiki.apache.org/solr/SchemaRESTAPI
- 14. Dynamic Schema Modifications
<schemaFactory class="ManagedIndexSchemaFactory">
<bool name="mutable">true</bool>
<str name="managedSchemaResourceName">managed-schema</str>
</schemaFactory>
curl -XPUT 'http://solrhost:8983/solr/rev/schema/fields/content' –d
'{
"type" : "text",
"stored" : "false",
"copyFields" : ["catchAll"]
}'
curl -XPOST 'http://solrhost:8983/solr/rev/schema/copyFields' -d
'[
{
"source" : "name",
"dest" : [ "text", "personal" ]
}
]'
- 17. Segment Merge Under Control
Merge policy
Merge scheduler
Merge factor
Merge policy configuration
https://cwiki.apache.org/confluence/display/solr/IndexConfig+in+SolrConfig
- 18. Autocommit or Not?
Automatic data flush (hard commit)
Automatic index view refresh
<autoCommit>
<maxTime>15000</maxTime>
<maxDocs>1000</maxDocs>
<openSearcher>false</openSearcher>
</autoCommit>
<autoSoftCommit>
<maxTime>1000</maxTime>
</autoSoftCommit>
- 24. Search - related Metrics
Count
Latency
Distribution among nodes
Anomalies and spikes
- 25. Monitoring Memory and GC
Heap details
Pool size
Pool utilization
Garbage collection count
Garbage collection time
- 36. We Are Hiring !
Dig Search ?
Dig Analytics ?
Dig Big Data ?
Dig Performance ?
Dig working with and in open – source ?
We’re hiring world – wide !
http://sematext.com/about/jobs.html
- 37. Thank You !
Rafał Kuć
@kucrafal
rafal.kuc@sematext.com
Sematext
@sematext
http://sematext.com
http://blog.sematext.com
SPM discount code:
LR2013SPM20
@ Sematext booth ;)