HBASE-3497 TableMapReduceUtil.initTableReducerJob broken due to setConf

method in TableOutputFormat



git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1085139 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Daniel Cryans 2011-03-24 20:59:25 +00:00
parent ff192229ca
commit ee969a8d83
2 changed files with 15 additions and 10 deletions

View File

@ -176,6 +176,9 @@ Release 0.90.2 - Unreleased
HBASE-3654 Weird blocking between getOnlineRegion and createRegionLoad HBASE-3654 Weird blocking between getOnlineRegion and createRegionLoad
(Subbu M Iyer via Stack) (Subbu M Iyer via Stack)
HBASE-3666 TestScannerTimeout fails occasionally HBASE-3666 TestScannerTimeout fails occasionally
HBASE-3497 TableMapReduceUtil.initTableReducerJob broken due to setConf
method in TableOutputFormat
IMPROVEMENTS IMPROVEMENTS
HBASE-3542 MultiGet methods in Thrift HBASE-3542 MultiGet methods in Thrift

View File

@ -25,6 +25,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.conf.Configurable;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.HConnectionManager; import org.apache.hadoop.hbase.client.HConnectionManager;
@ -180,21 +181,22 @@ implements Configurable {
} }
@Override @Override
public void setConf(Configuration conf) { public void setConf(Configuration otherConf) {
String tableName = conf.get(OUTPUT_TABLE); this.conf = HBaseConfiguration.create(otherConf);
String address = conf.get(QUORUM_ADDRESS); String tableName = this.conf.get(OUTPUT_TABLE);
String serverClass = conf.get(REGION_SERVER_CLASS); String address = this.conf.get(QUORUM_ADDRESS);
String serverImpl = conf.get(REGION_SERVER_IMPL); String serverClass = this.conf.get(REGION_SERVER_CLASS);
String serverImpl = this.conf.get(REGION_SERVER_IMPL);
try { try {
if (address != null) { if (address != null) {
ZKUtil.applyClusterKeyToConf(conf, address); ZKUtil.applyClusterKeyToConf(this.conf, address);
} }
if (serverClass != null) { if (serverClass != null) {
conf.set(HConstants.REGION_SERVER_CLASS, serverClass); this.conf.set(HConstants.REGION_SERVER_CLASS, serverClass);
conf.set(HConstants.REGION_SERVER_IMPL, serverImpl); this.conf.set(HConstants.REGION_SERVER_IMPL, serverImpl);
} }
this.table = new HTable(conf, tableName); this.table = new HTable(this.conf, tableName);
table.setAutoFlush(false); this.table.setAutoFlush(false);
LOG.info("Created table instance for " + tableName); LOG.info("Created table instance for " + tableName);
} catch(IOException e) { } catch(IOException e) {
LOG.error(e); LOG.error(e);