[ 
https://issues.apache.org/jira/browse/STORM-2356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tibor Kiss reassigned STORM-2356:
---------------------------------

    Assignee:     (was: Tibor Kiss)

> Storm-HDFS: NPE on empty & stale lock file
> ------------------------------------------
>
>                 Key: STORM-2356
>                 URL: https://issues.apache.org/jira/browse/STORM-2356
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-hdfs
>    Affects Versions: 2.0.0, 1.x
>            Reporter: Tibor Kiss
>
> In HDFSSpout a NPE can occur if a stale lock file is empty.
> {{LogEntry.deserialize}} tries to split the line by colons.
> If the line is null, the split will cause a NPE:
> https://github.com/apache/storm/blob/master/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/spout/FileLock.java#L179
> Moreover the callee of {{getLastEntry}} is also mishandling empty log files.
> The {{lastEntry.eventTime}} could also cause a NPE if the above scenario is 
> passed and the log file is empty:
> https://github.com/apache/storm/blob/master/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/spout/FileLock.java#L149-L160



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to