如何在Windows上将Spark Streaming连接到独立的Solr?

编程入门 行业动态 更新时间:2024-10-27 00:27:08
本文介绍了如何在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?

推荐答案

请查看此示例是否有用 spark.apache/docs/latest/streaming-programming-guide.html#design-patterns-for-using-foreachrdd

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

从示例中,您将需要编写自己的Connection类,该类包装 HttpSolrClient 或 ConcurrentUpdateSolrClient .您还需要编写自己的ConnectionPool类,该类将实现您自己的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?

本文发布于:2023-10-26 11:04:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1529949.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:上将   连接到   独立   如何在   Spark

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!