本项目主要用于我最近写的几篇 《Flink 入门》系列文章的示例工程代码。并不是直接生产可用的代码。
如果你对《Flink 入门》系列比较感兴趣,欢迎关注我的博客:http://wuchong.me/tags/Flink入门/
也可以关注我的个人微信公众号:
本项目主要用于我最近写的几篇 《Flink 入门》系列文章的示例工程代码。并不是直接生产可用的代码。
如果你对《Flink 入门》系列比较感兴趣,欢迎关注我的博客:http://wuchong.me/tags/Flink入门/
也可以关注我的个人微信公众号:
See the following error while running the sample TopNItems
application:
imestampedFileInputSplit cannot be used as a POJO type because not all fields are valid POJO fields, and must be processed as GenericType. Please read the Flink documentation on "Data Types & Serialization"
首先很感谢你写的教程和示范代码!
在HotItems.java中line134,allItems是一个Java List,如果ListState状态中存的商品数目比较大超过Int32时怎么办呢?
在HotItems.java中当点击数量总数少于topSize时,会报数据越界错误
在模拟数据中,当一段时间内的点击数量只有1条,设置的topSize为3时
ItemViewCount currentItem = allItems.get(i); 会数组越界
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at com.app.java.myflink.HotItems$TopNHotItems.onTimer(HotItems.java:140)
at org.apache.flink.streaming.api.operators.KeyedProcessOperator.invokeUserFunction(KeyedProcessOperator.java:94)
at org.apache.flink.streaming.api.operators.KeyedProcessOperator.onEventTime(KeyedProcessOperator.java:72)
at org.apache.flink.streaming.api.operators.InternalTimerServiceImpl.advanceWatermark(InternalTimerServiceImpl.java:251)
at org.apache.flink.streaming.api.operators.InternalTimeServiceManager.advanceWatermark(InternalTimeServiceManager.java:128)
at org.apache.flink.streaming.api.operators.AbstractStreamOperator.processWatermark(AbstractStreamOperator.java:746)
at org.apache.flink.streaming.runtime.io.StreamInputProcessor$ForwardingValveOutputHandler.handleWatermark(StreamInputProcessor.java:262)
... 7 more
我尝试做了如下修改
for (int i=0; i<allItems.size() && i < topSize; i++)
错误描述:经过排查,是在获取执行计划json生成streamgraph出错
出错原因:网上查找资料猜测可能是发生在TimSort排序算法,意思就是比较方法违反约束,传送门
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.