上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 29 下一页
该文被密码保护。 阅读全文
posted @ 2016-05-23 13:29 残阳飞雪 阅读(19) 评论(0) 推荐(0) 编辑
摘要: scala> val format = new java.text.SimpleDateFormat("dd-MM-yyyy") 注意MM必须要大写 format: java.text.SimpleDateFormat = java.text.SimpleDateFormat@9586200 scala> format.format(new java.util.Date()) res4: j... 阅读全文
posted @ 2016-05-23 10:17 残阳飞雪 阅读(3990) 评论(0) 推荐(0) 编辑
摘要: 提交代码包 /usr/local/spark/bin$ spark-submit --class "getkv" /data/chun/sparktes.jar 1、查询KV 2、关联MySQL 3 、项目关联活跃用户数 val h=house.toDF().registerTempTable("h 阅读全文
posted @ 2016-05-13 09:31 残阳飞雪 阅读(566) 评论(0) 推荐(0) 编辑
摘要: val n=sqlContext.sql("select count(distinct m.No) from m join l on m.No=l.No where l.date >= '2016-04-25' and l.date<='2016-05-01' ") n.repartition(1) 阅读全文
posted @ 2016-05-06 10:42 残阳飞雪 阅读(600) 评论(0) 推荐(0) 编辑
摘要: 修改分区就行了val rdd1 = sc.parallelize(Array(1,2,3,4,5,6,7,8))# 查看分区数rdd1.partitions.length# 改成1个分区val rdd2 = rdd1.repartition(1)rdd2.partitions.length 阅读全文
posted @ 2016-04-18 10:56 残阳飞雪 阅读(475) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-04-17 13:37 残阳飞雪 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 参考网址 http://stackoverflow.com/questions/33608526/is-there-a-way-to-filter-a-field-not-containing-something-in-a-spark-dataframe-u 阅读全文
posted @ 2016-04-16 17:27 残阳飞雪 阅读(567) 评论(0) 推荐(0) 编辑
摘要: http://snglw.blog.51cto.com/5832405/1634595 阅读全文
posted @ 2016-04-16 11:53 残阳飞雪 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Spark读取日志,统计每个service所用的平均时间 发布时间:2015-12-10 9:54:15来源:分享查询网 获取log日志,每个service以“#*#”开头。统计每个service所需的平均时间。 import java.io.{File, PrintWriter} import o 阅读全文
posted @ 2016-04-12 17:00 残阳飞雪 阅读(1086) 评论(0) 推荐(0) 编辑
摘要: http://homepage.cs.latrobe.edu.au/zhe/ZhenHeSparkRDDAPIExamples.html 阅读全文
posted @ 2016-04-08 15:30 残阳飞雪 阅读(189) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 29 下一页