You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ey...@apache.org on 2009/02/27 01:30:55 UTC

svn commit: r748360 - /hadoop/core/trunk/src/contrib/chukwa/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java

Author: eyang
Date: Fri Feb 27 00:30:54 2009
New Revision: 748360

URL: http://svn.apache.org/viewvc?rev=748360&view=rev
Log:
HADOOP-5118.  Reduced the retries to 30 minutes, and 48 retries.

Modified:
    hadoop/core/trunk/src/contrib/chukwa/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java

Modified: hadoop/core/trunk/src/contrib/chukwa/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java?rev=748360&r1=748359&r2=748360&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java (original)
+++ hadoop/core/trunk/src/contrib/chukwa/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java Fri Feb 27 00:30:54 2009
@@ -527,13 +527,17 @@
 
 					  chukwaClientIsNull = false;
 					  
-					  //if they haven't specified, default to retrying every minute for 2 hours
+					  // Watchdog is watching for ChukwaAgent only once every 5 minutes, so there's no point in retrying more than once every 5 mins.
+					  // In practice, if the watchdog is not able to automatically restart the agent, it will take more than 20 minutes to get Ops to restart it.
+					  // Also its a good  to limit the number of communications between Hadoop and Chukwa, that's why 30 minutes.
 					  long retryInterval = chukwaClientConnectRetryInterval;
-					  if (retryInterval == 0)
-						  retryInterval = 1000 * 60;
+					  if (retryInterval == 0) {
+					    retryInterval = 1000 * 60 * 30;
+					  }
 					  long numRetries = chukwaClientConnectNumRetry;
-					  if (numRetries == 0)
-						  numRetries = 120;
+					  if (numRetries == 0) {
+					    numRetries = 48;
+					  }
 					  String log4jFileName = getFile();
 					  String recordType = getRecordType();
 					  long adaptorID = chukwaClient.addFile(recordType, log4jFileName, numRetries, retryInterval);