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:
parent
dbf9ea8565
commit
dc5e50b07b
|
@ -52,6 +52,8 @@ Release 0.91.0 - Unreleased
|
||||||
HBASE-3550 FilterList reports false positives (Bill Graham via Andrew
|
HBASE-3550 FilterList reports false positives (Bill Graham via Andrew
|
||||||
Purtell)
|
Purtell)
|
||||||
HBASE-3566 writeToWAL is not serialized for increment operation
|
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
|
IMPROVEMENTS
|
||||||
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
|
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
|
||||||
|
|
|
@ -84,7 +84,7 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
|
||||||
if (findCoprocessor(className) != null) {
|
if (findCoprocessor(className) != null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ClassLoader cl = ClassLoader.getSystemClassLoader();
|
ClassLoader cl = this.getClass().getClassLoader();
|
||||||
Thread.currentThread().setContextClassLoader(cl);
|
Thread.currentThread().setContextClassLoader(cl);
|
||||||
try {
|
try {
|
||||||
implClass = cl.loadClass(className);
|
implClass = cl.loadClass(className);
|
||||||
|
@ -154,7 +154,7 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
|
||||||
paths.add((new File(st.nextToken())).getCanonicalFile().toURL());
|
paths.add((new File(st.nextToken())).getCanonicalFile().toURL());
|
||||||
}
|
}
|
||||||
ClassLoader cl = new URLClassLoader(paths.toArray(new URL[]{}),
|
ClassLoader cl = new URLClassLoader(paths.toArray(new URL[]{}),
|
||||||
ClassLoader.getSystemClassLoader());
|
this.getClass().getClassLoader());
|
||||||
Thread.currentThread().setContextClassLoader(cl);
|
Thread.currentThread().setContextClassLoader(cl);
|
||||||
try {
|
try {
|
||||||
implClass = cl.loadClass(className);
|
implClass = cl.loadClass(className);
|
||||||
|
|
Loading…
Reference in New Issue