欢迎关注大数据技术架构与案例微信公众号:过往记忆大数据
过往记忆博客公众号iteblog_hadoop
欢迎关注微信公众号:
过往记忆大数据

 分类:Spark

Spark函数讲解:checkpoint

Spark函数讲解:checkpoint
  为当前RDD设置检查点。该函数将会创建一个二进制的文件,并存储到checkpoint目录中,该目录是用SparkContext.setCheckpointDir()设置的。在checkpoint的过程中,该RDD的所有依赖于父RDD中的信息将全部被移出。对RDD进行checkpoint操作并不会马上被执行,必须执行Action操作才能触发。函数原型[code lang="scala"]def checkpoint()[/code]实例

w397090770   9年前 (2015-03-08) 60511℃ 0评论7喜欢

Spark函数讲解:cartesian

Spark函数讲解:cartesian
  从名字就可以看出这是笛卡儿的意思,就是对给的两个RDD进行笛卡儿计算。官方文档说明:Return the Cartesian product of this RDD and another one, that is, the RDD of all pairs of elements (a, b) where a is in `this` and b is in `other`.函数原型[code lang="scala"]def cartesian[U: ClassTag](other: RDD[U]): RDD[(T, U)][/code]  该函数返回的是Pair类型的RDD,计算结果

w397090770   9年前 (2015-03-07) 11175℃ 0评论5喜欢

Spark函数讲解:cache

Spark函数讲解:cache
  使用MEMORY_ONLY储存级别对RDD进行缓存,其内部实现是调用persist()函数的。官方文档定义:Persist this RDD with the default storage level (`MEMORY_ONLY`).函数原型[code lang="scala"]def cache() : this.type[/code]实例[code lang="scala"]/** * User: 过往记忆 * Date: 15-03-04 * Time: 下午06:30 * bolg: * 本文地址:/archives/1274 * 过往记忆博客,

w397090770   9年前 (2015-03-04) 14170℃ 0评论8喜欢

Spark函数讲解:aggregateByKey

Spark函数讲解:aggregateByKey
  该函数和aggregate类似,但操作的RDD是Pair类型的。Spark 1.1.0版本才正式引入该函数。官方文档定义:Aggregate the values of each key, using given combine functions and a neutral "zero value". This function can return a different result type, U, than the type of the values in this RDD, V. Thus, we need one operation for merging a V into a U and one operation for merging two U's, as in scala.Traversabl

w397090770   9年前 (2015-03-02) 39549℃ 2评论35喜欢

Spark函数讲解:aggregate

Spark函数讲解:aggregate
  我们先来看看aggregate函数的官方文档定义:Aggregate the elements of each partition, and then the results for all the partitions, using given combine functions and a neutral "zero value". This function can return a different result type, U, than the type of this RDD, T. Thus, we need one operation for merging a T into an U and one operation for merging two U's, as in scala.TraversableOnce. Both of these functions

w397090770   9年前 (2015-02-12) 37277℃ 5评论23喜欢

Learning Spark完整版下载

Learning Spark完整版下载
Learning Spark这本书链接是完整版,和之前的预览版是不一样的,我不是标题党。这里提供的Learning Spark电子书格式是mobi、pdf以及epub三种格式的文件,如果你有亚马逊Kindle电子书阅读器,是可以直接阅读mobi、pdf。但如果你用电脑,也可以下载相应的PC版阅读器 。如果你需要阅读器,可以找我。如果想及时了解Spark、Hadoop或者Hbase相

w397090770   9年前 (2015-02-11) 50570℃ 305评论70喜欢

Spark 1.2.1稳定版本发布(released)

Spark 1.2.1稳定版本发布(released)
  美国时间2015年2月09日Spark 1.2.1正式发布了,邮件如下:Hi All,I've just posted the 1.2.1 maintenance release of Apache Spark. We recommend all 1.2.0 users upgrade to this release, as this release includes stability fixes across all components of Spark.- Download this release: http://spark.apache.org/downloads.html- View the release notes: http://spark.apache.org/releases/spark-release-1-2-1.html-

w397090770   9年前 (2015-02-10) 3428℃ 0评论1喜欢

Spark SQL中对Json支持的详细介绍

Spark SQL中对Json支持的详细介绍
  在这篇文章中,我将介绍一下Spark SQL对Json的支持,这个特性是Databricks的开发者们的努力结果,它的目的就是在Spark中使得查询和创建JSON数据变得非常地简单。随着WEB和手机应用的流行,JSON格式的数据已经是WEB Service API之间通信以及数据的长期保存的事实上的标准格式了。但是使用现有的工具,用户常常需要开发出复杂的程序

w397090770   9年前 (2015-02-04) 14191℃ 1评论16喜欢

IndexedRDD:高效可更新的Key-value RDD

IndexedRDD:高效可更新的Key-value RDD
  目前的Spark RDD只提供了一个基于迭代器(iterator-based)、批量更新(bulk-updatable)的接口。但是在很多场景下,我们需要扫描部分RDD便可以查找到我们要的数据,而当前的RDD设计必须扫描全部的分区(partition )。如果你需要更新某个数据,你需要复制整个RDD!那么为了解决这方面的问题,Spark开发团队正在设计一种新的RDD:IndexedRDD。它是

w397090770   9年前 (2015-02-02) 6758℃ 0评论7喜欢

北京第五次Spark meetup会议资料分享

北京第五次Spark meetup会议资料分享
  《Spark meetup(Beijing)资料分享》  《Spark meetup(杭州)PPT资料分享》  《北京第二次Spark meetup会议资料分享》  《北京第三次Spark meetup会议资料分享》  《北京第四次Spark meetup会议资料分享》  《北京第五次Spark meetup会议资料分享》》  《北京第六次Spark meetup会议资料分享》  北京第五次Spark meetup会议

w397090770   9年前 (2015-01-31) 3712℃ 0评论4喜欢