当前位置: 首页>>代码示例>>Java>>正文


Java ConfigLoader类代码示例

本文整理汇总了Java中org.embulk.config.ConfigLoader的典型用法代码示例。如果您正苦于以下问题:Java ConfigLoader类的具体用法?Java ConfigLoader怎么用?Java ConfigLoader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ConfigLoader类属于org.embulk.config包,在下文中一共展示了ConfigLoader类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: config

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
/**
 * Load plugin config with Guava & Joda support
 */
private static ConfigSource config()
{
    String path = System.getenv("EMBULK_OUTPUT_MAILCHIMP_TEST_CONFIG");
    assumeThat(isNullOrEmpty(path), is(false));
    try {
        ObjectMapper mapper = new ObjectMapper()
                .registerModule(new GuavaModule())
                .registerModule(new JodaModule());
        ConfigLoader configLoader = new ConfigLoader(new ModelManager(null, mapper));
        return configLoader.fromYamlFile(new File(path));
    }
    catch (IOException ex) {
        throw Throwables.propagate(ex);
    }
}
 
开发者ID:treasure-data,项目名称:embulk-output-mailchimp,代码行数:19,代码来源:TestMailChimpOutputPlugin.java

示例2: loadConfigSource

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
private ConfigSource loadConfigSource(String yamlPath)
{
    try {
        ConfigLoader loader = new ConfigLoader(Exec.getModelManager());
        InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(yamlPath);

        return loader.fromYaml(stream);
    }
    catch (IOException e) {
        throw Throwables.propagate(e);
    }
}
 
开发者ID:mwed,项目名称:embulk-filter-url_encode,代码行数:13,代码来源:TestUrlEncodeFilterPlugin.java

示例3: taskFromYamlString

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
private PluginTask taskFromYamlString(String... lines)
{
    StringBuilder builder = new StringBuilder();
    for (String line : lines) {
        builder.append(line).append("\n");
    }
    String yamlString = builder.toString();

    ConfigLoader loader = new ConfigLoader(Exec.getModelManager());
    ConfigSource config = loader.fromYamlString(yamlString);
    return config.loadConfig(PluginTask.class);
}
 
开发者ID:hiroyuki-sato,项目名称:embulk-filter-build_json,代码行数:13,代码来源:TestBuildJsonVisitorImpl.java

示例4: configFromYamlString

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
private ConfigSource configFromYamlString(String... lines)
{
    StringBuilder builder = new StringBuilder();
    for (String line : lines) {
        builder.append(line).append("\n");
    }
    String yamlString = builder.toString();

    ConfigLoader loader = new ConfigLoader(Exec.getModelManager());
    return loader.fromYamlString(yamlString);
}
 
开发者ID:kfitzgerald,项目名称:embulk-filter-base58,代码行数:12,代码来源:TestBase58FilterPlugin.java

示例5: setUp

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
@Before
public void setUp() throws Exception
{
    leadWithListInputPlugin = Mockito.spy(new LeadWithListInputPlugin());
    ConfigLoader configLoader = embulkTestRuntime.getInjector().getInstance(ConfigLoader.class);
    configSource = configLoader.fromYaml(this.getClass().getResourceAsStream("/config/rest_config.yaml"));
    mockMarketoRestClient = Mockito.mock(MarketoRestClient.class);
    Mockito.doReturn(mockMarketoRestClient).when(leadWithListInputPlugin).createMarketoRestClient(any(LeadWithListInputPlugin.PluginTask.class));
}
 
开发者ID:treasure-data,项目名称:embulk-input-marketo,代码行数:10,代码来源:LeadWithListInputPluginTest.java

示例6: setUp

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
@Before
public void setUp() throws Exception
{
    campaignInputPlugin = Mockito.spy(new CampaignInputPlugin());
    ConfigLoader configLoader = embulkTestRuntime.getInjector().getInstance(ConfigLoader.class);
    configSource = configLoader.fromYaml(this.getClass().getResourceAsStream("/config/rest_config.yaml"));
    mockMarketoRestClient = Mockito.mock(MarketoRestClient.class);
    Mockito.doReturn(mockMarketoRestClient).when(campaignInputPlugin).createMarketoRestClient(Mockito.any(CampaignInputPlugin.PluginTask.class));
}
 
开发者ID:treasure-data,项目名称:embulk-input-marketo,代码行数:10,代码来源:CampaignInputPluginTest.java

