You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pt...@apache.org on 2016/01/15 17:46:08 UTC
[07/24] storm git commit: bug fix in
HdfsUtils.listFilesByModificationTime
bug fix in HdfsUtils.listFilesByModificationTime
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/5793cdd7
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/5793cdd7
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/5793cdd7
Branch: refs/heads/1.x-branch
Commit: 5793cdd779eb6a13aa78e57c751f26cd3a44c5b6
Parents: f927787
Author: Roshan Naik <ro...@hortonworks.com>
Authored: Wed Dec 9 18:16:02 2015 -0800
Committer: Roshan Naik <ro...@hortonworks.com>
Committed: Thu Jan 14 11:34:55 2016 -0800
----------------------------------------------------------------------
.../main/java/org/apache/storm/hdfs/common/HdfsUtils.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/5793cdd7/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/HdfsUtils.java
----------------------------------------------------------------------
diff --git a/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/HdfsUtils.java b/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/HdfsUtils.java
index b8f2715..8fc8b0d 100644
--- a/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/HdfsUtils.java
+++ b/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/HdfsUtils.java
@@ -38,10 +38,13 @@ public class HdfsUtils {
RemoteIterator<LocatedFileStatus> itr = fs.listFiles(directory, false);
while( itr.hasNext() ) {
LocatedFileStatus fileStatus = itr.next();
- if(olderThan>0 && fileStatus.getModificationTime()<olderThan )
- fstats.add(fileStatus);
- else
+ if(olderThan>0) {
+ if( fileStatus.getModificationTime()<olderThan )
+ fstats.add(fileStatus);
+ }
+ else {
fstats.add(fileStatus);
+ }
}
Collections.sort(fstats, new CmpFilesByModificationTime() );