Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of solrcloud shard copy in CDH

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "how to solve the problem of solrcloud shard copy in CDH". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Version CDH5.4.4

The number of nodes:3

Want to enable nodes to back up each other directly:

Command:

Solrctl instancedir-create myCollection / home/test

Solrctl collection-- create myCollection-s 1-r 2 (It was successful)

But: solrctl collection-- create myCollection-s 3-r 2:

It is an error:Cannot create collection mycollection. Value of maxShardsPerNode is 1

Please take a look at the official post: https://community.cloudera.com/t5/Cloudera-Search-Apache-SolrCloud/Indexing-files-on-HDFS-using-solrcloud-on-cloudera-and-searching/td-p/30656

You can also refer to the official document: http://wiki.apache.org/solr/SolrCloud

In fact, by default: the maximum shard per node is 1 (maxShardsPerNode=1)

But we can: however, you can override this by overriding the value of the "maxShardsPerNode" parameter, as you did with the curl command. (that is, it has been implemented with the URL command)

Step: solrctl instancedir-- create myCollection / home/test

You can click on CDH's solrcloud management interface:

Http://hadoopnamenode:8983/solr/admin/collections?action=CREATE&name=myCollection&numShards=3&replicationFactor=3&maxShardsPerNode=3

Note: this is the management collection, so use collections?

Create a core on node1 as follows:

'http://node1:8983/solr/admin/cores?action=CREATE&name=mycore&collection=collection1&shard=shard2'

Then use: solrctl collection-- list to find that we have successfully created

Note: when we use cdh for multipart backup, the maxShardsPerNode must be greater than 1 when establishing collection, such as 3 here. Later, when a server is down, the newly added server can be used to create the URL of core. If we use the default maxShardsPerNode=1, although the query is created successfully, the query will still fail. When the backup is created, the new core will automatically copy the index.

This is the end of the content of "how to solve the problem of solrcloud shard copy in CDH". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report