use of co.cask.cdap.filetailer.config.ConfigurationLoader in project cdap-ingest by caskdata.
the class PollingServiceManager method getConfiguration.
/**
* Return DropZone configuration
*
* @return DropZone configuration
* @throws ConfigurationLoadingException if configuration load failed
*/
private FileDropZoneConfiguration getConfiguration() throws ConfigurationLoadingException {
ConfigurationLoader loader = new ConfigurationLoaderImpl();
Configuration configuration = loader.load(confFile);
return new FileDropZoneConfigurationImpl(configuration.getProperties());
}
use of co.cask.cdap.filetailer.config.ConfigurationLoader in project cdap-ingest by caskdata.
the class FileDropZoneIT method loadConfig.
private ObserverConfiguration loadConfig(File file) throws ConfigurationLoadingException {
ConfigurationLoader loader = new ConfigurationLoaderImpl();
Configuration configuration = loader.load(file);
List<ObserverConfiguration> observerConfig = new FileDropZoneConfigurationImpl(configuration.getProperties()).getObserverConfiguration();
return observerConfig.get(0);
}
use of co.cask.cdap.filetailer.config.ConfigurationLoader in project cdap-ingest by caskdata.
the class PipeManager method getPipeConfigs.
/**
* Get pipes configuration
*
* @return the pipes configuration read from the configuration file
* @throws ConfigurationLoadingException in case can not load configuration
*/
private List<PipeConfiguration> getPipeConfigs() throws ConfigurationLoadingException {
ConfigurationLoader loader = new ConfigurationLoaderImpl();
Configuration configuration = loader.load(confFile);
return configuration.getPipeConfigurations();
}
use of co.cask.cdap.filetailer.config.ConfigurationLoader in project cdap-ingest by caskdata.
the class TailerLogUtils method loadConfig.
public static PipeConfiguration loadConfig() throws ConfigurationLoadingException {
ConfigurationLoader loader = new ConfigurationLoaderImpl();
Class<? extends Class> path1 = TailerLogUtils.class.getClass();
String path = TailerLogUtils.class.getClassLoader().getResource("test4.properties").getFile();
Configuration configuration = loader.load(new File(path));
List<PipeConfiguration> flowConfig = configuration.getPipeConfigurations();
return flowConfig.get(0);
}
use of co.cask.cdap.filetailer.config.ConfigurationLoader in project cdap-ingest by caskdata.
the class FileTailerIT method loadConfig.
private PipeConfiguration loadConfig(File file) throws ConfigurationLoadingException {
ConfigurationLoader loader = new ConfigurationLoaderImpl();
Configuration configuration = loader.load(file);
List<PipeConfiguration> pipeConfig = configuration.getPipeConfigurations();
return pipeConfig.get(0);
}
Aggregations