是否可以在运行时在 Web 浏览器或 UI 上显示从 Storm 进程中的进程派生的结果?它是如何完成的?
最佳答案
不确定您在寻找什么,但很有可能将任何 bolt 输出写入文件。您只需要一个工作 bolt ,它可以将文件中传递给它的任何内容都涂白。您将流写入文件的逻辑应该在 bolt 的 execute(Tuple tuple)
中。方法。
这就是你要找的吗?
更新
在 Bolt 和 Websockets 之间放置一个队列(Kafka/Krestel)怎么样。我找到了这篇文章 here其中说
In order to easily integrate between Storm and the front-end (through WebSockets) I chose Apache Camel to do the heavy lifting for me. By having the bolts in the Storm topology write their output to an ActiveMQ queue, I could create a Camel route that subscribes to this queue and push the messages to WebSockets, like so:
public class StreamingRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
from("activemq:storm.queue")
.to("websocket://storm?sendToAll=true");
}
}
还找到了 this文章谈集成
JMS and Websockets
关于runtime - 在浏览器上显示 Storm 集群 bolt 的结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19510497/