Updated Branches:
  refs/heads/flume-1.3.0 c6312211e -> 1039b4c8b

FLUME-1615. HBaseSink writes byte[] address instead of columnFamily name in the 
exceptions message

(Matteo Bertozzi via Hari Shreedharan)


Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/1039b4c8
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/1039b4c8
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/1039b4c8

Branch: refs/heads/flume-1.3.0
Commit: 1039b4c8b3776516eef351b023c5af1b2d9ea2bf
Parents: c631221
Author: Hari Shreedharan <[email protected]>
Authored: Thu Sep 27 13:24:44 2012 -0700
Committer: Hari Shreedharan <[email protected]>
Committed: Thu Sep 27 13:25:43 2012 -0700

----------------------------------------------------------------------
 .../org/apache/flume/sink/hbase/HBaseSink.java     |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/1039b4c8/flume-ng-sinks/flume-ng-hbase-sink/src/main/java/org/apache/flume/sink/hbase/HBaseSink.java
----------------------------------------------------------------------
diff --git 
a/flume-ng-sinks/flume-ng-hbase-sink/src/main/java/org/apache/flume/sink/hbase/HBaseSink.java
 
b/flume-ng-sinks/flume-ng-hbase-sink/src/main/java/org/apache/flume/sink/hbase/HBaseSink.java
index 782bd4c..021ecd0 100644
--- 
a/flume-ng-sinks/flume-ng-hbase-sink/src/main/java/org/apache/flume/sink/hbase/HBaseSink.java
+++ 
b/flume-ng-sinks/flume-ng-hbase-sink/src/main/java/org/apache/flume/sink/hbase/HBaseSink.java
@@ -36,6 +36,7 @@ import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.Increment;
 import org.apache.hadoop.hbase.client.Row;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -117,14 +118,14 @@ public class HBaseSink extends AbstractSink implements 
Configurable {
     try {
       if(!table.getTableDescriptor().hasFamily(columnFamily)) {
         throw new IOException("Table " + tableName +
-            " has no such column family " + columnFamily);
+            " has no such column family " + Bytes.toString(columnFamily));
       }
     } catch (IOException e) {
       //Get getTableDescriptor also throws IOException, so catch the 
IOException
       //thrown above or by the getTableDescriptor() call.
       throw new FlumeException("Error getting column family from HBase." +
-          "Please verify that the table "+ tableName +" and Column Family,  "
-          + columnFamily + " exists in HBase.", e);
+          "Please verify that the table "+ tableName +" and Column Family, "
+          + Bytes.toString(columnFamily) + " exists in HBase.", e);
     }
 
     super.start();

Reply via email to