Author: tedyu
Date: Mon Aug 22 18:05:12 2011
New Revision: 1160352
URL: http://svn.apache.org/viewvc?rev=1160352&view=rev
Log:
HBASE-4065 TableOutputFormat ignores failure to create table instance
(Brock Noland)
Modified:
hbase/branches/0.90/CHANGES.txt
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
Modified: hbase/branches/0.90/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1160352&r1=1160351&r2=1160352&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Mon Aug 22 18:05:12 2011
@@ -16,6 +16,8 @@ Release 0.90.5 - Unreleased
(Pritam Damania)
HBASE-4095 Hlog may not be rolled in a long time if checkLowReplication's
request of LogRoll is blocked (Jieshan Bean)
+ HBASE-4065 TableOutputFormat ignores failure to create table instance
+ (Brock Noland)
IMPROVEMENT
HBASE-4205 Enhance HTable javadoc (Eric Charles)
Modified:
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
URL:
http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java?rev=1160352&r1=1160351&r2=1160352&view=diff
==============================================================================
---
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
(original)
+++
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
Mon Aug 22 18:05:12 2011
@@ -184,6 +184,9 @@ implements Configurable {
public void setConf(Configuration otherConf) {
this.conf = HBaseConfiguration.create(otherConf);
String tableName = this.conf.get(OUTPUT_TABLE);
+ if(tableName == null || tableName.length() <= 0) {
+ throw new IllegalArgumentException("Must specify table name");
+ }
String address = this.conf.get(QUORUM_ADDRESS);
String serverClass = this.conf.get(REGION_SERVER_CLASS);
String serverImpl = this.conf.get(REGION_SERVER_IMPL);
@@ -200,6 +203,7 @@ implements Configurable {
LOG.info("Created table instance for " + tableName);
} catch(IOException e) {
LOG.error(e);
+ throw new RuntimeException(e);
}
}
}