chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r1517207 - in /incubator/chukwa/trunk: CHANGES.txt src/main/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java src/site/apt/Quick_Start_Guide.apt
Date Sat, 24 Aug 2013 22:10:02 GMT
Author: eyang
Date: Sat Aug 24 22:10:02 2013
New Revision: 1517207

URL: http://svn.apache.org/r1517207
Log:
CHUKWA-694. Improve demux configuration processing in HBaseWriter.  (Eric Yang)

Modified:
    incubator/chukwa/trunk/CHANGES.txt
    incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java
    incubator/chukwa/trunk/src/site/apt/Quick_Start_Guide.apt

Modified: incubator/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1517207&r1=1517206&r2=1517207&view=diff
==============================================================================
--- incubator/chukwa/trunk/CHANGES.txt (original)
+++ incubator/chukwa/trunk/CHANGES.txt Sat Aug 24 22:10:02 2013
@@ -44,6 +44,8 @@ Release 0.6 - Unreleased
 
   BUGS
 
+    CHUKWA-694. Improve demux configuration processing in HBaseWriter.  (Eric Yang)
+
     CHUKWA-692. Fixed race condition of agent startup in TestExecAdaptor.  (Eric Yang)
 
     CHUKWA-691. Improve pid file handling. (Eric Yang)

Modified: incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java?rev=1517207&r1=1517206&r2=1517207&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java
(original)
+++ incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java
Sat Aug 24 22:10:02 2013
@@ -237,7 +237,28 @@ public class HBaseWriter extends Pipelin
   }
 
   private MapProcessor getProcessor(String dataType) throws UnknownRecordTypeException {
-    String processorClass = conf.get(dataType, defaultProcessor);
+    String processorClass = findProcessor(conf.get(dataType, defaultProcessor), defaultProcessor);
     return MapProcessorFactory.getProcessor(processorClass);
   }
+
+  /**
+   * Look for mapper parser class in the demux configuration.
+   * Demux configuration has been changed since CHUKWA-581 to
+   * support mapping of both mapper and reducer, and this utility
+   * class is to detect the mapper class and return the mapper
+   * class only.
+   *
+   */
+  private String findProcessor(String processors, String defaultProcessor) {
+    if(processors.startsWith(",")) {
+      // No mapper class defined.
+      return defaultProcessor;
+    } else if(processors.contains(",")) {
+      // Both mapper and reducer defined.
+      String[] parsers = processors.split(",");
+      return parsers[0];
+    }
+    // No reducer defined.
+    return processors;
+  }
 }

Modified: incubator/chukwa/trunk/src/site/apt/Quick_Start_Guide.apt
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/site/apt/Quick_Start_Guide.apt?rev=1517207&r1=1517206&r2=1517207&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/site/apt/Quick_Start_Guide.apt (original)
+++ incubator/chukwa/trunk/src/site/apt/Quick_Start_Guide.apt Sat Aug 24 22:10:02 2013
@@ -45,7 +45,7 @@ Installing Chukwa
 
 []
 
-[./images/chukwa_architecture.png] Chukwa 0.5.0 Architecture 
+[./images/chukwa_architecture.png] Chukwa 0.6.0 Architecture 
 
 First Steps
 
@@ -66,7 +66,7 @@ Setting Up Chukwa Cluster
 ---
 cp $CHUKWA_CONF_DIR/hadoop-log4j.properties $HADOOP_CONF_DIR/log4j.properties
 cp $CHUKWA_HOME/etc/chukwa/hadoop-metrics2.properties $HADOOP_CONF_DIR/hadoop-metrics2.properties
-cp $CHUKWA_HOME/share/chukwa/chukwa-0.5.0-client.jar $HADOOP_HOME/share/hadoop/lib
+cp $CHUKWA_HOME/share/chukwa/chukwa-0.6.0-client.jar $HADOOP_HOME/share/hadoop/lib
 cp $CHUKWA_HOME/share/chukwa/lib/json-simple-1.1.jar $HADOOP_HOME/share/hadoop/lib
 ---  
 



Mime
View raw message