lucidworks / spark-solr

Tools for reading data from Solr as a Spark RDD and indexing objects from Spark into Solr using SolrJ.
Apache License 2.0
446 stars 250 forks source link

Which zookeeper config to adopt in case of Solr running locally on Windows machine? #356

Closed unical1988 closed 1 year ago

unical1988 commented 1 year ago

In order to perform filtering operations with your connector, i use the following code:

       Map<String, String> options = new HashMap<String, String>();
        options.put("zkHost", "localhost:9983");
        options.put("collection", "techproducts");
        SparkSession spark = SparkSession.builder().master("local[1]").getOrCreate();
        Dataset<Row> datasetFromSolr = spark.read().format("solr").options(options).load();

but this code fails at the zhHost configuration (can't connect error) I though that Solr embeds Zookeeper (for the case when it doesn't run on HDFS) it turns out no Zookeeper instance is running on port 9983.

How to config Zookeeper in this case?