DStream和地图中的Spark转换之间有什么确切区别

DStream和地图中的Spark转换之间有什么确切区别

本文介绍了DStream和地图中的Spark转换之间有什么确切区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图了解Spark Streaming中Spark DStream的转换.

I am trying to understand transform on Spark DStream in Spark Streaming.

我知道,与map相比,transformation最高级有人可以给我一些可以区分变换和映射的实时示例或清晰示例吗?

I knew that transform in much superlative compared to map, butCan some one give me some real time example or clear example that can differentiate transform and map.?

推荐答案

Spark流中的transform函数允许一个人在基础RDDs上对该流使用Apache Spark的任何转换. map用于元素到元素的转换,可以使用transform来实现.本质上,map适用于DStream的元素,并且transform允许您使用DStream的RDDs.您可能会找到 http://spark.apache. org/docs/latest/streaming-programming-guide.html#transformations-on-dstreams 有用.

The transform function in Spark streaming allows one to use any of Apache Spark's transformations on the underlying RDDs for the stream. map is used for an element to element transform, and could be implemented using transform. Essentially, map works on the elements of the DStream and transform allows you to work with the RDDs of the DStream. You may find http://spark.apache.org/docs/latest/streaming-programming-guide.html#transformations-on-dstreams to be useful.

这篇关于DStream和地图中的Spark转换之间有什么确切区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 13:48