HBASE-3552 Coprocessors are unable to load if RegionServer is launched using a different classloader than system default

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1074908 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2011-02-26 19:27:16 +00:00
parent dbf9ea8565
commit dc5e50b07b
2 changed files with 4 additions and 2 deletions

View File

@ -52,6 +52,8 @@ Release 0.91.0 - Unreleased
HBASE-3550 FilterList reports false positives (Bill Graham via Andrew
Purtell)
HBASE-3566 writeToWAL is not serialized for increment operation
HBASE-3552 Coprocessors are unable to load if RegionServer is launched
using a different classloader than system default
IMPROVEMENTS
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)

View File

@ -84,7 +84,7 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
if (findCoprocessor(className) != null) {
continue;
}
ClassLoader cl = ClassLoader.getSystemClassLoader();
ClassLoader cl = this.getClass().getClassLoader();
Thread.currentThread().setContextClassLoader(cl);
try {
implClass = cl.loadClass(className);
@ -154,7 +154,7 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
paths.add((new File(st.nextToken())).getCanonicalFile().toURL());
}
ClassLoader cl = new URLClassLoader(paths.toArray(new URL[]{}),
ClassLoader.getSystemClassLoader());
this.getClass().getClassLoader());
Thread.currentThread().setContextClassLoader(cl);
try {
implClass = cl.loadClass(className);