chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r793409 - in /hadoop/chukwa/trunk: CHANGES.txt src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ClientTraceProcessor.java src/java/org/apache/hadoop/chukwa/extraction/demux/processor/reducer/ClientTrace.java
Date Sun, 12 Jul 2009 21:12:08 GMT
Author: asrabkin
Date: Sun Jul 12 21:12:08 2009
New Revision: 793409

URL: http://svn.apache.org/viewvc?rev=793409&view=rev
Log:
CHUKWA-282. Demux should output detailed per-operation ClientTrace records.  Contributed by
Jiaqi Tan.

Modified:
    hadoop/chukwa/trunk/CHANGES.txt
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ClientTraceProcessor.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/reducer/ClientTrace.java

Modified: hadoop/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/CHANGES.txt?rev=793409&r1=793408&r2=793409&view=diff
==============================================================================
--- hadoop/chukwa/trunk/CHANGES.txt (original)
+++ hadoop/chukwa/trunk/CHANGES.txt Sun Jul 12 21:12:08 2009
@@ -34,6 +34,8 @@
 
   IMPROVEMENTS
 
+    CHUKWA-282. Demux should output detailed per-operation ClientTrace records (Jiaqi Tan
via asrabkin)
+
     CHUKWA-341. Heap space in HICC Jetty is configurable. (Jiaqi Tan via asrabkin)
 
     CHUKWA-284.  Checkpoint includes last byte Acked, not sent. (asrabkin)

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ClientTraceProcessor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ClientTraceProcessor.java?rev=793409&r1=793408&r2=793409&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ClientTraceProcessor.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ClientTraceProcessor.java
Sun Jul 12 21:12:08 2009
@@ -100,8 +100,10 @@
     try {
       idMatcher.reset(recordEntry);
       long ms;
+      long ms_fullresolution;
       if (idMatcher.find()) {
         ms = sdf.parse(idMatcher.group(1)).getTime();
+        ms_fullresolution = ms;
       } else {
         throw new IOException("Could not find date/source");
       }
@@ -129,6 +131,7 @@
       rec.add(Record.tagsField, chunk.getTags());
       rec.add(Record.sourceField, chunk.getSource());
       rec.add(Record.applicationField, chunk.getApplication());
+      rec.add("actual_time",(new Long(ms_fullresolution)).toString());
       output.collect(key, rec);
 
     } catch (ParseException e) {

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/reducer/ClientTrace.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/reducer/ClientTrace.java?rev=793409&r1=793408&r2=793409&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/reducer/ClientTrace.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/reducer/ClientTrace.java
Sun Jul 12 21:12:08 2009
@@ -53,8 +53,19 @@
       long bytes = 0L;
       ChukwaRecord rec = null;
       while (values.hasNext()) {
+        /* aggregate bytes for current key */
         rec = values.next();
         bytes += Long.valueOf(rec.getValue("bytes"));
+        
+        /* output raw values to different data type for uses which
+         * require detailed per-operation data */
+        ChukwaRecordKey detailed_key = new ChukwaRecordKey();
+        String [] k = key.getKey().split("/");
+        String full_timestamp = null;
+        full_timestamp = rec.getValue("actual_time");
+        detailed_key.setReduceType("ClientTraceDetailed");
+        detailed_key.setKey(k[0]+"/"+k[1]+"_"+k[2]+"/"+full_timestamp);
+        output.collect(detailed_key, rec);
       }
       if (null == rec) {
         return;



Mime
View raw message