You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "Tibor Kiss (JIRA)" <ji...@apache.org> on 2017/02/12 12:39:41 UTC

[jira] [Updated] (STORM-2356) Storm-HDFS: NPE on empty & stale lock file

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

Tibor Kiss updated STORM-2356:
------------------------------
    Issue Type: Bug  (was: New Feature)

> 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
>            Assignee: 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)