上一页 1 2 3 4 5 6 ··· 29 下一页
摘要: spark07 spark运行原理: RDD Object driver提交代码,spark-submit运行main方法。但是没有真正执行,初始化driver端得组件DAGScheduler TaskScheduler SchedulerBackEnd.saveAsTextFile出发,DAGSc 阅读全文
posted @ 2019-09-16 17:13 lilixia 阅读(133) 评论(0) 推荐(0) 编辑
摘要: spark06 总共提交的任务分为四个阶段,提交+执行 从spark-submit开始,剖析所有的运行流行(重点,重点,重点) spark-submit方法的时候,SparkSubmit 类 spark-submit --master xxx --class xxx --name xxx xxx.j 阅读全文
posted @ 2019-09-16 15:10 lilixia 阅读(231) 评论(0) 推荐(0) 编辑
摘要: spark05 def main(args: Array[String]): Unit = { //每个用户最喜欢得电影类型 //观看量 评分得平均值 val conf = new SparkConf() conf.setMaster("local[*]") conf.setAppName("mov 阅读全文
posted @ 2019-09-16 15:04 lilixia 阅读(208) 评论(0) 推荐(0) 编辑
摘要: spark04 join leftOuterjoin rightOuterJoin cogroup scala> var arr = Array(("zhangsan",200),("lisi",300),("wangwu",350)) arr: Array[(String, Int)] = Arr 阅读全文
posted @ 2019-09-16 14:58 lilixia 阅读(198) 评论(0) 推荐(0) 编辑
摘要: spark03 map遍历每一个元素 mapPartitions每次遍历一个分区 foreach action算子 foreachPartitions action算子 collect nginx flume hdfs hbase spark mysql 如果是插入数据,那么foreachParti 阅读全文
posted @ 2019-09-16 14:49 lilixia 阅读(197) 评论(0) 推荐(0) 编辑
摘要: spark02 自定义资源分配 --executor-cores --executor-memory --total-executor-cores 最大允许使用多少核数 3台机器 每个机器8cores 1G --executor-cores --executor-memory --total-exe 阅读全文
posted @ 2019-09-16 14:47 lilixia 阅读(243) 评论(0) 推荐(0) 编辑
摘要: spark01 spark的特点 搭建spark的集群 提交spark的任务 spark的运行机制 spark wordcount spark的官网spark.apache.org spark运行速度比较快:因为使用内存 mr存在昂贵的shuffle mr 只有两个算子 (map reduce)*N 阅读全文
posted @ 2019-09-16 14:41 lilixia 阅读(223) 评论(0) 推荐(0) 编辑
摘要: object Test234 { def main(args: Array[String]): Unit = { val data:Iterator[String] = Source.fromFile("app.txt").getLines() val data1:Iterator[((String 阅读全文
posted @ 2019-09-16 14:36 lilixia 阅读(267) 评论(0) 推荐(0) 编辑
摘要: scala05课件 辅助构造器的声明 class tobacco(var logo:String,smell:String,price:Double){ var count:Int = _ def this(){ //辅助构造器的第一行内容必须调用构造器 this(logo,smell,price) 阅读全文
posted @ 2019-09-16 14:32 lilixia 阅读(171) 评论(0) 推荐(0) 编辑
摘要: scala06 option的匹配 val map = Map(("zhangsan",2000),("lisi",2500),("wangwu",3000))val option:Any = map.get("zhangsan")option match { case Some(v) =>prin 阅读全文
posted @ 2019-09-16 14:32 lilixia 阅读(113) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 29 下一页