flinktutorial's People
Forkers
15367601129 linhongyong cclovezbf zengjiajin wxy7 hioneowner zp315 wolongdedami ximengyun wangqingna gmonkey80 lxyuan8888 fengjunlin aiflyin haizhirun mrdong00 631591678 monkeykinglove cdb156 aiyingyi wyp001 wanglianjing kenwu-github shikgeng cnshao king-linyang sq8852161 bignyy lcy15897679535 moraphie luwang951753 dawoniu1991 mrtanying qq459673705 wayway04123304 wosow annaxu rotcx xdlequ wangpengpeng bangbangyang haiershao constcd aceelong kinoxyz1 edithjtr hhhcommon xuhail sevenfang allen15rg alex-ge123 waynecookie kamiingithub lijixiang123 cutecha phial3 fdyzrz good-man-1998 zhangbaio binyuanc cainrin ken9527just caijiljh lvbuqing kinghuisffff fuanvlflinktutorial's Issues
笔记的问题
武老师,源码中的笔记怎么找不到了
flink自定义udaf实现lag函数的问题,老师帮忙看一下
这是我的代码,不知道为什么就是不走accumulate方法,看老师的视频,自己写的求平均值的方法可以正常运行。请老师有时间帮忙看一下,谢谢!
class PreviousAcc {
var queue: util.LinkedList[Int] = _
}
class PreviousTemp extends AggregateFunction[Int, PreviousAcc] {
override def getValue(accumulator: PreviousAcc): Int = {
System.out.println("进入获取结果方法!!!")
val i1 = accumulator.queue.size()
System.out.println(i1)
accumulator.queue.removeLast()
}
override def createAccumulator(): PreviousAcc = {
System.out.println("进入创建方法!!!")
val value = new PreviousAcc
value.queue = new util.LinkedList[Int]()
value
}
def accumulate(acc: PreviousAcc, value: Int, length: Int): Unit = {
System.out.println("进入计算方法!!!")
acc.queue.addFirst(value)
val size = acc.queue.size
if (size < length) {
for (i <- size until (length + 1)) {
acc.queue.add(0);
}
} else if (size > length) throw new RuntimeException("队列的大小出错了!!")
}
}
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.