- 博客(6)
- 资源 (6)
- 收藏
- 关注
转载 [spark]groupbykey reducebykey
为什么建议尽量在Spark中少用GroupByKey,让我们看一下使用两种不同的方式去计算单词的个数,第一种方式使用reduceByKey ;另外一种方式使用groupByKey,代码如下: 01 # User: 过往记忆 02 # Date: 2015-05-18 03 #
2015-11-25 20:13:42 860
转载 [spark]Spark性能调优实战
Spark特别适用于多次操作特定的数据,分mem-only和mem & disk。其中mem-only:效率高,但占用大量的内存,成本很高;mem & disk:内存用完后,会自动向磁盘迁移,解决了内存不足的问题,却带来了数据的置换的消费。Spark常见的调优工具有nman、Jmeter和Jprofile,以下是Spark调优的一个实例分析: 1、场景:精确客户群 对一个容量为300g的客户信
2015-11-25 19:50:55 768
转载 [spark]Spark算子:RDD基本转换操作(5)–mapPartitions、mapPartitionsWithIndex
mapPartitions def mapPartitions[U](f: (Iterator[T]) => Iterator[U], preservesPartitioning: Boolean = false)(implicit arg0: ClassTag[U]): RDD[U] 该函数和map函数类似,只不过映射函数的参数由RDD中的每一个元素变成了RDD中每一个分区的迭代器。
2015-11-25 19:32:56 1536
转载 [spark]map 与 flatMap 的区别
通过一个实验来看Spark 中 map 与 flatMap 的区别。 步骤一:将测试数据放到hdfs上面 hadoopdfs -put data1/test1.txt /tmp/test1.txt 该测试数据有两行文本: 步骤二:在Spark中创建一个RDD来读取hdfs文件/tmp/test1.txt 步骤三:查看
2015-11-25 19:28:37 460
转载 [spark]计算视频播放数每个区间占用比例
Printing elements of an RDD Another common idiom is attempting to print out the elements of an RDD using rdd.foreach(println) or rdd.map(println). On a single machine, this will generate the expe
2015-11-25 19:23:23 1147
转载 httpclient提交json参数
httpclient使用post提交json参数,(跟使用表单提交区分): [java] view plaincopy private void httpReqUrl(List list, String url) throws ClientProtocolException, IOException {
2015-11-23 15:28:31 908
httpclient tutorial httpclient 指南
2018-03-08
mask rcnn paper
2018-03-07
Applying Deep Learning To Answer Selection
2018-03-07
Learning Phrase Representations using RNN Encoder–Decoder
2018-03-07
BPTT BackPropagation Through Time.pdf
2018-03-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人