hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1077709 - /hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JvmManager.java
Date Fri, 04 Mar 2011 04:46:52 GMT
Author: omalley
Date: Fri Mar  4 04:46:52 2011
New Revision: 1077709

URL: http://svn.apache.org/viewvc?rev=1077709&view=rev
Log:
commit 118927ae78bdef777af857bbe48a165020acf577
Author: Chris Douglas <cdouglas@apache.org>
Date:   Sun Sep 19 21:14:09 2010 -0700

    Fix bug where disabled log trunc (eq -1) always attempts to delete log dir

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JvmManager.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JvmManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JvmManager.java?rev=1077709&r1=1077708&r2=1077709&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JvmManager.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JvmManager.java
Fri Mar  4 04:46:52 2011
@@ -185,8 +185,8 @@ class JvmManager {
     File logdir = TaskLog.getAttemptDir(firstTask.getTaskID(), 
         firstTask.isTaskCleanupTask());
     //allow for 10% over the limit
-    if (FileUtil.getDU(logdir) >
-        (1.1 * tracker.getRetainSize(firstTask.getTaskID()))){
+    final long retainSize = tracker.getRetainSize(firstTask.getTaskID());
+    if (retainSize >= 0 && FileUtil.getDU(logdir) > (1.1 * retainSize)){
       LOG.info("Deleting user log path since the amount of data in the logs" +
       		" exceeded the allowed " +
       		"log limits " + logdir);



Mime
View raw message