chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r803772 - /hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/archive/SinkArchiver.java
Date Thu, 13 Aug 2009 04:16:04 GMT
Author: asrabkin
Date: Thu Aug 13 04:16:04 2009
New Revision: 803772

URL: http://svn.apache.org/viewvc?rev=803772&view=rev
Log:
CHUKWA-354. Corner case in archiver

Modified:
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/archive/SinkArchiver.java

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/archive/SinkArchiver.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/archive/SinkArchiver.java?rev=803772&r1=803771&r2=803772&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/archive/SinkArchiver.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/archive/SinkArchiver.java
Thu Aug 13 04:16:04 2009
@@ -41,7 +41,7 @@
  */
 public class SinkArchiver implements CHUKWA_CONSTANT {
   
-  final private static PathFilter DATA_SINK_FILTER = new PathFilter() {
+  final public static PathFilter DATA_SINK_FILTER = new PathFilter() {
     public boolean accept(Path file) {
       return file.getName().endsWith(".done");
     }     
@@ -91,7 +91,8 @@
         fs.mkdirs(pMRInputDir);
       
       Path pOutputDir = new Path(archivesMROutputDir);
-      
+      if(fs.listStatus(pOutputDir).length == 0)
+        fs.delete(pOutputDir, true);
       Path archive = new Path(chukwaRootDir + "archive");
       
       selectInputs(fs, pSource, pMRInputDir);



Mime
View raw message