chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r787434 - in /hadoop/chukwa: branches/chukwa-0.2/ branches/chukwa-0.2/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ trunk/ trunk...
Date Mon, 22 Jun 2009 22:57:54 GMT
Author: eyang
Date: Mon Jun 22 22:57:54 2009
New Revision: 787434

URL: http://svn.apache.org/viewvc?rev=787434&view=rev
Log:
CHUKWA-327. Remove START_TIME="0", FINISH_TIME="0" from JobHistory. (Cheng Zhang via Eric
Yang)

Modified:
    hadoop/chukwa/branches/chukwa-0.2/CHANGES.txt
    hadoop/chukwa/branches/chukwa-0.2/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobLog.java
    hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/TestJobLogEntry.java
    hadoop/chukwa/trunk/CHANGES.txt
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobLog.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/TestJobLogEntry.java

Modified: hadoop/chukwa/branches/chukwa-0.2/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/CHANGES.txt?rev=787434&r1=787433&r2=787434&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/CHANGES.txt (original)
+++ hadoop/chukwa/branches/chukwa-0.2/CHANGES.txt Mon Jun 22 22:57:54 2009
@@ -70,7 +70,9 @@
 
   BUG FIXES
 
-    CHUKWA-327. Removed hourly rolling flag from daily rolling. (Jerome Boulon via Eric Yang)
+    CHUKWA-327. Remove START_TIME="0", FINISH_TIME="0" from JobHistory. (Cheng Zhang via
Eric Yang)
+
+    CHUKWA-325. Removed hourly rolling flag from daily rolling. (Jerome Boulon via Eric Yang)
 
     CHUKWA-324. For 0 matched field, changed MDL to skip empty SQL statement. (Eric Yang)
 

Modified: hadoop/chukwa/branches/chukwa-0.2/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobLog.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobLog.java?rev=787434&r1=787433&r2=787434&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobLog.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobLog.java
Mon Jun 22 22:57:54 2009
@@ -173,10 +173,7 @@
 
 				int pos = pairs[i].lastIndexOf('"');
 				String value = pairs[i].substring(0, pos);
-                                if(key.intern()=="START_TIME".intern() && value.intern()=="0".intern())
{
-                                } else {
-				  put(key, value);
-                                }
+                put(key, value);
 				if(i == (pairs.length-1))
 					break;
 				key = pairs[i].substring(pos + 2);
@@ -203,6 +200,13 @@
 			if(logType.equals("JobData") && get(JobHistory.Keys.FINISH_TIME.toString())!=null)
{
 			  put("JOB_FINAL_STATUS", get("JOB_STATUS"));
 			}
+			
+            for(String timeKey : timestampKeys) {
+                String value = get(timeKey);
+                if(value == null || value.equals("0")) {
+                    remove(timeKey);
+                }
+            }
 		}
 
     public String getLogType() {

Modified: hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/TestJobLogEntry.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/TestJobLogEntry.java?rev=787434&r1=787433&r2=787434&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/TestJobLogEntry.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/TestJobLogEntry.java
Mon Jun 22 22:57:54 2009
@@ -106,7 +106,11 @@
 			}
 			System.out.println(log.getLogType());
 			for(Entry<String, String> entry : log.entrySet()) {
-				System.out.println(entry.getKey() + ": " + entry.getValue());
+				String k = entry.getKey();
+				String v = entry.getValue();
+				System.out.println(k + ": " + v);
+				if(k.equals("START_TIME") || k.equals("FINISH_TIME"))
+					assertTrue(v!=null && !v.equals("0"));
 			}
 			
 			// list all counters for this entry

Modified: hadoop/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/CHANGES.txt?rev=787434&r1=787433&r2=787434&view=diff
==============================================================================
--- hadoop/chukwa/trunk/CHANGES.txt (original)
+++ hadoop/chukwa/trunk/CHANGES.txt Mon Jun 22 22:57:54 2009
@@ -72,7 +72,9 @@
 
   BUG FIXES
 
-    CHUKWA-327. Removed hourly rolling flag from daily rolling. (Jerome Boulon via Eric Yang)
+    CHUKWA-327. Remove START_TIME="0", FINISH_TIME="0" from JobHistory. (Cheng Zhang via
Eric Yang)
+
+    CHUKWA-325. Removed hourly rolling flag from daily rolling. (Jerome Boulon via Eric Yang)
 
     CHUKWA-324. For 0 matched field, changed MDL to skip empty SQL statement. (Eric Yang)
 

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobLog.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobLog.java?rev=787434&r1=787433&r2=787434&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobLog.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobLog.java
Mon Jun 22 22:57:54 2009
@@ -173,10 +173,7 @@
 
 				int pos = pairs[i].lastIndexOf('"');
 				String value = pairs[i].substring(0, pos);
-				if(key.intern()=="START_TIME".intern() && value.intern()=="0".intern()) {
-				} else {
-	                          put(key, value);				  
-				}
+	                        put(key, value);				  
 				if(i == (pairs.length-1))
 					break;
 				key = pairs[i].substring(pos + 2);
@@ -203,6 +200,13 @@
 			if(logType.equals("JobData") && get(JobHistory.Keys.FINISH_TIME.toString())!=null)
{
 			  put("JOB_FINAL_STATUS", get("JOB_STATUS"));
 			}
+			
+            for(String timeKey : timestampKeys) {
+                String value = get(timeKey);
+                if(value == null || value.equals("0")) {
+                    remove(timeKey);
+                }
+            }
 		}
 
     public String getLogType() {

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/TestJobLogEntry.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/TestJobLogEntry.java?rev=787434&r1=787433&r2=787434&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/TestJobLogEntry.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/TestJobLogEntry.java
Mon Jun 22 22:57:54 2009
@@ -106,7 +106,11 @@
 			}
 			System.out.println(log.getLogType());
 			for(Entry<String, String> entry : log.entrySet()) {
-				System.out.println(entry.getKey() + ": " + entry.getValue());
+				String k = entry.getKey();
+				String v = entry.getValue();
+				System.out.println(k + ": " + v);
+				if(k.equals("START_TIME") || k.equals("FINISH_TIME"))
+					assertTrue(v!=null && !v.equals("0"));
 			}
 			
 			// list all counters for this entry



Mime
View raw message