摘要: 寻找主要信息:failed to obtain node locks简单理解为:绑定节点失败!!!百度后,好多人同样遇到了这个问题,导致的原因可能是因为之前运行的es还没有正常关闭。第一步:通过命令:ps aux | grep ‘elastic’ 进行查看。如下图:这里写图片描述第二步:通过命令: 阅读全文
posted @ 2019-11-28 15:35 鹦鹉英冠 阅读(1335) 评论(0) 推荐(0)
摘要: join leftOuterjoin rightOuterJoin cogroup scala> var arr = Array(("zhangsan",200),("lisi",300),("wangwu",350)) arr: Array[(String, Int)] = Array((zhan 阅读全文
posted @ 2019-08-06 15:14 鹦鹉英冠 阅读(138) 评论(0) 推荐(0)
摘要: map遍历每一个元素 mapPartitions每次遍历一个分区 foreach action算子 foreachPartitions action算子 collect nginx flume hdfs hbase spark mysql 如果是插入数据,那么foreachPartition比较好, 阅读全文
posted @ 2019-08-06 15:08 鹦鹉英冠 阅读(148) 评论(0) 推荐(0)
摘要: 自定义资源分配 --executor-cores --executor-memory --total-executor-cores 最大允许使用多少核数 3台机器 每个机器8cores 1G --executor-cores --executor-memory --total-executor-co 阅读全文
posted @ 2019-08-06 15:06 鹦鹉英冠 阅读(137) 评论(0) 推荐(0)
摘要: spark得课程体系 sparkcore:spark得核心 sparksql底层使用得是sparkcore将sql解析为core阶段得任务,进行执行 spark-streaming定时执行sparkcore阶段得任务 spark得安装集群模式 spark任务得提交 spark-submit提交一个j 阅读全文
posted @ 2019-08-06 15:04 鹦鹉英冠 阅读(189) 评论(0) 推荐(0)
摘要: 作业 object Test234 { def main(args: Array[String]): Unit = { val data:Iterator[String] = Source.fromFile("app.txt").getLines() val data1:Iterator[((Str 阅读全文
posted @ 2019-08-06 15:00 鹦鹉英冠 阅读(326) 评论(0) 推荐(0)
摘要: option的匹配 val map = Map(("zhangsan",2000),("lisi",2500),("wangwu",3000))val option:Any = map.get("zhangsan")option match { case Some(v) =>println(v) c 阅读全文
posted @ 2019-08-06 14:57 鹦鹉英冠 阅读(142) 评论(0) 推荐(0)
摘要: 辅助构造器的声明 class tobacco(var logo:String,smell:String,price:Double){ var count:Int = _ def this(){ //辅助构造器的第一行内容必须调用构造器 this(logo,smell,price) } def thi 阅读全文
posted @ 2019-08-06 14:56 鹦鹉英冠 阅读(148) 评论(0) 推荐(0)
摘要: 练习 object HomeWorke232424r { def main(args: Array[String]): Unit = { val d1 = Array(("bj", 28.1), ("sh", 28.7), ("gz", 32.0), ("sz", 33.1)) val d2 = A 阅读全文
posted @ 2019-08-06 14:55 鹦鹉英冠 阅读(172) 评论(0) 推荐(0)
摘要: 元组Tuple Array ArrayByfffer List ListBuffer Map HashMap Set scala.collection.mutable._ sorted sortBy sortwith scala> import scala.collection._ import s 阅读全文
posted @ 2019-08-06 14:54 鹦鹉英冠 阅读(166) 评论(0) 推荐(0)