/** * Constructs a ClassLoader that load classes from the programClassLoader, then from the plugin lib ClassLoader, * followed by plugin Export-Package ClassLoader and with the system ClassLoader last. * This constructor should only be called from {@link MapReduceRuntimeService} only. */ MapReduceClassLoader(final Injector injector, CConfiguration cConf, Configuration hConf, ClassLoader programClassLoader, Map<String, Plugin> plugins, @Nullable PluginInstantiator pluginInstantiator) { this(new Parameters(cConf, hConf, programClassLoader, plugins, pluginInstantiator), new TaskContextProviderFactory() { @Override public MapReduceTaskContextProvider create(CConfiguration cConf, Configuration hConf, MapReduceClassLoader mapReduceClassLoader) { return new MapReduceTaskContextProvider(injector, mapReduceClassLoader); } }); }
/** * Constructs a ClassLoader that load classes from the programClassLoader, then from the plugin lib ClassLoader, * followed by plugin Export-Package ClassLoader and with the system ClassLoader last. * This constructor should only be called from {@link MapReduceRuntimeService} only. */ MapReduceClassLoader(final Injector injector, CConfiguration cConf, Configuration hConf, ClassLoader programClassLoader, Map<String, Plugin> plugins, @Nullable PluginInstantiator pluginInstantiator) { this(new Parameters(cConf, hConf, programClassLoader, plugins, pluginInstantiator), new TaskContextProviderFactory() { @Override public MapReduceTaskContextProvider create(CConfiguration cConf, Configuration hConf, MapReduceClassLoader mapReduceClassLoader) { return new MapReduceTaskContextProvider(injector, mapReduceClassLoader); } }); }
/** * Constructor. It creates classloader for MapReduce from information * gathered through {@link MapReduceContextConfig}. This method is called by {@link MapReduceContainerLauncher}. */ @SuppressWarnings("unused") public MapReduceClassLoader() { this(new Parameters(), new TaskContextProviderFactory() { @Override public MapReduceTaskContextProvider create(CConfiguration cConf, Configuration hConf, MapReduceClassLoader mapReduceClassLoader) { Preconditions.checkState(!MapReduceTaskContextProvider.isLocal(hConf), "Expected to be in distributed mode."); return new DistributedMapReduceTaskContextProvider(cConf, hConf, mapReduceClassLoader); } }); }
/** * Constructor. It creates classloader for MapReduce from information * gathered through {@link MapReduceContextConfig}. This method is called by {@link MapReduceContainerLauncher}. */ @SuppressWarnings("unused") public MapReduceClassLoader() { this(new Parameters(), new TaskContextProviderFactory() { @Override public MapReduceTaskContextProvider create(CConfiguration cConf, Configuration hConf, MapReduceClassLoader mapReduceClassLoader) { Preconditions.checkState(!MapReduceTaskContextProvider.isLocal(hConf), "Expected to be in distributed mode."); return new DistributedMapReduceTaskContextProvider(cConf, hConf, mapReduceClassLoader); } }); }