spark MapPartitionsRDD
private[spark] class MapPartitionsRDD[U: ClassTag, T: ClassTag](
var prev: RDD[T],
f: (TaskContext, Int, Iterator[T]) => Iterator[U], // (TaskContext, partition index, iterator)
preservesPartitioning: Boolean = false,
isOrderSensitive: Boolean = false)
extends RDD[U](prev) {
override val partitioner = if (preservesPartitioning) firstParent[T].partitioner else None
override def getPartitions: Array[Partition] = firstParent[T].partitions
override def compute(split: Partition, context: TaskContext): Iterator[U] =
f(context, split.index, firstParent[T].iterator(split, context))
override def clearDependencies() {
super.clearDependencies()
prev = null
}
override protected def getOutputDeterministicLevel = {
if (isOrderSensitive && prev.outputDeterministicLevel == DeterministicLevel.UNORDERED) {
DeterministicLevel.INDETERMINATE
} else {
super.getOutputDeterministicLevel
}
}
}
相關文章
- Spark之spark shellSpark
- 【Spark篇】---Spark初始Spark
- Spark on Yarn 和Spark on MesosSparkYarn
- Spark系列 - (3) Spark SQLSparkSQL
- Spark學習進度-Spark環境搭建&Spark shellSpark
- 【Spark】Spark容錯機制Spark
- Spark導論(Spark自學一)Spark
- sparkSpark
- spark學習筆記--Spark SQLSpark筆記SQL
- Spark記錄(一):Spark全景概述Spark
- Spark開發-Spark核心細說Spark
- Spark開發-spark環境搭建Spark
- Spark文件閱讀之一:Spark OverviewSparkView
- Spark 系列(九)—— Spark SQL 之 Structured APISparkSQLStructAPI
- Spark 系列(十四)—— Spark Streaming 基本操作Spark
- Spark 系列(十五)—— Spark Streaming 整合 FlumeSpark
- Hello Spark! | Spark,從入門到精通Spark
- spark2.2.0 配置spark sql 操作hiveSparkSQLHive
- Spark SQL | Spark,從入門到精通SparkSQL
- spark學習筆記-- Spark StreamingSpark筆記
- Spark —— Spark OOM Error問題排查定位SparkOOMError
- 【Spark篇】---Spark中控制運算元Spark
- 【Spark篇】---Spark中Action運算元Spark
- 【Spark篇】---Spark故障解決(troubleshooting)Spark
- 初學Spark——關於安裝SparkSpark
- Spark StageSpark
- spark with hiveSparkHive
- Spark 加入Spark
- Spark exampleSpark
- Spark SQLSparkSQL
- Spark學習筆記(三)-Spark StreamingSpark筆記
- Spark API 全集(1):Spark SQL Dataset & DataFrame APISparkAPISQL
- Spark SQL:4.對Spark SQL的理解SparkSQL
- 【Spark篇】---Spark中transformations運算元二SparkORM
- spark之 spark 2.2.0 Standalone安裝、wordCount演示Spark
- spark學習之-----spark程式設計模型Spark程式設計模型
- Spark資料收藏--------Spark執行架構Spark架構
- 【Spark篇】---Spark中Shuffle檔案的定址Spark