chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r832857 - in /hadoop/chukwa/trunk: ./ src/java/org/apache/hadoop/chukwa/ src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ src/java/org/apache/hadoop/chukwa/util/ src/test/org/apache/hadoop/chukwa/datacollection/writer/ s...
Date Wed, 04 Nov 2009 19:41:42 GMT
Author: asrabkin
Date: Wed Nov  4 19:41:41 2009
New Revision: 832857

URL: http://svn.apache.org/viewvc?rev=832857&view=rev
Log:
CHUKWA-345. Remove redundant 'application' field from Chunk API.

Modified:
    hadoop/chukwa/trunk/CHANGES.txt
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/Chunk.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/ChunkImpl.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/AbstractProcessor.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ChunkSaver.java
    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/mapper/JobConfProcessor.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/DumpArchive.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/writer/TestChukwaWriters.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/validationframework/interceptor/ChunkDumper.java

Modified: hadoop/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/CHANGES.txt?rev=832857&r1=832856&r2=832857&view=diff
==============================================================================
--- hadoop/chukwa/trunk/CHANGES.txt (original)
+++ hadoop/chukwa/trunk/CHANGES.txt Wed Nov  4 19:41:41 2009
@@ -8,6 +8,8 @@
  
    IMPROVEMENTS
 
+    CHUKWA-345. Remove redundant 'application' field from Chunk API. (asrabkin)
+
     CHUKWA-409. Make SocketTeeWriter work in single-stage pipeline. (Thushara Wijeratna via
asrabkin)
 
     CHUKWA-408. Add optional metadata to real-time feed. (asrabkin)

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/Chunk.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/Chunk.java?rev=832857&r1=832856&r2=832857&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/Chunk.java (original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/Chunk.java Wed Nov  4 19:41:41 2009
@@ -44,11 +44,7 @@
   public String getStreamName();
 
   public void setStreamName(String streamName);
-
-  public String getApplication();
-
-  public void setApplication(String a);
-
+  
   // These describe the format of the data buffer
   public String getDataType();
 

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/ChunkImpl.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/ChunkImpl.java?rev=832857&r1=832856&r2=832857&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/ChunkImpl.java (original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/ChunkImpl.java Wed Nov  4 19:41:41
2009
@@ -35,7 +35,7 @@
 
   protected DataFactory dataFactory = DataFactory.getInstance();
   private String source = "";
-  private String application = "";
+  private String streamName = "";
   private String dataType = "";
   private String tags = "";
   private byte[] data = null;
@@ -72,7 +72,7 @@
     this.seqID = seq;
     this.source = localHostAddr;
     this.tags = dataFactory.getDefaultTags();
-    this.application = streamName;
+    this.streamName = streamName;
     this.dataType = dataType;
     this.data = data;
     this.initiator = source;
@@ -96,11 +96,11 @@
    * @see org.apache.hadoop.chukwa.Chunk#getStreamName()
    */
   public String getStreamName() {
-    return application;
+    return streamName;
   }
 
   public void setStreamName(String logApplication) {
-    this.application = logApplication;
+    this.streamName = logApplication;
   }
 
   public String getSource() {
@@ -138,14 +138,6 @@
     this.protocolVersion = pv;
   }
 
-  public String getApplication() {
-    return application;
-  }
-
-  public void setApplication(String a) {
-    application = a;
-  }
-
   public Adaptor getInitiator() {
     return initiator;
   }
@@ -215,7 +207,7 @@
     setSeqID(in.readLong());
     setSource(in.readUTF());
     tags = in.readUTF(); // no public set method here
-    setApplication(in.readUTF());
+    setStreamName(in.readUTF());
     setDataType(in.readUTF());
     setDebugInfo(in.readUTF());
 
@@ -236,7 +228,7 @@
     out.writeLong(seqID);
     out.writeUTF(source);
     out.writeUTF(tags);
-    out.writeUTF(application);
+    out.writeUTF(streamName);
     out.writeUTF(dataType);
     out.writeUTF(debuggingInfo);
 
@@ -259,7 +251,7 @@
 
   // FIXME: should do something better here, but this is OK for debugging
   public String toString() {
-    return source + ":" + application + ":" + new String(data) + "/" + seqID;
+    return source + ":" + streamName + ":" + new String(data) + "/" + seqID;
   }
 
 
@@ -268,7 +260,7 @@
    * @see org.apache.hadoop.chukwa.Chunk#getSerializedSizeEstimate()
    */
   public int getSerializedSizeEstimate() {
-    int size = 2 * (source.length() + application.length() + dataType.length() 
+    int size = 2 * (source.length() + streamName.length() + dataType.length() 
         + debuggingInfo.length()); // length of strings (pessimistic)
     size += data.length + 4;
     if (recordEndOffsets == null)

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/AbstractProcessor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/AbstractProcessor.java?rev=832857&r1=832856&r2=832857&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/AbstractProcessor.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/AbstractProcessor.java
Wed Nov  4 19:41:41 2009
@@ -103,7 +103,7 @@
 
     record.add(Record.tagsField, chunk.getTags());
     record.add(Record.sourceField, chunk.getSource());
-    record.add(Record.applicationField, chunk.getApplication());
+    record.add(Record.applicationField, chunk.getStreamName());
 
   }
 

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ChunkSaver.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ChunkSaver.java?rev=832857&r1=832856&r2=832857&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ChunkSaver.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ChunkSaver.java
Wed Nov  4 19:41:41 2009
@@ -55,7 +55,7 @@
 
       record.add(Record.tagsField, chunk.getTags());
       record.add(Record.sourceField, chunk.getSource());
-      record.add(Record.applicationField, chunk.getApplication());
+      record.add(Record.applicationField, chunk.getStreamName());
 
       DataOutputBuffer ob = new DataOutputBuffer(chunk
           .getSerializedSizeEstimate());

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=832857&r1=832856&r2=832857&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
Wed Nov  4 19:41:41 2009
@@ -130,7 +130,7 @@
 
       rec.add(Record.tagsField, chunk.getTags());
       rec.add(Record.sourceField, chunk.getSource());
-      rec.add(Record.applicationField, chunk.getApplication());
+      rec.add(Record.applicationField, chunk.getStreamName());
       rec.add("actual_time",(new Long(ms_fullresolution)).toString());
       output.collect(key, rec);
 

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobConfProcessor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobConfProcessor.java?rev=832857&r1=832856&r2=832857&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobConfProcessor.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/JobConfProcessor.java
Wed Nov  4 19:41:41 2009
@@ -58,7 +58,7 @@
     if (matcher.matches()) {
       time = Long.parseLong(matcher.group(2));
     }
-    String capp = this.chunk.getApplication();
+    String capp = this.chunk.getStreamName();
       String jobID = "";
         matcher = jobPattern.matcher(capp);
         if(matcher.matches()) {

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/DumpArchive.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/DumpArchive.java?rev=832857&r1=832856&r2=832857&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/DumpArchive.java (original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/DumpArchive.java Wed Nov  4
19:41:41 2009
@@ -103,7 +103,7 @@
       while (r.next(key, chunk)) {
         
         String entryKey = chunk.getSource() +":"+chunk.getDataType() +":" +
-        chunk.getApplication();
+        chunk.getStreamName();
         
         Integer oldC = counts.get(entryKey);
         if(oldC != null)
@@ -121,7 +121,7 @@
           System.out.println("Cluster : " + chunk.getTags());
           System.out.println("DataType : " + chunk.getDataType());
           System.out.println("Source : " + chunk.getSource());
-          System.out.println("Application : " + chunk.getApplication());
+          System.out.println("Application : " + chunk.getStreamName());
           System.out.println("SeqID : " + chunk.getSeqID());
           System.out.println("Data : " + new String(chunk.getData()));
         }

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/writer/TestChukwaWriters.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/writer/TestChukwaWriters.java?rev=832857&r1=832856&r2=832857&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/writer/TestChukwaWriters.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/writer/TestChukwaWriters.java
Wed Nov  4 19:41:41 2009
@@ -159,7 +159,7 @@
         sb.append("Cluster : " + chunk.getTags());
         sb.append("DataType : " + chunk.getDataType());
         sb.append("Source : " + chunk.getSource());
-        sb.append("Application : " + chunk.getApplication());
+        sb.append("Application : " + chunk.getStreamName());
         sb.append("SeqID : " + chunk.getSeqID());
         sb.append("Data : " + new String(chunk.getData()));
         return sb.toString();

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/validationframework/interceptor/ChunkDumper.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/validationframework/interceptor/ChunkDumper.java?rev=832857&r1=832856&r2=832857&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/validationframework/interceptor/ChunkDumper.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/validationframework/interceptor/ChunkDumper.java
Wed Nov  4 19:41:41 2009
@@ -33,7 +33,7 @@
 
   public static void dump(String component, Chunk chunk) {
 
-    String fileName = chunk.getApplication();
+    String fileName = chunk.getStreamName();
 
     if (!hash.containsKey(component + "-" + fileName)) {
       File directory = new File(testRepositoryDumpDir + "/" + component);



Mime
View raw message