public class Initialization extends Object
Constructor and Description |
---|
Initialization() |
Modifier and Type | Method and Description |
---|---|
static URLClassLoader |
getClassLoaderForExtension(File extension) |
static File[] |
getExtensionFilesToLoad(ExtensionsConfig config)
Find all the extension files that should be loaded by druid.
|
static <T> Collection<T> |
getFromExtensions(ExtensionsConfig config,
Class<T> clazz)
Look for extension modules for the given class from both classpath and extensions directory.
|
static File[] |
getHadoopDependencyFilesToLoad(List<String> hadoopDependencyCoordinates,
ExtensionsConfig extensionsConfig)
Find all the hadoop dependencies that should be loaded by druid
|
static <T> Set<T> |
getLoadedModules(Class<T> clazz) |
static List<URL> |
getURLsForClasspath(String cp) |
static com.google.inject.Injector |
makeInjectorWithModules(com.google.inject.Injector baseInjector,
Iterable<? extends com.google.inject.Module> modules) |
public static <T> Set<T> getLoadedModules(Class<T> clazz)
T
- clazz
- Module classpublic static <T> Collection<T> getFromExtensions(ExtensionsConfig config, Class<T> clazz)
config
- Extensions configurationclazz
- The class of extension module (e.g., DruidModule)public static File[] getExtensionFilesToLoad(ExtensionsConfig config)
config
- ExtensionsConfig configured by druid.extensions.xxxpublic static File[] getHadoopDependencyFilesToLoad(List<String> hadoopDependencyCoordinates, ExtensionsConfig extensionsConfig)
hadoopDependencyCoordinates
- e.g.["org.apache.hadoop:hadoop-client:2.3.0"]extensionsConfig
- ExtensionsConfig configured by druid.extensions.xxxpublic static URLClassLoader getClassLoaderForExtension(File extension) throws MalformedURLException
extension
- The File instance of the extension we want to loadMalformedURLException
public static com.google.inject.Injector makeInjectorWithModules(com.google.inject.Injector baseInjector, Iterable<? extends com.google.inject.Module> modules)
Copyright © 2011–2017. All rights reserved.