chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r765787 - /hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/datacollection/writer/SeqFileWriter.java
Date Thu, 16 Apr 2009 22:09:28 GMT
Author: eyang
Date: Thu Apr 16 22:09:27 2009
New Revision: 765787

URL: http://svn.apache.org/viewvc?rev=765787&view=rev
Log:
CHUKWA-139. Rewrite collector bail out code.  (Cheng Zhang via Eric Yang)

Modified:
    hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/datacollection/writer/SeqFileWriter.java

Modified: hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/datacollection/writer/SeqFileWriter.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/datacollection/writer/SeqFileWriter.java?rev=765787&r1=765786&r2=765787&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/datacollection/writer/SeqFileWriter.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/datacollection/writer/SeqFileWriter.java
Thu Apr 16 22:09:27 2009
@@ -112,23 +112,14 @@
     try {
       fs = FileSystem.get(new URI(fsname), conf);
       if (fs == null) {
-        log.error("can't connect to HDFS at " + fs.getUri());
-        return;
-      } else
-        log.info("filesystem is " + fs.getUri());
-    } catch (IOException e) {
-      log
-          .error(
-              "can't connect to HDFS, trying default file system instead (likely to be local)",
-              e);
-      try {
-        fs = FileSystem.get(conf);
-      } catch (IOException err) {
-        log.error("can't connect to default file system either", e);
-      }
-    } catch (URISyntaxException e) {
-      log.error("problem generating new URI from config setting");
-      return;
+        log.error("can't connect to HDFS at " + fs.getUri() + " bail out!");
+        DaemonWatcher.bailout(-1);
+      } 
+    } catch (Throwable e) {
+      log.error(
+          "can't connect to HDFS, trying default file system instead (likely to be local)",
+          e);
+      DaemonWatcher.bailout(-1);
     }
 
     // Setup everything by rotating



Mime
View raw message