apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DT-Priyanka <...@git.apache.org>
Subject [GitHub] incubator-apex-malhar pull request #300: APEXMALHAR-2103 Fixed the scanner i...
Date Wed, 01 Jun 2016 18:39:14 GMT
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().


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message