本文整理汇总了Java中org.embulk.spi.Exec.getModelManager方法的典型用法代码示例。如果您正苦于以下问题:Java Exec.getModelManager方法的具体用法?Java Exec.getModelManager怎么用?Java Exec.getModelManager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.embulk.spi.Exec
的用法示例。
在下文中一共展示了Exec.getModelManager方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadConfigSource
import org.embulk.spi.Exec; //导入方法依赖的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: taskFromYamlString
import org.embulk.spi.Exec; //导入方法依赖的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);
}
示例3: configFromYamlString
import org.embulk.spi.Exec; //导入方法依赖的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);
}
示例4: getConfigFromYamlFile
import org.embulk.spi.Exec; //导入方法依赖的package包/类
private ConfigSource getConfigFromYamlFile(File yamlFile)
throws IOException
{
ConfigLoader loader = new ConfigLoader(Exec.getModelManager());
return loader.fromYamlFile(yamlFile);
}
示例5: getConfigFromYaml
import org.embulk.spi.Exec; //导入方法依赖的package包/类
private ConfigSource getConfigFromYaml(String yaml)
{
ConfigLoader loader = new ConfigLoader(Exec.getModelManager());
return loader.fromYamlString(yaml);
}