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

Storm-HDFS: NPE on empty & stale lock file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 2.0.0, 1.x
    • None
    • storm-hdfs
    • 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

            Unassigned Unassigned
            tibor.kiss@gmail.com Tibor Kiss
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: