本文整理汇总了Java中org.embulk.spi.OutputPlugin.Control方法的典型用法代码示例。如果您正苦于以下问题:Java OutputPlugin.Control方法的具体用法?Java OutputPlugin.Control怎么用?Java OutputPlugin.Control使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.embulk.spi.OutputPlugin
的用法示例。
在下文中一共展示了OutputPlugin.Control方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: transaction
import org.embulk.spi.OutputPlugin; //导入方法依赖的package包/类
@Override
public ConfigDiff transaction(ConfigSource config,
Schema schema, int taskCount,
OutputPlugin.Control control)
{
PluginTask task = config.loadConfig(PluginTask.class);
control.run(task.dump());
return Exec.newConfigDiff();
}
示例2: resume
import org.embulk.spi.OutputPlugin; //导入方法依赖的package包/类
@Override
public ConfigDiff resume(TaskSource taskSource,
Schema schema, int taskCount,
OutputPlugin.Control control)
{
throw new UnsupportedOperationException("s3_per_record output plugin does not support resuming");
}
示例3: resume
import org.embulk.spi.OutputPlugin; //导入方法依赖的package包/类
@Override
public ConfigDiff resume(TaskSource taskSource,
Schema schema, int taskCount,
OutputPlugin.Control control)
{
throw new UnsupportedOperationException("salesforce output plugin does not support resuming");
}
示例4: transaction
import org.embulk.spi.OutputPlugin; //导入方法依赖的package包/类
public ConfigDiff transaction(ConfigSource config,
Schema schema, int processorCount,
OutputPlugin.Control control)
{
PluginTask task = config.loadConfig(PluginTask.class);
//TODO
control.run(task.dump());
return Exec.newConfigDiff();
}
示例5: transaction
import org.embulk.spi.OutputPlugin; //导入方法依赖的package包/类
@Override
public ConfigDiff transaction(ConfigSource config, Schema schema, int taskCount, OutputPlugin.Control control) {
PluginTask task = config.loadConfig(PluginTask.class);
control.run(task.dump());
return Exec.newConfigDiff();
}
示例6: resume
import org.embulk.spi.OutputPlugin; //导入方法依赖的package包/类
@Override
public ConfigDiff resume(TaskSource taskSource, Schema schema, int taskCount, OutputPlugin.Control control) {
// TODO
return Exec.newConfigDiff();
}
示例7: transaction
import org.embulk.spi.OutputPlugin; //导入方法依赖的package包/类
@Override
public ConfigDiff transaction(ConfigSource config,
Schema schema, int taskCount,
OutputPlugin.Control control)
{
PluginTask task = config.loadConfig(PluginTask.class);
logger = Exec.getLogger(getClass());
if (task.getResultDir().isPresent() && task.getResultDir().get() != null) {
File resultDir = new File(task.getResultDir().get());
if (!resultDir.exists() || !resultDir.isDirectory()) {
logger.error("{} is not exist or is not directory.", task.getResultDir().get());
throw new RuntimeException(task.getResultDir().get() + " is not exist or is not directory.");
}
}
final String username = task.getUsername();
final String password = task.getPassword();
final String loginEndpoint = task.getLoginEndpoint().get();
try {
if (client == null) {
ConnectorConfig connectorConfig = new ConnectorConfig();
connectorConfig.setUsername(username);
connectorConfig.setPassword(password);
connectorConfig.setAuthEndpoint(loginEndpoint + "/services/Soap/u/" +task.getVersion().get() + "/");
client = Connector.newConnection(connectorConfig);
GetUserInfoResult userInfo = client.getUserInfo();
logger.info("login successful with {}", userInfo.getUserName());
externalIdToObjectNameMap = new HashMap<>();
DescribeSObjectResult describeResult = client.describeSObject(task.getSObject());
for (Field field : describeResult.getFields()) {
if (field.getType() == FieldType.reference) {
externalIdToObjectNameMap.put(field.getRelationshipName(), field.getReferenceTo()[0]);
}
}
}
} catch(ConnectionException ex) {
logger.error("Login error. Please check your credentials.");
throw new RuntimeException(ex);
}
control.run(task.dump());
return Exec.newConfigDiff();
}
示例8: transaction
import org.embulk.spi.OutputPlugin; //导入方法依赖的package包/类
@Override
public ConfigDiff transaction(ConfigSource config, Schema schema, int taskCount, OutputPlugin.Control control) {
final PluginTask task = config.loadConfig(PluginTask.class);
return resume(task.dump(), schema, taskCount, control);
}
示例9: resume
import org.embulk.spi.OutputPlugin; //导入方法依赖的package包/类
@Override
public ConfigDiff resume(TaskSource taskSource, Schema schema, int taskCount, OutputPlugin.Control control) {
control.run(taskSource);
return Exec.newConfigDiff();
}
示例10: resume
import org.embulk.spi.OutputPlugin; //导入方法依赖的package包/类
public ConfigDiff resume(TaskSource taskSource,
Schema schema, int processorCount,
OutputPlugin.Control control)
{
throw new UnsupportedOperationException("parquet output plugin does not support resuming");
}