[GitHub] incubator-apex-malhar pull request: APEXMALHAR-2103 Fixed the scan...

2016-05-29 Thread chaithu14
Github user chaithu14 commented on a diff in the pull request:


https://github.com/apache/incubator-apex-malhar/pull/300#discussion_r65023670
  
--- Diff: 
library/src/main/java/com/datatorrent/lib/io/fs/FileSplitterInput.java ---
@@ -375,11 +374,11 @@ public void run()
 lastScannedInfo = null;
 numDiscoveredPerIteration = 0;
 for (String afile : files) {
-  String filePath = new File(afile).getAbsolutePath();
-  LOG.debug("Scan started for input {}", filePath);
+  Path filePath = new Path(afile);
+  LOG.debug("Scan started for input {}", filePath.toString());
--- End diff --

Yeah. afile and filePath.toString() represents the same value.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-apex-malhar pull request: APEXMALHAR-2103 Fixed the scan...

2016-05-29 Thread chaithu14
Github user chaithu14 commented on a diff in the pull request:


https://github.com/apache/incubator-apex-malhar/pull/300#discussion_r65023539
  
--- Diff: 
library/src/main/java/com/datatorrent/lib/io/fs/FileSplitterInput.java ---
@@ -375,11 +374,11 @@ public void run()
 lastScannedInfo = null;
 numDiscoveredPerIteration = 0;
 for (String afile : files) {
-  String filePath = new File(afile).getAbsolutePath();
-  LOG.debug("Scan started for input {}", filePath);
+  Path filePath = new Path(afile);
+  LOG.debug("Scan started for input {}", filePath.toString());
   Map lastModifiedTimesForInputDir;
-  lastModifiedTimesForInputDir = referenceTimes.get(filePath);
-  scan(new Path(afile), null, lastModifiedTimesForInputDir);
+  lastModifiedTimesForInputDir = 
referenceTimes.get(fs.getFileStatus(filePath).getPath().toString());
--- End diff --

No. In case of LocalFileSystem, if the filePath consists of relative path 
then again the keys are different. 
Setting the directory path in createScannedFileInfo() and accessing the 
value from referenceTimes must be sync.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-apex-malhar pull request: APEXMALHAR-2103 Fixed the scan...

2016-05-27 Thread gauravgopi123
Github user gauravgopi123 commented on a diff in the pull request:


https://github.com/apache/incubator-apex-malhar/pull/300#discussion_r64951249
  
--- Diff: 
library/src/main/java/com/datatorrent/lib/io/fs/FileSplitterInput.java ---
@@ -375,11 +374,11 @@ public void run()
 lastScannedInfo = null;
 numDiscoveredPerIteration = 0;
 for (String afile : files) {
-  String filePath = new File(afile).getAbsolutePath();
-  LOG.debug("Scan started for input {}", filePath);
+  Path filePath = new Path(afile);
+  LOG.debug("Scan started for input {}", filePath.toString());
   Map lastModifiedTimesForInputDir;
-  lastModifiedTimesForInputDir = referenceTimes.get(filePath);
-  scan(new Path(afile), null, lastModifiedTimesForInputDir);
+  lastModifiedTimesForInputDir = 
referenceTimes.get(fs.getFileStatus(filePath).getPath().toString());
--- End diff --

can filePath.toString() be used here?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-apex-malhar pull request: APEXMALHAR-2103 Fixed the scan...

2016-05-27 Thread gauravgopi123
Github user gauravgopi123 commented on a diff in the pull request:


https://github.com/apache/incubator-apex-malhar/pull/300#discussion_r64950338
  
--- Diff: 
library/src/main/java/com/datatorrent/lib/io/fs/FileSplitterInput.java ---
@@ -375,11 +374,11 @@ public void run()
 lastScannedInfo = null;
 numDiscoveredPerIteration = 0;
 for (String afile : files) {
-  String filePath = new File(afile).getAbsolutePath();
-  LOG.debug("Scan started for input {}", filePath);
+  Path filePath = new Path(afile);
+  LOG.debug("Scan started for input {}", filePath.toString());
--- End diff --

toString() not required


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-apex-malhar pull request: APEXMALHAR-2103 Fixed the scan...

2016-05-27 Thread chaithu14
GitHub user chaithu14 opened a pull request:

https://github.com/apache/incubator-apex-malhar/pull/300

APEXMALHAR-2103 Fixed the scanner issue in FileSplitterInput Class



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/chaithu14/incubator-apex-malhar 
APEXMALHAR-2103-ScannerIssue

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-apex-malhar/pull/300.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #300


commit 23e91ea0308721585bbdab007bad7adea4592796
Author: Chaitanya 
Date:   2016-05-27T09:53:05Z

APEXMALHAR-2103 Fixed the scanner issue in FileSplitterInput Class




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-apex-malhar pull request: APEXMALHAR-2103 Fixed the scan...

2016-05-27 Thread chaithu14
Github user chaithu14 closed the pull request at:

https://github.com/apache/incubator-apex-malhar/pull/299


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-apex-malhar pull request: APEXMALHAR-2103 Fixed the scan...

2016-05-27 Thread chaithu14
GitHub user chaithu14 opened a pull request:

https://github.com/apache/incubator-apex-malhar/pull/299

APEXMALHAR-2103 Fixed the scanner issue in FileSplitterInput Class



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/chaithu14/incubator-apex-malhar 
APEXMALHAR-2103-ScannerIssue

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-apex-malhar/pull/299.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #299


commit 94d01fd5a264684f6b372600a92c1c7d20b12537
Author: Chaitanya 
Date:   2016-05-27T06:40:48Z

APEXMALHAR-2103 Fixed the scanner issue in FileSplitterInput Class




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---