摘要: Accumulator简介 Accumulator是spark提供的累加器,顾名思义,该变量只能够增加。 只有driver能获取到Accumulator的值(使用value方法),Task只能对其做增加操作(使用 +=)。你也可以在为Accumulator命名(不支持Python),这样就会在spa 阅读全文
posted @ 2017-08-26 22:28 牵牛花 阅读(834) 评论(0) 推荐(0)
摘要: http://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.Accumulator 阅读全文
posted @ 2017-08-26 21:38 牵牛花 阅读(264) 评论(0) 推荐(0)
摘要: 阿斯蒂芬 阅读全文
posted @ 2017-08-26 17:50 牵牛花 阅读(845) 评论(0) 推荐(0)
摘要: 场景描述,在hive中需要一张中间表,比如一个已知设备库,但是随着用户的增加,设备库是要数据量谁要增加的,(insert新的数据,保留已有的数据).然后在业务中使用 解决方案,第一次create select ,之后每次都 insert into select ,这是select 的就很关键,这个s 阅读全文
posted @ 2017-08-26 17:08 牵牛花 阅读(304) 评论(0) 推荐(0)
摘要: java获取当月的第一天和最后一天,获取本周的第一天和最后一天 使用场景,计算日活跃,周活跃,月活跃是的日期计算 阅读全文
posted @ 2017-08-26 14:58 牵牛花 阅读(16356) 评论(0) 推荐(0)
摘要: 以上对long类型数据的累加,double类型的数据累加是将double类型*10000,这样将double转成一个long类型的数字进行累加,使用这种方法时要注意控制double类型数据的精度 阅读全文
posted @ 2017-08-26 14:34 牵牛花 阅读(1104) 评论(0) 推荐(0)