摘要: 1.spark的缓存级别参照【org.apache.spark.storage.StorageLevel.scala】 new StorageLevel(_useDisk,_useMemory, _useOffHeap,_deserialized,_replication: Int = 1) val 阅读全文
posted @ 2018-08-30 20:04 Coding_Now 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1.定义:触发Job,调用runJob()方法: 比如:collect、count 2.foreach 说明:将结果返回值执行器节点,而非驱动器 3.aggregate def aggregate[U: ClassTag](zeroValue: U)(seqOp: (U, T) => U, comb 阅读全文
posted @ 2018-08-30 20:02 Coding_Now 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 1.mapValues[Pair] def mapValues[U](f: V => U): RDD[(K, U)] 说明:将RDD[(K, V)] --> RDD[(K, U)],对Value做(f: V => U)操作 val a = sc.parallelize(List("dog", "ti 阅读全文
posted @ 2018-08-30 19:58 Coding_Now 阅读(171) 评论(0) 推荐(0) 编辑