mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-02 19:31:33 +08:00
删除多余的PluginLoader接口定义
删除多余的PluginLoader接口定义
This commit is contained in:
parent
d747e1d292
commit
c02f6566bf
@ -653,7 +653,6 @@ public class JobContainer extends AbstractContainer {
|
|||||||
*/
|
*/
|
||||||
private Reader.Job initJobReader(
|
private Reader.Job initJobReader(
|
||||||
JobPluginCollector jobPluginCollector) {
|
JobPluginCollector jobPluginCollector) {
|
||||||
//TODO loadUtil加载或者是 pluginUtil加载
|
|
||||||
this.readerPluginName = this.configuration.getString(
|
this.readerPluginName = this.configuration.getString(
|
||||||
CoreConstant.DATAX_JOB_CONTENT_READER_NAME);
|
CoreConstant.DATAX_JOB_CONTENT_READER_NAME);
|
||||||
classLoaderSwapper.setCurrentThreadClassLoader(LoadUtil.getJarLoader(
|
classLoaderSwapper.setCurrentThreadClassLoader(LoadUtil.getJarLoader(
|
||||||
|
@ -15,7 +15,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 提供Jar隔离的加载机制,会把传入的路径、及其子路径、以及路径中的jar文件加入到class path。
|
* 提供Jar隔离的加载机制,会把传入的路径、及其子路径、以及路径中的jar文件加入到class path。
|
||||||
*/
|
*/
|
||||||
public class JarLoader extends URLClassLoader implements PluginLoader{
|
public class JarLoader extends URLClassLoader{
|
||||||
public JarLoader(String[] paths) {
|
public JarLoader(String[] paths) {
|
||||||
this(paths, JarLoader.class.getClassLoader());
|
this(paths, JarLoader.class.getClassLoader());
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package com.alibaba.datax.core.util.container;
|
package com.alibaba.datax.core.util.container;
|
||||||
|
|
||||||
/**
|
|
||||||
* {@code Author} FuYouJ
|
|
||||||
* {@code Date} 2023/7/23 16:52
|
|
||||||
* @author fuyouj
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class PluginClassLoader extends ClassLoader implements PluginLoader{
|
/**
|
||||||
|
* @author fuyouj
|
||||||
|
* ClassLoader 抽象类的具体实现类,用于在运行时反射加载插件
|
||||||
|
*/
|
||||||
|
public class PluginClassLoader extends ClassLoader{
|
||||||
}
|
}
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
package com.alibaba.datax.core.util.container;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author fuyouj
|
|
||||||
*/
|
|
||||||
public interface PluginLoader {
|
|
||||||
/**
|
|
||||||
* 加载插件对象
|
|
||||||
*
|
|
||||||
* @param name 类全限定名
|
|
||||||
* @return class对象
|
|
||||||
* @throws ClassNotFoundException
|
|
||||||
*/
|
|
||||||
Class<?> loadClass(String name) throws ClassNotFoundException;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user