当前位置:网站首页>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;
}
);
边栏推荐
- Actual combat of flutter - DIO of request encapsulation (II)
- Opencv environment construction
- Box horizontal vertical center layout (summary)
- GCC Basics
- Numpy basic learning
- 手机工作室网络如何组建?
- 安装spinning up教程里与mujoco对应的gym,报错mjpro150
- Improve the readability of your regular expressions a hundred times
- Configure st-gcn environment record [Google lab]
- Oracle insert data
猜你喜欢
[QT learning notes] * insert pictures in the window
(heap sort) heap sort is super detailed, I don't believe you can't (C language code implementation)
ios面试准备 - 网络篇
Pycharm reports an error when connecting to the virtual machine database
央企建筑企业数字化转型核心特征是什么?
1 sentence of code, get asp Net core binds multiple sources to the same class
荣耀2023内推,内推码ambubk
Recommendation system of online education
Use more flexible and convenient Rogowski coil
Solution to the fourth game of 2022 Hangzhou Electric Multi school league
随机推荐
软件测试面试题(四)
如何避免示波器电流探头损坏
Leetcode 763. partition labels divide alphabetic intervals (medium)
IOS interview preparation - other articles
Star a pathfinding in LAYA
Classes and objects (II)
ios面试准备 - objective-c篇
EMI interference troubleshooting with near-field probe and current probe
Oracle insert data
Ethernet of network
2022杭电多校联赛第四场 题解
Simply change the picture color
Opencv learning 1 (environment configuration)
Academic | [latex] super detailed texlive2022+tex studio download installation configuration
Classes and objects (I)
OpenCV环境搭建
Install the gym corresponding to mujoco in the spinning up tutorial, and the error mjpro150 is reported
Climbing the pit of traffic flow prediction (III): using pytorch to realize LSTM to predict traffic flow
Makefile+Make基础知识
STL source code analysis (Hou Jie) notes -- Classification and testing of stl containers