随笔分类 -  Spark

摘要:1.reparttion 实际就是强制shuffle的coalesce repartition 在spark中源码中实际执行的是: coalesce(numPartitions, shuffle = true) * Return a new RDD that has exactly numParti 阅读全文
posted @ 2020-12-31 22:38 曲水修竹 阅读(1224) 评论(0) 推荐(0)
摘要:1)架构模型Spark Streaming 在运行时的主要角色包括:Master、Worker、Driver、Executor,Flink 在运行时主要包含:Jobmanager、Taskmanager和Slot。 2)任务调度Spark Streaming 连续不断的生成微小的数据批次,构建有向无 阅读全文
posted @ 2020-12-31 22:35 曲水修竹 阅读(1376) 评论(0) 推荐(0)
摘要:1.mapPartitions效率比map高 Map(function)的function是针对RDD的所有元素进行操作,有多少个元素就会执行多少次 MapPartition(function)的function是RDD的分区进行操作,有多少个分区就会执行多少次,独立在每个分区上运行,所以mapPa 阅读全文
posted @ 2020-12-31 22:32 曲水修竹 阅读(1574) 评论(0) 推荐(0)
摘要:源码解释 /** *Mark this RDD for checkpointing. It will be saved to a file inside the checkpoint 将此RDD标记为检查点。它将保存到检查点内的文件中 *directory set with `SparkContex 阅读全文
posted @ 2020-06-08 10:53 曲水修竹 阅读(874) 评论(0) 推荐(0)