HADOOP-2718 Copy Constructor HBaseConfiguration(Configuration) will override hbase

configurations if argumant is not an instance of HBaseConfiguration (Second version).


git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk/src/contrib/hbase@617180 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-01-31 18:28:48 +00:00
parent d374f82519
commit 4cb3e64bff
2 changed files with 8 additions and 3 deletions

View File

@ -157,6 +157,9 @@ Trunk (unreleased changes)
HBaseConfiguration. HBaseConfiguration.
HADOOP-2753 Back out 2718; programmatic config works but hbase*xml conf HADOOP-2753 Back out 2718; programmatic config works but hbase*xml conf
is overridden is overridden
HADOOP-2718 Copy Constructor HBaseConfiguration(Configuration) will override
hbase configurations if argumant is not an instance of
HBaseConfiguration (Put it back again).
HADOOP-2631 2443 breaks HTable.getStartKeys when there is more than one HADOOP-2631 2443 breaks HTable.getStartKeys when there is more than one
table or table you are enumerating isn't the first table table or table you are enumerating isn't the first table
Delete empty file: src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/ Delete empty file: src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/

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); this();
if (!(c instanceof HBaseConfiguration)) { for (Entry<String, String>e: c) {
addHbaseResources(); set(e.getKey(), e.getValue());
} }
} }