Author: tedyu
Date: Mon Aug 22 18:03:34 2011
New Revision: 1160351
URL: http://svn.apache.org/viewvc?rev=1160351&view=rev
Log:
HBASE-4065 TableOutputFormat ignores failure to create table instance
(Brock Noland)
Modified:
hbase/trunk/CHANGES.txt
hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
Modified: hbase/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1160351&r1=1160350&r2=1160351&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Mon Aug 22 18:03:34 2011
@@ -204,6 +204,8 @@ Release 0.91.0 - Unreleased
(Benoît Sigoure)
HBASE-4175 Fix FSUtils.createTableDescriptor() (Ramkrishna)
HBASE-4008 Problem while stopping HBase (Akash Ashok)
+ HBASE-4065 TableOutputFormat ignores failure to create table instance
+ (Brock Noland)
IMPROVEMENTS
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
Modified:
hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
URL:
http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java?rev=1160351&r1=1160350&r2=1160351&view=diff
==============================================================================
---
hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
(original)
+++
hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
Mon Aug 22 18:03:34 2011
@@ -178,6 +178,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);
@@ -194,6 +197,7 @@ implements Configurable {
LOG.info("Created table instance for " + tableName);
} catch(IOException e) {
LOG.error(e);
+ throw new RuntimeException(e);
}
}
}