Migrate Solr Replicas
When you replace a host, migrating replicas on that host to the new host, instead of depending on failure recovery, can help ensure optimal performance.
Where possible, the Solr service routes requests to the proper host. Both ADDREPLICA and DELETEREPLICA Collections API calls can be sent to any host in the cluster. For more information on the Collections API, see Collections API in Apache Solr Reference Guide.
- For adding replicas, the
node
parameter ensures the new replica is created on the intended host. If no host is specified, Solr selects a host with relatively fewer replicas. - For deleting replicas, the request is routed to the host that hosts the replica to be deleted.
Adding replicas can be resource intensive. For best results, add replicas when the system is not under heavy load. For example, do not add replicas when heavy indexing is occurring or when MapReduceIndexerTool jobs are running.
Cloudera recommends using API calls to create and unload cores. Do not use the Cloudera Manager Admin Console or the Solr Admin UI for these tasks.
- Host names:
- Origin:
solr01.example.com
. - Destination:
solr02.example.com
.
- Origin:
- Collection name:
email
- Replicas:
- The original replica
email_shard1_replica1
, which is onsolr01.example.com
. - The new replica
email_shard1_replica2
, which will be onsolr02.example.com
.
- The original replica