[ 
https://issues.apache.org/jira/browse/APEXMALHAR-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15310856#comment-15310856
 ] 

ASF GitHub Bot commented on APEXMALHAR-2103:
--------------------------------------------

Github user DT-Priyanka commented on a diff in the pull request:

    
https://github.com/apache/incubator-apex-malhar/pull/300#discussion_r65418498
  
    --- Diff: 
library/src/main/java/com/datatorrent/lib/io/fs/FileSplitterInput.java ---
    @@ -375,11 +375,14 @@ public void run()
                 lastScannedInfo = null;
                 numDiscoveredPerIteration = 0;
                 for (String afile : files) {
    -              String filePath = new File(afile).getAbsolutePath();
    +              Path filePath = new Path(afile);
                   LOG.debug("Scan started for input {}", filePath);
    -              Map<String, Long> lastModifiedTimesForInputDir;
    -              lastModifiedTimesForInputDir = referenceTimes.get(filePath);
    -              scan(new Path(afile), null, lastModifiedTimesForInputDir);
    +              Map<String, Long> lastModifiedTimesForInputDir = null;
    +              if (fs.exists(filePath)) {
    +                FileStatus fileStatus = fs.getFileStatus(filePath);
    +                lastModifiedTimesForInputDir = 
referenceTimes.get(fileStatus.getPath().toUri().getPath());
    --- End diff --
    
    can you use "filePath" instead of fileStatus.getPath().


> scanner issues in FileSplitterInput class
> -----------------------------------------
>
>                 Key: APEXMALHAR-2103
>                 URL: https://issues.apache.org/jira/browse/APEXMALHAR-2103
>             Project: Apache Apex Malhar
>          Issue Type: Bug
>            Reporter: Chaitanya
>            Assignee: Chaitanya
>
> Issue: FileSplitter continuously emitting filemetadata even though there is  
> a single file.
> Observation: For the same file, While updating and accessing the 
> referenceTimes map in FIleSplitterInput and TimeBasedScanner, the Keys are 
> different. Because of this, the oldestTimeModification is always null in 
> TimeBasedScanner.



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

Reply via email to