chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r776100 - in /hadoop/chukwa/branches/chukwa-0.1: CHANGES.txt src/java/org/apache/hadoop/chukwa/extraction/archive/ChukwaArchiveManager.java
Date Mon, 18 May 2009 21:27:37 GMT
Author: asrabkin
Date: Mon May 18 21:27:36 2009
New Revision: 776100

URL: http://svn.apache.org/viewvc?rev=776100&view=rev
Log:
CHUKWA-238.  Resolve race condition in archiving.

Modified:
    hadoop/chukwa/branches/chukwa-0.1/CHANGES.txt
    hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/extraction/archive/ChukwaArchiveManager.java

Modified: hadoop/chukwa/branches/chukwa-0.1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.1/CHANGES.txt?rev=776100&r1=776099&r2=776100&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.1/CHANGES.txt (original)
+++ hadoop/chukwa/branches/chukwa-0.1/CHANGES.txt Mon May 18 21:27:36 2009
@@ -115,6 +115,8 @@
 
   BUG FIXES
 
+    CHUKWA-238.  Resolve race condition in archiving. (Ari Rabkin)
+
     CHUKWA-243. Set execute permission on bin scripts.  (Ari Rabkin)
 
     CHUKWA-228.  Added rpm.hdfsusage.uid option to run HDFS usage as a separate user. (Cheng
Zhang via Eric Yang)

Modified: hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/extraction/archive/ChukwaArchiveManager.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/extraction/archive/ChukwaArchiveManager.java?rev=776100&r1=776099&r2=776100&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/extraction/archive/ChukwaArchiveManager.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/extraction/archive/ChukwaArchiveManager.java
Mon May 18 21:27:36 2009
@@ -138,7 +138,12 @@
         long now = System.currentTimeMillis();
         int currentDay = Integer.parseInt(day.format(System.currentTimeMillis()));
         FileStatus[] daysInRawArchiveDir = fs.listStatus(pDailyRawArchivesInput);
-       
+        
+        if (daysInRawArchiveDir.length == 0 ) { 
+          log.debug( pDailyRawArchivesInput + " is empty, going to sleep for 1 minute");

+          Thread.sleep(1 * 60 * 1000); 
+          continue; 
+        } 
         // We don't want to process DataSink file more than once every 2 hours
         // for current day
         if (daysInRawArchiveDir.length == 1 ) {



Mime
View raw message