Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-2356

Storm-HDFS: NPE on empty & stale lock file

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0, 1.x
    • Fix Version/s: None
    • Component/s: storm-hdfs
    • Labels:
      None

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tibor.kiss@gmail.com Tibor Kiss
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: