本文整理汇总了Java中org.embulk.spi.unit.LocalFile类的典型用法代码示例。如果您正苦于以下问题:Java LocalFile类的具体用法?Java LocalFile怎么用?Java LocalFile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LocalFile类属于org.embulk.spi.unit包,在下文中一共展示了LocalFile类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: localFileToPathString
import org.embulk.spi.unit.LocalFile; //导入依赖的package包/类
private Function<LocalFile, String> localFileToPathString()
{
return new Function<LocalFile, String>()
{
public String apply(LocalFile file)
{
return file.getPath().toString();
}
};
}
示例2: transaction
import org.embulk.spi.unit.LocalFile; //导入依赖的package包/类
@Override
public ConfigDiff transaction(ConfigSource config,
int taskCount,
FileOutputPlugin.Control control)
{
PluginTask task = config.loadConfig(PluginTask.class);
if (task.getP12KeyfilePath().isPresent()) {
if (task.getP12Keyfile().isPresent()) {
throw new ConfigException("Setting both p12_keyfile_path and p12_keyfile is invalid");
}
try {
task.setP12Keyfile(Optional.of(LocalFile.of(task.getP12KeyfilePath().get())));
}
catch (IOException ex) {
throw Throwables.propagate(ex);
}
}
if (task.getAuthMethod().getString().equals("json_key")) {
if (!task.getJsonKeyfile().isPresent()) {
throw new ConfigException("If auth_method is json_key, you have to set json_keyfile");
}
}
else if (task.getAuthMethod().getString().equals("private_key")) {
if (!task.getP12Keyfile().isPresent() || !task.getServiceAccountEmail().isPresent()) {
throw new ConfigException("If auth_method is private_key, you have to set both service_account_email and p12_keyfile");
}
}
return resume(task.dump(), taskCount, control);
}
示例3: getAvsc
import org.embulk.spi.unit.LocalFile; //导入依赖的package包/类
@Config("avsc")
LocalFile getAvsc();
示例4: getSecretKeyFilePath
import org.embulk.spi.unit.LocalFile; //导入依赖的package包/类
@Config("secret_key_file")
@ConfigDefault("null")
public Optional<LocalFile> getSecretKeyFilePath();
示例5: getP12Keyfile
import org.embulk.spi.unit.LocalFile; //导入依赖的package包/类
@Config("p12_keyfile")
@ConfigDefault("null")
Optional<LocalFile> getP12Keyfile();
示例6: getJsonKeyfile
import org.embulk.spi.unit.LocalFile; //导入依赖的package包/类
@Config("json_keyfile")
@ConfigDefault("null")
Optional<LocalFile> getJsonKeyfile();
示例7: setSecretKeyFilePath
import org.embulk.spi.unit.LocalFile; //导入依赖的package包/类
public void setSecretKeyFilePath(Optional<LocalFile> secretKeyFilePath);
示例8: setP12Keyfile
import org.embulk.spi.unit.LocalFile; //导入依赖的package包/类
void setP12Keyfile(Optional<LocalFile> p12Keyfile);