上一页 1 ··· 18 19 20 21 22

2017年11月13日

摘要: Overview Spark Streaming is an extension of the core Spark API that enables scalable, high-throughput, fault-tolerant stream processing of live data s 阅读全文

posted @ 2017-11-13 10:55 打杂滴 阅读(193) 评论(0) 推荐(0) 编辑


2017年11月9日

摘要: scala> val text=spark.read.textFile("/tmp/20171024/tian.txt")text: org.apache.spark.sql.Dataset[String] = [value: string] scala> text.countres0: Long 阅读全文

posted @ 2017-11-09 18:03 打杂滴 阅读(151) 评论(0) 推荐(0) 编辑


2017年11月8日

摘要: 2017-11-09注释:IntelliJ IDEA 2017.2.5 x64 等新版本会安装maven,为了有好的体验 建议在安装目录找到IntelliJ IDEA 2017.2.5\plugins\maven\lib\maven3\conf目录设置 <localRepository>D:\合适的 阅读全文

posted @ 2017-11-08 10:51 打杂滴 阅读(205) 评论(0) 推荐(0) 编辑


2017年11月7日

摘要: http://spark.apache.org/docs/latest/rdd-programming-guide.html The first thing a Spark program must do is to create a SparkContext object, which tells 阅读全文

posted @ 2017-11-07 17:47 打杂滴 阅读(142) 评论(0) 推荐(0) 编辑


2017年11月6日

摘要: RDD,全称为Resilient Distributed Datasets,是一个容错的、并行的数据结构,可以让用户显式地将数据存储到磁盘和内存中,并能控制数据的分区。同时,RDD还提供了一组丰富的操作来操作这些数据。在这些操作中,诸如map、flatMap、filter等转换操作实现了monad模 阅读全文

posted @ 2017-11-06 14:32 打杂滴 阅读(426) 评论(0) 推荐(0) 编辑

摘要: 1.下载 wget https://github.com/sbt/sbt/releases/download/v0.13.15/sbt-0.13.15.tgz 2.安装 tar -zxvf sbt-0.13.15.tgz -C /root/scala/sbt 3.在/root/scala/sbt目录 阅读全文

posted @ 2017-11-06 11:57 打杂滴 阅读(1327) 评论(0) 推荐(0) 编辑


2017年11月3日

摘要: find命令查找某些文件并将其拷贝到指定目录 [root@host lib]# find -name "*hbase*.jar" |xargs -i cp {} /root/aaa/[root@host lib]# find /root/hbase-2.0.0/lib -name "*hbase*. 阅读全文

posted @ 2017-11-03 16:29 打杂滴 阅读(198) 评论(0) 推荐(0) 编辑


2017年11月2日

摘要: 1. 连接mysql 首先需要把mysql-connector-java-5.1.39.jar 拷贝到 spark 的jars目录里面; scala> import org.apache.spark.sql.SQLContextimport org.apache.spark.sql.SQLConte 阅读全文

posted @ 2017-11-02 16:28 打杂滴 阅读(217) 评论(0) 推荐(0) 编辑


2017年10月27日

摘要: spark支持的常见文件格式如下: a56爆大奖在线娱乐,json,CSV,SequenceFiles,Protocol buffers,对象文件 1.a56爆大奖在线娱乐 只需要使用文件路径作为参数调用SparkContext 中的textFile() 函数,就可以读取一个a56爆大奖在线娱乐文件; scala> val lines=sc.te 阅读全文

posted @ 2017-10-27 15:11 打杂滴 阅读(2562) 评论(0) 推荐(0) 编辑


2017年10月18日

摘要: combineByKey( createCombiner,mergeValue,mergeCombiners,partitioner) combineByKey() 是最为常用的基于键进行聚合的函数。大多数基于键聚合的函数都是用它实现的,如 groupByKey,reduceByKey等等。和agg 阅读全文

posted @ 2017-10-18 16:05 打杂滴 阅读(306) 评论(0) 推荐(0) 编辑


上一页 1 ··· 18 19 20 21 22

Copyright © 2024 打杂滴
Powered by .NET 8.0 on Kubernetes