摘要: 题目 { "A":"a1", "B":"b1", "C":{ "D":"d1", "E":{ "F":{ "G":[{"H":"h1"},{"H":"h2"}] } } } } 输出 A:a1 B:b1 C.D:d1 C.E.F.G[0].H:h1 C.E.F.G[1].H:h2 code def 阅读全文
posted @ 2021-10-09 15:58 一根咸鱼干 阅读(25) 评论(0) 推荐(0) 编辑
摘要: object test { import Breaks.{break, breakable} // def main(args: Array[String]): Unit = { // val a = Array(5, 9, 2, 3, 0, -1) // sort(a, 0, a.length - 阅读全文
posted @ 2021-09-29 11:22 一根咸鱼干 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 《Stream processing with Apache Flink》 读书笔记 第二章 流处理基础 数据分发策略 转发 一对一转发,降低网络IO 广播 一对多广播 按key 按Key值(可能是hash)分发, 说明可以自定义实现range型分发 随机 普通Shuffle 流式处理 流数据定义 阅读全文
posted @ 2021-09-13 13:28 一根咸鱼干 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 计算连续 0_ : 表示按id分组时间排序的行号 1_ : 表示是否符合筛选条件, 例如卖出的钱/和上一条对比卖出的钱是不是2倍? 2_ : 找到连续行的结尾 3_ : 先filter 1_ 2_全是null的行, 用first( , true) 把连续的行分到一个组里. | consumer_id 阅读全文
posted @ 2021-05-11 11:03 一根咸鱼干 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Structured Streaming Load过程 源码 https://blog.csdn.net/u011707542/article/details/82316308 自定义Source Sink https://blog.csdn.net/shirukai/article/details 阅读全文
posted @ 2021-04-28 12:33 一根咸鱼干 阅读(41) 评论(0) 推荐(0) 编辑
摘要: Spark 分区 tag: Spark, Spark Partitioner, Spark Repartition 2021-04-2513:36:44 星期六 version: spark-2.4.5 分区器 自定义key分发的逻辑仅在 RDD 级别适用。 Partitioner 自定义分区器 a 阅读全文
posted @ 2021-04-26 09:29 一根咸鱼干 阅读(90) 评论(0) 推荐(0) 编辑
摘要: #计算Spark StorageMemory Heap内存 tag: Spark, Spark Memory, Spark Storage Memory 2021-04-23 21:26:25 星期五 version: spark-2.4.5 Executor 进程 org.apache.spark 阅读全文
posted @ 2021-04-23 21:20 一根咸鱼干 阅读(488) 评论(0) 推荐(0) 编辑
摘要: Spark版本 1.3 Spark源码 Spark.createTaskScheduler TaskScheduler初始化过程 1.// SparkContext中 /** * Create a task scheduler based on a given master URL. * Return a 2-tuple of the scheduler backend and the ... 阅读全文
posted @ 2018-11-19 20:27 一根咸鱼干 阅读(272) 评论(0) 推荐(0) 编辑
摘要: Spark版本 1.3SparkContext初始化流程 1.0 在我们的主类 main() 方法中经常会这么写 val conf = new SparkConf().setAppName("name").setMaster("local") val sc = new SparkContext(co 阅读全文
posted @ 2018-11-19 13:12 一根咸鱼干 阅读(510) 评论(0) 推荐(0) 编辑
摘要: Spark start-all>> """Master启动流程""" Master类 class Master( host: String, port: Int, webUiPort: Int, val securityMgr: SecurityManager, val conf: SparkConf) extends Actor with Ac... 阅读全文
posted @ 2018-11-18 13:26 一根咸鱼干 阅读(167) 评论(0) 推荐(0) 编辑