diff --git a/CHANGES.txt b/CHANGES.txt index 202f3d0ce13..0cff87bd51c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -80,6 +80,8 @@ Release 0.91.0 - Unreleased (rpc version 43) HBASE-3563 [site] Add one-page-only version of hbase doc HBASE-3564 DemoClient.pl - a demo client in Perl + HBASE-3560 the hbase-default entry of "hbase.defaults.for.version" + causes tests not to run via not-maven NEW FEATURES diff --git a/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java b/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java index 5666bc3b1fd..e2a3089f86e 100644 --- a/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java +++ b/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java @@ -60,6 +60,7 @@ public class HBaseConfiguration extends Configuration { } private static void checkDefaultsVersion(Configuration conf) { + if (conf.getBoolean("hbase.defaults.for.version.skip", Boolean.FALSE)) return; String defaultsVersion = conf.get("hbase.defaults.for.version"); String thisVersion = VersionInfo.getVersion(); if (!thisVersion.equals(defaultsVersion)) { diff --git a/src/main/resources/hbase-default.xml b/src/main/resources/hbase-default.xml index 67a9c0c26fe..9f188a46337 100644 --- a/src/main/resources/hbase-default.xml +++ b/src/main/resources/hbase-default.xml @@ -619,4 +619,17 @@ classpath. + + hbase.defaults.for.version.skip + false + + Set to true to skip the 'hbase.defaults.for.version' check. + Setting this to true can be useful in contexts other than + the other side of a maven generation; i.e. running in an + ide. You'll want to set this boolean to true to avoid + seeing the RuntimException complaint: "hbase-default.xml file + seems to be for and old version of HBase (@@@VERSION@@@), this + version is X.X.X-SNAPSHOT" + + diff --git a/src/test/resources/hbase-site.xml b/src/test/resources/hbase-site.xml index 641ef670a51..37f1bab98c2 100644 --- a/src/test/resources/hbase-site.xml +++ b/src/test/resources/hbase-site.xml @@ -127,4 +127,17 @@ The port at which the clients will connect. + + hbase.defaults.for.version.skip + true + + Set to true to skip the 'hbase.defaults.for.version'. + Setting this to true can be useful in contexts other than + the other side of a maven generation; i.e. running in an + ide. You'll want to set this boolean to true to avoid + seeing the RuntimException complaint: "hbase-default.xml file + seems to be for and old version of HBase (@@@VERSION@@@), this + version is X.X.X-SNAPSHOT" + +