In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Cloudera search1.0.0 environment to build how to build solrcloud, I believe that many inexperienced people are helpless about this, this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
Based on Cloudera Manager 5.0.0, all services are installed based on CDH5.0.0 Parcel.
CM installation solr is very convenient, add services on the cluster on the line, solrcloud needs zookeeper cluster support, so add solr service before adding zookeeper service. I will not repeat it here.
Starting with adding solr service, I have 4 hosts, so when adding solr service, I added 4 solr servers, one for each host. After selecting the corresponding zookeeper service to start solr service, these four nodes are in the same solrcloud cluster.
cm installed solr service default is no collection. We can manage solrcloud using a scripting tool provided by cloudera called:solrctl
$ solrctl --helpusage: /usr/bin/solrctl [options] command [command-arg] [command [command-arg]] ... Options: --solr solr_uri --zk zk_ensemble --help --quietCommands: init [--force] instancedir [--generate path] [--create name path] [--update name path] [--get name path] [--delete name] [--list] collection [--create name -s [-c ] [-r ] [-m ] [-n ]] [--delete name] [--reload name] [--stat name] [--deletedocs name] [--list] core [--create name [-p name=value]...] [--reload name] [--unload name] [--status name]
When the solr service is first started, it creates the/solr directory on hdfs and the/solr node on zookeeper. The/solr node on zookeeper is used to store solrcloud configuration information.
Since there is no collection on solrcloud now, we first create a collection, named collection1. Before creating collection1, we first need to upload the configuration information to zookeeper. Here, we upload the configuration of collection1 under the solr directory in solr's own examples, corresponding to the cluster installed in cm. This directory is under the/opt/cloudera/parcels/CDH/share/doc /solr-doc-4.4.0+cdh6.0.0+178/example/solr directory. We use:
sudo -u solr solrctl instancedir --create collection1 /opt/cloudera/parcels/CDH/share/doc/solr-doc-4.4.0+cdh6.0.0+178/example/solr/collection1
After executing this command, all files under the conf directory under/opt/cloudera/parsels/CDH/share/doc/solr-doc- 4.4.0+cdh6.0.0+178/example/solr/collection1 will be uploaded to the collection1 directory under/solr/configs of zookeeper.
OK, the configuration file is uploaded, the next step is to create a collection, run the following command:
sudo -u solr solrctl collection --create collection1 -s 2
Create a collection named collection1, with 2 shards, we do not write the-c parameter, we will use the default configuration file directory same as the collection name as the default configuration of-c, that is, we will use the default collection1 directory uploaded to zookeeper in the previous step as the default configuration directory.
OK, we can check whether the collection is successfully created, run: solrctl collection --list, see if there is a collection1
Under cloud on the solr console management page, you can cut down the topology structure of collection1 graphically described. Here, we don't need to care about which two servers solrcloud manages are assigned to.
Let's try adding a document to this collection:
cd /opt/cloudera/parcels/CDH/share/doc/solr-doc-4.4.0+cdh6.0.0+178/example/exampledocs
java -Durl=http://master68:8983/solr/collection1/update -jar post.jar ipod_video.xml
Then execute the query: http://master68:8983/solr/collection1/select? q=*:*
You can query the index file we just added, so far, a simple solrcloud has been built.
After reading the above content, do you know how to build solrcloud in cloudera search 1.0.0 environment? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.