chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r789398 - in /hadoop/chukwa/trunk: CHANGES.txt src/java/org/apache/hadoop/chukwa/datacollection/writer/localfs/LocalToRemoteHdfsMover.java
Date Mon, 29 Jun 2009 17:57:37 GMT
Author: asrabkin
Date: Mon Jun 29 17:57:36 2009
New Revision: 789398

URL: http://svn.apache.org/viewvc?rev=789398&view=rev
Log:
CHUKWA-334. Fix LocalHdfsMover exception handling. Contributed by Jerome Boulon.

Modified:
    hadoop/chukwa/trunk/CHANGES.txt
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/localfs/LocalToRemoteHdfsMover.java

Modified: hadoop/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/CHANGES.txt?rev=789398&r1=789397&r2=789398&view=diff
==============================================================================
--- hadoop/chukwa/trunk/CHANGES.txt (original)
+++ hadoop/chukwa/trunk/CHANGES.txt Mon Jun 29 17:57:36 2009
@@ -76,6 +76,8 @@
 
   BUG FIXES
 
+    CHUKWA-334. Fix LocalHdfsMover exception handling. (Jerome Boulon via asrabkin)
+
     CHUKWA-335. Discard meta line in job history file. (Cheng Zhang via asrabkin)
 
     CHUKWA-330. Make separation between fixed adaptor parameters and optional adaptor parameters
for generating adaptor id. (Ari Rabkin via Eric Yang)

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/localfs/LocalToRemoteHdfsMover.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/localfs/LocalToRemoteHdfsMover.java?rev=789398&r1=789397&r2=789398&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/localfs/LocalToRemoteHdfsMover.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/localfs/LocalToRemoteHdfsMover.java
Mon Jun 29 17:57:36 2009
@@ -18,6 +18,7 @@
 
 package org.apache.hadoop.chukwa.datacollection.writer.localfs;
 
+import java.io.FileNotFoundException;
 import java.net.URI;
 import java.util.concurrent.BlockingQueue;
 
@@ -117,7 +118,11 @@
       } else {
         throw new RuntimeException("Cannot rename remote file, " + pRemoteFilePath + " to
" + pFinalRemoteFilePath);
       }
-    }catch (Exception e) {
+    }catch(FileNotFoundException ex) {
+      //do nothing since if the file is no longer there it's
+      // because it has already been moved over by the cleanup task.
+    }
+    catch (Exception e) {
       log.warn("Cannot copy to the remote HDFS",e);
       throw e;
     }
@@ -161,11 +166,10 @@
           cleanup();
           inError = false;
         }
+
+        filePath = fileQueue.take();
         
         if (filePath == null) {
-          filePath = fileQueue.take();
-        }
-        if (filePath == null) {
           continue;
         }
         



Mime
View raw message