chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r767299 - in /hadoop/chukwa: branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SysLog.java trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SysLog.java
Date Tue, 21 Apr 2009 21:17:41 GMT
Author: eyang
Date: Tue Apr 21 21:17:41 2009
New Revision: 767299

URL: http://svn.apache.org/viewvc?rev=767299&view=rev
Log:
CHUKWA-164.  Use year corresponding to the sender time stamp. (Cheng Zhang via Eric Yang)

Modified:
    hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SysLog.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SysLog.java

Modified: hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SysLog.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SysLog.java?rev=767299&r1=767298&r2=767299&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SysLog.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SysLog.java
Tue Apr 21 21:17:41 2009
@@ -57,6 +57,9 @@
       int year = convertDate.get(Calendar.YEAR);
       convertDate.setTime(d);
       convertDate.set(Calendar.YEAR, year);
+      if(convertDate.getTimeInMillis() > Calendar.getInstance().getTimeInMillis()) {
+        convertDate.set(Calendar.YEAR, year - 1);
+      }
 
       ChukwaRecord record = new ChukwaRecord();
       buildGenericRecord(record, recordEntry, convertDate.getTime().getTime(),

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SysLog.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SysLog.java?rev=767299&r1=767298&r2=767299&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SysLog.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SysLog.java
Tue Apr 21 21:17:41 2009
@@ -57,6 +57,9 @@
       int year = convertDate.get(Calendar.YEAR);
       convertDate.setTime(d);
       convertDate.set(Calendar.YEAR, year);
+      if(convertDate.getTimeInMillis() > Calendar.getInstance().getTimeInMillis()) {
+        convertDate.set(Calendar.YEAR, year - 1);
+      }
 
       ChukwaRecord record = new ChukwaRecord();
       buildGenericRecord(record, recordEntry, convertDate.getTime().getTime(),



Mime
View raw message