HBASE-11259 Compression.java different compressions load system classpath differently causing errors (Enoch Hsu)
This commit is contained in:
parent
8c7772488c
commit
8c14c7b5bb
|
@ -123,8 +123,7 @@ public final class Compression {
|
|||
private CompressionCodec buildCodec(Configuration conf) {
|
||||
try {
|
||||
Class<?> externalCodec =
|
||||
ClassLoader.getSystemClassLoader()
|
||||
.loadClass("com.hadoop.compression.lzo.LzoCodec");
|
||||
getClassLoaderForCodec().loadClass("com.hadoop.compression.lzo.LzoCodec");
|
||||
return (CompressionCodec) ReflectionUtils.newInstance(externalCodec,
|
||||
new Configuration(conf));
|
||||
} catch (ClassNotFoundException e) {
|
||||
|
@ -208,8 +207,7 @@ public final class Compression {
|
|||
private CompressionCodec buildCodec(Configuration conf) {
|
||||
try {
|
||||
Class<?> externalCodec =
|
||||
ClassLoader.getSystemClassLoader()
|
||||
.loadClass("org.apache.hadoop.io.compress.SnappyCodec");
|
||||
getClassLoaderForCodec().loadClass("org.apache.hadoop.io.compress.SnappyCodec");
|
||||
return (CompressionCodec) ReflectionUtils.newInstance(externalCodec,
|
||||
conf);
|
||||
} catch (ClassNotFoundException e) {
|
||||
|
|
Loading…
Reference in New Issue