示例7: prepare

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
@Before
public void prepare() throws IOException
{
    bulkExtractInputPlugin = Mockito.spy(new LeadBulkExtractInputPlugin());
    ConfigLoader configLoader = embulkTestRuntime.getInjector().getInstance(ConfigLoader.class);
    configSource = configLoader.fromYaml(this.getClass().getResourceAsStream("/config/lead_bulk_extract_config.yaml"));
    mockMarketoRestclient = Mockito.mock(MarketoRestClient.class);
    Mockito.doReturn(mockMarketoRestclient).when(bulkExtractInputPlugin).createMarketoRestClient(any(LeadBulkExtractInputPlugin.PluginTask.class));
}
 
开发者ID:treasure-data,项目名称:embulk-input-marketo,代码行数:10,代码来源:LeadBulkExtractInputPluginTest.java

示例8: setUp

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
@Before
public void setUp() throws Exception
{
    leadWithProgramInputPlugin = Mockito.spy(new LeadWithProgramInputPlugin());
    ConfigLoader configLoader = embulkTestRuntime.getInjector().getInstance(ConfigLoader.class);
    configSource = configLoader.fromYaml(this.getClass().getResourceAsStream("/config/rest_config.yaml"));
    mockMarketoRestClient = Mockito.mock(MarketoRestClient.class);
    Mockito.doReturn(mockMarketoRestClient).when(leadWithProgramInputPlugin).createMarketoRestClient(any(LeadWithProgramInputPlugin.PluginTask.class));
}
 
开发者ID:treasure-data,项目名称:embulk-input-marketo,代码行数:10,代码来源:LeadWithProgramInputPluginTest.java

示例9: prepare

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
@Before
public void prepare() throws IOException
{
    baseBulkExtractInputPlugin = Mockito.mock(MarketoBaseBulkExtractInputPlugin.class, Mockito.CALLS_REAL_METHODS);
    ConfigLoader configLoader = embulkTestRuntime.getInjector().getInstance(ConfigLoader.class);
    ConfigSource configSource = configLoader.fromYaml(
            this.getClass().getResourceAsStream("/config/activity_bulk_extract_config.yaml"));
    validBaseTask = configSource.loadConfig(MarketoBaseBulkExtractInputPlugin.PluginTask.class);
}
 
开发者ID:treasure-data,项目名称:embulk-input-marketo,代码行数:10,代码来源:MarketoBaseBulkExtractInputPluginTest.java

示例10: prepare

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
@Before
public void prepare() throws IOException
{
    activityBulkExtractInputPlugin = Mockito.spy(new ActivityBulkExtractInputPlugin());
    ConfigLoader configLoader = embulkTestRuntime.getInjector().getInstance(ConfigLoader.class);
    configSource = configLoader.fromYaml(this.getClass().getResourceAsStream("/config/activity_bulk_extract_config.yaml"));
    mockMarketoRestclient = Mockito.mock(MarketoRestClient.class);
    Mockito.doReturn(mockMarketoRestclient).when(activityBulkExtractInputPlugin).createMarketoRestClient(any(ActivityBulkExtractInputPlugin.PluginTask.class));
}
 
开发者ID:treasure-data,项目名称:embulk-input-marketo,代码行数:10,代码来源:ActivityBulkExtractInputPluginTest.java

示例11: getConfigFromYamlFile

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
private ConfigSource getConfigFromYamlFile(File yamlFile)
        throws IOException
{
    ConfigLoader loader = new ConfigLoader(Exec.getModelManager());
    return loader.fromYamlFile(yamlFile);
}
 
开发者ID:hiroyuki-sato,项目名称:embulk-parser-jsonpath,代码行数:7,代码来源:TestJsonpathParserPlugin.java

示例12: getConfigFromYaml

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
private ConfigSource getConfigFromYaml(String yaml)
{
    ConfigLoader loader = new ConfigLoader(Exec.getModelManager());
    return loader.fromYamlString(yaml);
}
 
开发者ID:embulk,项目名称:embulk-output-sftp,代码行数:6,代码来源:TestSftpFileOutputPlugin.java

示例13: getConfigLoader

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
public ConfigLoader getConfigLoader() {
	if (configLoader == null) {
		configLoader = getEmbulkEmbed().newConfigLoader();
	}
	return configLoader;
}
 
开发者ID:hishidama,项目名称:embulk-parser-poi_excel,代码行数:7,代码来源:EmbulkPluginTester.java

示例14: loadConfigFromYaml

import org.embulk.config.ConfigLoader; //导入依赖的package包/类
private ConfigSource loadConfigFromYaml(String yaml)
{
    ConfigLoader loader = new ConfigLoader(runtime.getModelManager());
    return loader.fromYamlString(yaml);
}
 
开发者ID:civitaspo,项目名称:embulk-filter-distinct,代码行数:6,代码来源:TestDistinctFilterPlugin.java


注:本文中的org.embulk.config.ConfigLoader类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。