本文整理汇总了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);
}
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}