简体   繁体   English

我们可以在 2021 年将 Kstream 与 Spark Streaming 一起使用吗?

[英]Can we use Kstream with Spark Streaming in 2021?

Can we use Kstream with Spark in 2021?我们可以在 2021 年将 Kstream 与 Spark 一起使用吗?

Is it a recommended approach or using the Spark Streaming is a better solution.这是推荐的方法还是使用 Spark Streaming 是更好的解决方案。

You cannot.你不能。 Kafka Streams and Spark (Streaming) are not compatible to be used together. Kafka Streams 和 Spark (Streaming) 不兼容,不能一起使用。

You can, alternatively, use Kubernetes, for example as a Spark Scheduler together with containerized Kafka Streams deployments that use the same input and output topics.或者,您可以使用 Kubernetes,例如作为 Spark 调度程序与使用相同输入和输出主题的容器化 Kafka Streams 部署一起使用。

Can we use Kstream with Spark in 2021?我们可以在 2021 年将 Kstream 与 Spark 一起使用吗?

Sure.当然。

Is it a recommended approach这是推荐的方法吗

Not really (if at all).不是真的(如果有的话)。

using the Spark Streaming is a better solution.使用 Spark Streaming 是一个更好的解决方案。

"Better" begs for another question "In what scenarios?" “更好”引出了另一个问题“在什么情况下?”


Kafka Streams is a library and as such can be used anywhere a library could be used in an application, incl. Kafka Streams 是一个库,因此可以在任何可以在应用程序中使用库的地方使用,包括。 Spark applications.火花应用。 In that sense, it is possible, but not really of much help IMHO.从这个意义上说,这是可能的,但恕我直言,帮助不大。

Kafka Streams is simply a bunch of threads that use Consumer and Producer APIs to transform records. Kafka Streams 只是一堆使用消费者和生产者 API 来转换记录的线程。 That's the Kafka data source in Spark Structured Streaming exactly.这正是 Spark Structured Streaming 中的 Kafka 数据源。

Kafka Streams applications are deployed as standalone Java applications (eg Docker containers in k8s). Kafka Streams 应用程序部署为独立的 Java 应用程序(例如 k8s 中的 Docker 容器)。 The same is also possible with Spark Structured Streaming (with Spark on Kubernetes). Spark Structured Streaming(在 Kubernetes 上使用 Spark)也可以做到这一点。

See no real benefit using both in a single application but would love proven wrong.在单个应用程序中使用两者看不到真正的好处,但会喜欢被证明是错误的。

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

相关问题 我们可以使用Spark流进行基于时间的事件吗 - Can we use Spark streaming for time based events 是否可以像在Spark Streaming中支持的那样将NodeJS用于TCP流数据? - Can we use NodeJS for TCP streaming data like we have suppport in Spark Streaming? Spark Streaming我们可以在执行程序上创建线程吗 - Spark streaming can we create a thread on executor 可以在kafka 0.10.0中使用Spark Streaming 1.5.1吗? - Can use spark streaming 1.5.1 with kafka 0.10.0? 我们可以在Spark Streaming中的foreachRDD中启动新线程吗? - can we start a new thread in foreachRDD in spark streaming? 在Spark Streaming中,我们可以将数据(hashmap)存储在Executor内存中 - In Spark Streaming, can we store data (hashmap) in Executor memory 可以在Spark批处理上创建模型并在Spark流中使用它吗? - Can a model be created on Spark batch and use it in Spark streaming? 我们如何使用来自多个源的 spark 流? 例如,首先从 HDFS 获取数据,然后从 Kafka 消费流式传输 - How can we use streaming in spark from multiple source? e.g First take data from HDFS and then consume streaming from Kafka 可以通过spark-sql流和cassandra处理此用例吗? - Will this use-case can be handled with spark-sql streaming and cassandra? 如何将批处理Spark执行的结果用于流式处理? - How can I use the results of a batch spark execution to a streaming one?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM