简体   繁体   English

REST API与Spark交互

[英]REST API interacting with Spark

I am trying to connect my Spark context with REST API. 我正在尝试将我的Spark上下文与REST API连接起来。 So my flow is this, i send request from my UI- nodejs to REST API which need to interact with the spark context ( Spark job works above hive tables ) which contains the needed response and send it back to UI for display. 所以我的流程就是这样,我从我的UI-nodejs发送请求到REST API,它需要与spark上下文(Spark作业在hive表之上工作)进行交互,其中包含所需的响应并将其发送回UI进行显示。 Is there any way to achieve this ? 有没有办法实现这个目标? UI <->REST API<-> Spark (HDFS) UI < - > REST API < - > Spark(HDFS)

You can use Apache Livy . 您可以使用Apache Livy It is specifically designed for this use case. 它专为此用例而设计。 We have used it in the past to control batch and regular jobs on a Spark cluster. 我们过去曾使用它来控制Spark集群上的批处理和常规作业。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM