问题描述
我试图了解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转换之间有什么确切区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!