Author: todd
Date: Wed Feb  9 00:23:41 2011
New Revision: 1068701

URL: http://svn.apache.org/viewvc?rev=1068701&view=rev
Log:
Revert HBASE-3470 since it breaks job submission (HBASE-3517)

Modified:
    hbase/branches/0.90/CHANGES.txt
    
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1068701&r1=1068700&r2=1068701&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Wed Feb  9 00:23:41 2011
@@ -36,7 +36,6 @@ Release 0.90.1 - Unreleased
   IMPROVEMENTS
    HBASE-3305  Allow round-robin distribution for table created with
                multiple regions (ted yu via jgray)
-   HBASE-3470  Check that hbase-default.xml is loaded from within jar
    HBASE-3508  LruBlockCache statistics thread should have a name
    HBASE-3511  Allow rolling restart to apply to only RS or only masters
    HBASE-3510  Add thread name for IPC reader threads

Modified: 
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java
URL: 
http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java?rev=1068701&r1=1068700&r2=1068701&view=diff
==============================================================================
--- 
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java
 (original)
+++ 
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java
 Wed Feb  9 00:23:41 2011
@@ -19,7 +19,6 @@
  */
 package org.apache.hadoop.hbase;
 
-import java.net.URL;
 import java.util.Map.Entry;
 
 import org.apache.commons.logging.Log;
@@ -59,35 +58,7 @@ public class HBaseConfiguration extends 
     }
   }
 
-  /**
-   * Check that the hbase-defaults.xml file is being loaded from within
-   * the hbase jar, rather than somewhere else on the classpath.
-   */
-  private static void checkDefaultsInJar(Configuration conf) {
-    ClassLoader cl = conf.getClassLoader();
-    URL url = cl.getResource("hbase-default.xml");
-    if (url == null) {
-      // This is essentially an assertion failure - we compile this
-      // into our own jar, so there's something really wacky about
-      // the classloader context!
-      throw new AssertionError("hbase-default.xml not on classpath");
-    }
-    if (!"jar".equals(url.getProtocol()) &&
-        !url.getPath().endsWith("target/classes/hbase-default.xml")) {
-      throw new RuntimeException(
-        "hbase-defaults.xml is being loaded from " + url + " rather than " +
-        "the HBase JAR. This is dangerous since you may pick up defaults " +
-        "from a previously installed version of HBase. Please remove " +
-        "hbase-default.xml from your configuration directory.");
-    }
-  }
-
-    
-
-
   public static Configuration addHbaseResources(Configuration conf) {
-    checkDefaultsInJar(conf);
-
     conf.addResource("hbase-default.xml");
     conf.addResource("hbase-site.xml");
     return conf;


Reply via email to