创建独立的按需 Apache Spark Web 服务

编程入门 行业动态 更新时间:2024-10-28 09:14:26
本文介绍了创建独立的按需 Apache Spark Web 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我对网络服务完全陌生,我正在尝试创建一个像这样的网络服务:

I am completely new to web services and I am trying to create a web service which goes like this:

用户在网页中输入一些字词.在后端启动一个 Apache Spark 作业,它使用这些词作为输入参数这项工作的结果将被处理并显示在网页上.我想让它成为一个独立的东西,而不使用任何 Spark 即服务产品,如 Bluemix 等

The user enters some words into a webpage. An Apache Spark job is started in the backend which uses these words as input parameters The results of this job are to be processed and displayed back in the webpage. I want to make this a standalone thing without using any Spark-as-a-service offerings like Bluemix, etc

现在,我正在考虑采用这样的方法:后端的 Python 服务器接受请求并使用输入启动新的 Spark 作业.当 spark 作业完成时,Python 服务会处理输出并将其发送回页面.

Right now, I am thinking of going with something like this: a Python server in the backend accepts requests and fires off a new Spark job with the input. When the spark job completes, the Python service processes the output and sends it back to the page.

我不确定这是否是最好的方法.另外,我不确定如何在网页中实时显示 Spark 作业的进度.

I am not sure if this is the best way to go about doing this. Also, I'm not sure how to display the progress of the Spark job in real time in the web page.

推荐答案

apache livy 项目可能适合您的需求.

The apache livy project might fit your needs.

livy.incubator.apache/

Livy 支持通过 REST 接口或 RPC 客户端库使用同步和异步结果提交 Spark.

Livy enables submission of Spark using synchronous and asynchronous result via a REST interface or a RPC client library.

希望对您有所帮助!

更多推荐

创建独立的按需 Apache Spark Web 服务

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

发布评论

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

>www.elefans.com

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