如何在Windows上将Spark Streaming连接到独立的Solr? [英] How to connect Spark Streaming to standalone Solr on windows?

查看:57
本文介绍了如何在Windows上将Spark Streaming连接到独立的Solr?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将Spark Streaming与Standalone Solr集成在一起.我在没有Zookeeper配置的Windows上独立使用Spark 1.6.1和Solr 5.2.通过传递Zookeeper配置,我能够找到一些解决方案,使他们从Spark连接到Solr.如何将Spark程序连接到独立的Solr?

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?

推荐答案

请查看此示例是否有用

Please see if this example is helpful http://spark.apache.org/docs/latest/streaming-programming-guide.html#design-patterns-for-using-foreachrdd

从示例中,您将需要编写自己的Connection类,该类包装

From example, you will need to write your own Connection class which wraps object of HttpSolrClient or ConcurrentUpdateSolrClient. 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).

这篇关于如何在Windows上将Spark Streaming连接到独立的Solr?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