flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ZhengBowen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-3685) Logical error in code for DateSerializer deserialize with reuse
Date Tue, 05 Apr 2016 02:38:25 GMT

    [ https://issues.apache.org/jira/browse/FLINK-3685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15225550#comment-15225550
] 

ZhengBowen commented on FLINK-3685:
-----------------------------------

Hi,Robert:
Yes,I see the failure related to this. 
```
[2016-04-05 10:34:47,872] INFO  [flink-akka.actor.default-dispatcher-3 Thread] org.apache.flink.runtime.jobmanager.JobManager
               - Status of job f53e3c25e14d9b5b45883441c229475c (Flink Java Job at Tue Apr
05 10:34:44 CST 2016) changed to FAILED.
java.lang.RuntimeException: Error obtaining the sorted input: Thread 'SortMerger Reading Thread'
terminated due to an exception: null
	at org.apache.flink.runtime.operators.sort.UnilateralSortMerger.getIterator(UnilateralSortMerger.java:619)
	at org.apache.flink.runtime.operators.BatchTask.getInput(BatchTask.java:1079)
	at org.apache.flink.runtime.operators.NoOpDriver.run(NoOpDriver.java:78)
	at org.apache.flink.runtime.operators.BatchTask.run(BatchTask.java:480)
	at org.apache.flink.runtime.operators.BatchTask.invoke(BatchTask.java:345)
	at org.apache.flink.runtime.taskmanager.Task.run(Task.java:559)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Thread 'SortMerger Reading Thread' terminated due to an exception:
null
	at org.apache.flink.runtime.operators.sort.UnilateralSortMerger$ThreadBase.run(UnilateralSortMerger.java:799)
Caused by: java.lang.NullPointerException
	at org.apache.flink.api.common.typeutils.base.DateSerializer.deserialize(DateSerializer.java:93)
	at org.apache.flink.api.common.typeutils.base.DateSerializer.deserialize(DateSerializer.java:28)
	at org.apache.flink.api.java.typeutils.runtime.TupleSerializer.deserialize(TupleSerializer.java:144)
	at org.apache.flink.api.java.typeutils.runtime.TupleSerializer.deserialize(TupleSerializer.java:30)
	at org.apache.flink.runtime.plugable.ReusingDeserializationDelegate.read(ReusingDeserializationDelegate.java:57)
	at org.apache.flink.runtime.io.network.api.serialization.SpillingAdaptiveSpanningRecordDeserializer.getNextRecord(SpillingAdaptiveSpanningRecordDeserializer.java:124)
	at org.apache.flink.runtime.io.network.api.reader.AbstractRecordReader.getNextRecord(AbstractRecordReader.java:65)
	at org.apache.flink.runtime.io.network.api.reader.MutableRecordReader.next(MutableRecordReader.java:34)
	at org.apache.flink.runtime.operators.util.ReaderIterator.next(ReaderIterator.java:59)
	at org.apache.flink.runtime.operators.sort.UnilateralSortMerger$ReadingThread.go(UnilateralSortMerger.java:1035)
	at org.apache.flink.runtime.operators.sort.UnilateralSortMerger$ThreadBase.run(UnilateralSortMerger.java:796)
```

> Logical error in code for DateSerializer deserialize with reuse
> ---------------------------------------------------------------
>
>                 Key: FLINK-3685
>                 URL: https://issues.apache.org/jira/browse/FLINK-3685
>             Project: Flink
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>            Reporter: ZhengBowen
>
> There is a logical error in the following function in DateSerializer.java when source
read '-1'
> function is:
> ```
> public Date deserialize(Date reuse, DataInputView source) throws IOException {
> 	long v = source.readLong();
> 	if(v == -1L) {
> 		return null;
> 	}
> 	reuse.setTime(v);
> 	return reuse;
> }
> ```
> when call this function for first time, if return null, then 'reuse' will be set null
by caller;
> when call this function for second time,if 'v!=-1' ,reuse.setTime(v) will throw NPE.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message