当前位置:网站首页>Double type nullpointexception in Flink flow calculation
Double type nullpointexception in Flink flow calculation
2022-07-29 04:51:00 【Bitter and sweet】
Flink In calculation Double How about type data Filter Filter , Use window operator function NullPointException Null pointer exception , What's going on ?
2022-05-19 09:44:22,587 WARN org.apache.flink.runtime.taskmanager.Task [] - Window(TumblingEventTimeWindows(600000), EventTimeTrigger, AggregateFunction$5, PassThroughWindowFunction) (1/1)#0 (2de98fdf39aaa5e7fb973e0b4ee0168d) switched from RUNNING to FAILED with failure cause: java.io.IOException: Exception while applying AggregateFunction in aggregating state
at org.apache.flink.runtime.state.heap.HeapAggregatingState.add(HeapAggregatingState.java:107)
at org.apache.flink.streaming.runtime.operators.windowing.WindowOperator.processElement(WindowOperator.java:413)
at org.apache.flink.streaming.runtime.tasks.OneInputStreamTask$StreamTaskNetworkOutput.emitRecord(OneInputStreamTask.java:233)
at org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput.processElement(AbstractStreamTaskNetworkInput.java:134)
at org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput.emitNext(AbstractStreamTaskNetworkInput.java:105)
at org.apache.flink.streaming.runtime.io.StreamOneInputProcessor.processInput(StreamOneInputProcessor.java:65)
at org.apache.flink.streaming.runtime.tasks.StreamTask.processInput(StreamTask.java:496)
at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:203)
at org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:809)
at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:761)
at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958)
at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:937)
at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:766)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at com.chnenergy.provider.flink.FanDataFlink$5.add(FanDataFlink.java:224)
at com.chnenergy.provider.flink.FanDataFlink$5.add(FanDataFlink.java:200)
at org.apache.flink.runtime.state.heap.HeapAggregatingState$AggregateTransformation.apply(HeapAggregatingState.java:135)
at org.apache.flink.runtime.state.heap.CopyOnWriteStateMap.transform(CopyOnWriteStateMap.java:373)
at org.apache.flink.runtime.state.heap.StateTable.transform(StateTable.java:211)
at org.apache.flink.runtime.state.heap.HeapAggregatingState.add(HeapAggregatingState.java:105)
... 14 more
Stream data Double Type data can be transferred to 'NaN', stay Java in double as well as Double All can be received 'NaN' data , And don't throw exceptions , It is different from NULL; But the data flows into Flink Of windows window , When calculating data, this Double The value of the data will become null; So , Need to be in Filter Data cleaning and filtering , Filter it out ; The correct filtering posture is like this :
.filter((item)-> {// Abnormal data cleaning
if (item==null) return false;
Double mvalue = item.getMvalue();
if (mvalue == null || mvalue.equals(Double.NaN)){
return false;
}
return true;
}
);
边栏推荐
- Corresponding order of 18 and 25coco data of openpose and joint points
- The most complete NLP Chinese and English stop words list in the whole station (including punctuation marks, which can be copied directly)
- Box horizontal vertical center layout (summary)
- [QT learning notes] * insert pictures in the window
- Google browser opens the web page and out of memory appears
- UE 在场景或UMG中播放视频
- 在线教育的推荐系统
- Recommendation system of online education
- Various configurations when pulsar starts the client (client, producer, consumer)
- Pycharm reports an error when connecting to the virtual machine database
猜你喜欢
Several simple and difficult OJ problems with sequential force deduction
Data Lake: spark, a distributed open source processing engine
Configure st-gcn environment record [Google lab]
Climbing the pit of traffic flow prediction (II): the simplest LSTM predicts traffic flow using tensorflow2
Delete blank pages in word documents
荣耀2023内推,内推码ambubk
C language implementation of three chess
[QT learning notes] * insert pictures in the window
IOS interview preparation - Online
Mysql各版本下载地址及多版本共存安装
随机推荐
VScode配置makefile编译
EMI interference troubleshooting with near-field probe and current probe
2022杭电多校联赛第四场 题解
Reveal安装配置调试
[c language] PTA 7-50 output Fahrenheit Celsius temperature conversion table
Pyqt5 learning pit encounter and pit drainage (3) background picture coverage button style and check button status
C language implementation of three chess
Use of construction methods
Simple user-defined authentication interface rules
Classes and objects (II)
Google browser opens the web page and out of memory appears
Download addresses of various versions of MySQL and multi version coexistence installation
Conv2d of torch
After the spinning up installation is completed, use the tutorial to test whether it is successful. There are library "Glu" not found and 'from pyglet.gl import * error solutions
EF core: one to one, many to many configuration
File operation (Advanced C language)
Makefile+make Basics
安装spinning up教程里与mujoco对应的gym,报错mjpro150
Learn matlab to draw geographical map, line scatter bubble density map
[express connection to MySQL database]