Updated Branches: refs/heads/trunk bcf8e4324 -> 74d087d54
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/74d087d5 Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/74d087d5 Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/74d087d5 Branch: refs/heads/trunk Commit: 74d087d54e29286c5ee0216e8810ca7b5452d0ee Parents: bcf8e43 Author: Hari Shreedharan <[email protected]> Authored: Thu Sep 27 13:24:44 2012 -0700 Committer: Hari Shreedharan <[email protected]> Committed: Thu Sep 27 13:24:44 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/74d087d5/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();
