Thanks for the reply, this really helped me. For Solr 4.9, what is the actual zkcli command to upload config?
java -classpath example/solr-webapp/WEB-INF/lib/* org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983 -confdir example/solr/collection1/conf -confname conf1 -solrhome example/solr OR ./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:9983 -cmd upconfig -confname my_new_config -confdir server/solr/configsets/basic_configs/conf I dont know why HDP/HDInsight does not provide something like solrctl commands to make life easier for all! On Thu, Mar 8, 2018 at 5:43 PM, Shawn Heisey <apa...@elyograg.org> wrote: > On 3/8/2018 1:26 PM, Abhi Basu wrote: > > I'm in a bind. Added Solr 4.9.0 to HDInsight cluster and find no Solrctl > > commands installed. So, I am doing the following to create a collection. > > This 'solrctl' command is NOT part of Solr. Google tells me it's part > of software from Cloudera. > > You need to talk to Cloudera for support on that software. > > > I have my collection schema in a location: > > > > /home/sshuser/abhi/ems-collection/conf > > > > Using this command to create a collection: > > > > http://headnode1:8983/solr/admin/cores?action=CREATE& > name=ems-collection&instanceDir=/home/sshuser/abhi/ems-collection/conf > > <http://hn0-esohad.iqz04pwsg24ulbodxuo51nheig.jx. > internal.cloudapp.net:8983/solr/admin/cores?action= > CREATE&name=ems-collection&instanceDir=/home/sshuser/ > abhi/ems-collection/conf/> > > / > > You're using the term "collection". And later you mention ZooKeeper. So > you're almost certainly running in SolrCloud mode. If your Solr is > running in SolrCloud mode, do not try to use the CoreAdmin API > (/solr/admin/cores). Use the Collections API instead. But before that, > you need to get the configuration into ZooKeeper. For standard Solr > without Cloudera's tools, you would typically use the "zkcli" script > (either zkcli.sh or zkcli.bat). See page 376 of the reference guide for > that specific version of Solr for help with the "upconfig" command for > that script: > > http://archive.apache.org/dist/lucene/solr/ref-guide/ > apache-solr-ref-guide-4.9.pdf > > > I guess i need to register my config name with Zk. How do I register the > > collection schema with Zookeeper? > > > > Is there way to bypass the registration with zk and build the collection > > directly from my schema files at that folder location, like I was able to > > do in Solr 4.10 in CDH 5.14: > > > > solrctl --zk hadoop-dn6.eso.local:2181/solr instancedir --create > > ems-collection /home/sshuser/abhi/ems-collection/ > > > > solrctl --zk hadoop-dn6.eso.local:2181/solr collection --create > > ems-collection -s 3 -r 2 > > The solrctl command is not something we can help you with on this > mailing list. Cloudera customizes Solr to the point where only they are > able to really provide support for their version. Your best bet will be > to talk to Cloudera. > > When Solr is running with ZooKeeper, it's in SolrCloud mode. In > SolrCloud mode, you cannot create cores in the same way that you can in > standalone mode -- you MUST create collections, and all configuration > will be in zookeeper, not on the disk. > > Thanks, > Shawn > > -- Abhi Basu