HADOOP-2718 Copy Constructor HBaseConfiguration(Configuration) will override

hbase configurations if argumant is not an instance of HBaseConfiguration.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk/src/contrib/hbase@616492 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-01-29 19:30:22 +00:00
parent d929e0c34a
commit f0da1b58aa
2 changed files with 8 additions and 3 deletions

View File

@ -152,6 +152,9 @@ Trunk (unreleased changes)
HADOOP-2712 under load, regions won't split HADOOP-2712 under load, regions won't split
HADOOP-2675 Options not passed to rest/thrift HADOOP-2675 Options not passed to rest/thrift
HADOOP-2722 Prevent unintentional thread exit in region server and master HADOOP-2722 Prevent unintentional thread exit in region server and master
HADOOP-2718 Copy Constructor HBaseConfiguration(Configuration) will override
hbase configurations if argumant is not an instance of
HBaseConfiguration.
IMPROVEMENTS IMPROVEMENTS
HADOOP-2401 Add convenience put method that takes writable HADOOP-2401 Add convenience put method that takes writable

View File

@ -19,6 +19,8 @@
*/ */
package org.apache.hadoop.hbase; package org.apache.hadoop.hbase;
import java.util.Map.Entry;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
/** /**
@ -36,9 +38,9 @@ public class HBaseConfiguration extends Configuration {
* @param c Configuration to clone. * @param c Configuration to clone.
*/ */
public HBaseConfiguration(final Configuration c) { public HBaseConfiguration(final Configuration c) {
super(c); super();
if (!(c instanceof HBaseConfiguration)) { for (Entry<String, String>e: c) {
addHbaseResources(); set(e.getKey(), e.getValue());
} }
} }