
How to run Apache Solr on Cloudera Hadoop platform.
Installation
- prerequisities: Java, Hadoop, Zookeeper
- on the first server instance:
- set the ZooKeeper and HDFS addresses in /etc/default/solr
- create the solr directory in the root of HDFS (and chmod it to solr:solr)
- initialize the solr namespace in ZooKeeper (run
solrctl init
)
- start the Solr service:
service solr-server restart
on other server instances:
- set the ZooKeeper and HDFS addresses in /etc/default/solr
- start the Solr service: service solr-server restart
Creating the new SolrCloud collection
- OPTIONAL: generate all necessary config files: solrctl instancedir --generate $HOME/solr_configs
- Initialize the collection directory on Zookeeper: solrctl instancedir --create mycollection $HOME/solr_configs
- Creaate the collection: solrctl collection --create mycollection -s <number_of_shards> -r <number_of_replicas>
- Possible deleting of collection/instancedir: solrctl collection --delete mycollection, solrctl instancedir --delete mycollection
Odkaz na článek
Vytvořil 26. června 2015 v 19:40:30
mira. Upravováno 68x, naposledy 23. července 2015 v 16:19:04,
mira