摘要:
前言 在大数据计算领域,Spark已经成为了越来越流行、越来越受欢迎的计算平台之一。Spark的功能涵盖了大数据领域的离线批处理、SQL类处理、流式/实时计算、机器学习、图计算等各种不同类型的计算操作,应用范围与前景非常广泛。在美团•大众点评,已经有很多同学在各种项目中尝试使用Spark。大多数同学 阅读全文
posted @ 2016-07-04 22:45
XGogo
阅读(2663)
评论(0)
推荐(0)
摘要:
本文转自:http://tech.meituan.com/spark-tuning-pro.html 感谢原作者 前言 继基础篇讲解了每个Spark开发人员都必须熟知的开发调优与资源调优之后,本文作为《Spark性能优化指南》的高级篇,将深入分析数据倾斜调优与shuffle调优,以解决更加棘手的性能 阅读全文
posted @ 2016-07-04 22:44
XGogo
阅读(30554)
评论(0)
推荐(2)
摘要:
关键字:Spark算子、Spark RDD键值转换、combineByKey、foldByKey combineByKey def combineByKey[C](createCombiner: (V) => C, mergeValue: (C, V) => C, mergeCombiners: ( 阅读全文
posted @ 2016-07-04 22:26
XGogo
阅读(308)
评论(0)
推荐(0)
摘要:
关键字:Spark算子、Spark RDD键值转换、groupByKey、reduceByKey、reduceByKeyLocally groupByKey def groupByKey(): RDD[(K, Iterable[V])] def groupByKey(numPartitions: I 阅读全文
posted @ 2016-07-04 22:25
XGogo
阅读(492)
评论(0)
推荐(0)
摘要:
关键字:Spark算子、Spark RDD键值转换、partitionBy、mapValues、flatMapValues partitionBy def partitionBy(partitioner: Partitioner): RDD[(K, V)] 该函数根据partitioner函数生成新 阅读全文
posted @ 2016-07-04 22:21
XGogo
阅读(751)
评论(0)
推荐(0)
摘要:
关键字:Spark算子、Spark RDD分区、Spark RDD分区元素数量 Spark RDD是被分区的,在生成RDD时候,一般可以指定分区的数量,如果不指定分区数量,当RDD从集合创建时候,则默认为该程序所分配到的资源的CPU核数,如果是从HDFS文件创建,默认为文件的Block数。 可以利用 阅读全文
posted @ 2016-07-04 22:20
XGogo
阅读(8742)
评论(0)
推荐(0)
摘要:
zipWithIndex def zipWithIndex(): RDD[(T, Long)] 该函数将RDD中的元素和这个元素在RDD中的ID(索引号)组合成键/值对。 zipWithUniqueId def zipWithUniqueId(): RDD[(T, Long)] 该函数将RDD中元素 阅读全文
posted @ 2016-07-04 22:16
XGogo
阅读(2324)
评论(0)
推荐(0)
摘要:
zip def zip[U](other: RDD[U])(implicit arg0: ClassTag[U]): RDD[(T, U)] zip函数用于将两个RDD组合成Key/Value形式的RDD,这里默认两个RDD的partition数量以及元素数量都相同,否则会抛出异常。 zipPart 阅读全文
posted @ 2016-07-04 22:11
XGogo
阅读(322)
评论(0)
推荐(0)
摘要:
union def union(other: RDD[T]): RDD[T] 该函数比较简单,就是将两个RDD进行合并,不去重。 intersection def intersection(other: RDD[T]): RDD[T]def intersection(other: RDD[T], n 阅读全文
posted @ 2016-07-04 21:53
XGogo
阅读(504)
评论(0)
推荐(0)
摘要:
关键字:Spark算子、Spark RDD基本转换、mapPartitions、mapPartitionsWithIndex mapPartitions def mapPartitions[U](f: (Iterator[T]) => Iterator[U], preservesPartitioni 阅读全文
posted @ 2016-07-04 21:48
XGogo
阅读(3587)
评论(0)
推荐(0)
摘要:
One of the most recent and highly used functional programming language is Scala. It is used in some of the Hadoop ecosystem components like Apache Spa 阅读全文
posted @ 2016-07-04 17:54
XGogo
阅读(175)
评论(0)
推荐(0)

浙公网安备 33010602011771号