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


Java ConfigLoader.fromYaml方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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


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