I want to integrate Spark Streaming with Standalone Solr. I am using Spark 1.6.1 and Solr 5.2 standalone on windows with no Zookeeper configuration. I am able to find some solution where they are connecting to Solr from spark by passing the Zookeeper config. How can I connect my spark program to standalone Solr?Answer1:
Please see if this example is helpful <a href="http://spark.apache.org/docs/latest/streaming-programming-guide.html#design-patterns-for-using-foreachrdd" rel="nofollow">http://spark.apache.org/docs/latest/streaming-programming-guide.html#design-patterns-for-using-foreachrdd</a>
From example, you will need to write your own Connection class which wraps object of <a href="https://lucene.apache.org/solr/5_3_1/solr-solrj/org/apache/solr/client/solrj/impl/HttpSolrClient.html" rel="nofollow">HttpSolrClient</a> or <a href="https://lucene.apache.org/solr/5_3_1/solr-solrj/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.html" rel="nofollow">ConcurrentUpdateSolrClient</a>. You need to also write your own ConnectionPool class which will implement pool of your own Connection objects (or if its thread safe, just return same singleton object).