chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r1001547 - in /incubator/chukwa/trunk: CHANGES.txt src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/OutputCollector.java
Date Sun, 26 Sep 2010 22:39:08 GMT
Author: eyang
Date: Sun Sep 26 22:39:07 2010
New Revision: 1001547

URL: http://svn.apache.org/viewvc?rev=1001547&view=rev
Log:
CHUKWA-516. Downgrade to HBase 0.20.6 until 0.90 arrives. (Eric Yang)

Modified:
    incubator/chukwa/trunk/CHANGES.txt
    incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java
    incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/OutputCollector.java

Modified: incubator/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1001547&r1=1001546&r2=1001547&view=diff
==============================================================================
--- incubator/chukwa/trunk/CHANGES.txt (original)
+++ incubator/chukwa/trunk/CHANGES.txt Sun Sep 26 22:39:07 2010
@@ -40,6 +40,8 @@ Trunk (unreleased changes)
 
   BUG FIXES
 
+    CHUKWA-516. Downgrade to HBase 0.20.6 until 0.90 arrives. (Eric Yang)
+
     CHUKWA-496. Fixed config file reference in design.html  (Bernd Fondermann via Eric Yang)
 
     CHUKWA-510.  JMSMessagePropertyTransformer inserts "null" string for null JMS message
property values  (Bill Graham via asrabkin)

Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java?rev=1001547&r1=1001546&r2=1001547&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java
(original)
+++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java
Sun Sep 26 22:39:07 2010
@@ -22,6 +22,7 @@ import java.util.List;
 import java.util.Timer;
 import java.util.TimerTask;
 
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.chukwa.ChukwaArchiveKey;
 import org.apache.hadoop.chukwa.Chunk;
 import org.apache.hadoop.chukwa.conf.ChukwaConfiguration;
@@ -36,14 +37,13 @@ import org.apache.hadoop.chukwa.extracti
 import org.apache.hadoop.chukwa.util.ClassUtils;
 import org.apache.hadoop.chukwa.util.DaemonWatcher;
 import org.apache.hadoop.chukwa.util.ExceptionUtil;
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
 
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 
-import org.apache.hadoop.hbase.client.HTableInterface;
+import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.HTablePool;
 
 import org.apache.hadoop.chukwa.datacollection.writer.hbase.OutputCollector;
@@ -64,7 +64,7 @@ public class HBaseWriter extends Pipelin
       "chukwa.demux.mapper.default.processor",
       "org.apache.hadoop.chukwa.extraction.demux.processor.mapper.DefaultProcessor");
   private HTablePool pool;
-  private Configuration hconf;
+  private HBaseConfiguration hconf;
   
   private class StatReportingTask extends TimerTask {
     private long lastTs = System.currentTimeMillis();
@@ -92,10 +92,14 @@ public class HBaseWriter extends Pipelin
   public HBaseWriter(boolean reportStats) {
     this.reportStats = reportStats;
     statTimer = new Timer();
-    hconf = HBaseConfiguration.create();
+    /* HBase Version 0.20.x */
+    hconf = new HBaseConfiguration();
+    
+    /* HBase Version 0.89.x */
+    //hconf = HBaseConfiguration.create();
   }
 
-  public HBaseWriter(ChukwaConfiguration conf, Configuration hconf) {
+  public HBaseWriter(ChukwaConfiguration conf, HBaseConfiguration hconf) {
     this(true);
     this.conf = conf;
     this.hconf = hconf;
@@ -189,7 +193,7 @@ public class HBaseWriter extends Pipelin
               }
             }
             if(table!=null) {
-              HTableInterface hbase = pool.getTable(table.name());  
+              HTable hbase = pool.getTable(table.name());  
               processor.process(new ChukwaArchiveKey(), chunk, output, reporter);
               hbase.put(output.getKeyValues());
               pool.putTable(hbase);

Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/OutputCollector.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/OutputCollector.java?rev=1001547&r1=1001546&r2=1001547&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/OutputCollector.java
(original)
+++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/OutputCollector.java
Sun Sep 26 22:39:07 2010
@@ -43,7 +43,7 @@ public class OutputCollector implements
   public void collect(ChukwaRecordKey key, ChukwaRecord value) throws IOException {
     StringBuffer s = new StringBuffer();
     String[] keyParts = key.getKey().split("/");
-    s.append(keyParts[0]);
+    s.append(keyParts[2]);
     s.append("-");
     s.append(keyParts[1]);
 



Mime
View raw message