Uploaded image for project: 'Apache Apex Malhar'
  1. Apache Apex Malhar
  2. APEXMALHAR-2312

NullPointerException in FileSplitterInput when file path is specified

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 3.6.0
    • None
    • None

    Description

      Problem Statement:
      ==================
      NullPointerException seen in FileSplitterInput only if the file path is specified for attribute <files> instead of directory path.

      Description:
      ===========
      1) TimeBasedDirectoryScanner threads part of scanservice tries to scan the directories/files.
      2) Each thread checks with help of isIterationCompleted() [referenceTimes] method whether scanned of last iteration are processed by operator thread.
      3) Previously it used to work because HashMap (referenceTimes) used to return null even if last scanned directory path is null.
      4) Recently referenceTimes is changed to ConcurrentHashMap, so get() doesn't allow null key's passed to ConcurrentHashMap get() method.
      5) Hence NullPointerException is seen as if only file path is provided directory path would be empty hence key would be empty.

      Solution:
      ========
      Pre-check that directory path is null then we have completed last iterations if only filepath is provided.

      Attachments

        Issue Links

          Activity

            People

              deepak-narkhede Deepak Narkhede
              deepak-narkhede Deepak Narkhede
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: