Deepak Narkhede created APEXMALHAR-2312:
-------------------------------------------

             Summary: NullPointerException in FileSplitterInput only if the 
file path is specified for attribute <files> instead of directory path
                 Key: APEXMALHAR-2312
                 URL: https://issues.apache.org/jira/browse/APEXMALHAR-2312
             Project: Apache Apex Malhar
          Issue Type: Bug
            Reporter: Deepak Narkhede
            Assignee: Deepak Narkhede
            Priority: Minor


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.





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to