public Throwable call() { try (SetCurrentThreadName dontCare = new SetCurrentThreadName(String.format("task-%04d", taskIndex))) { runInputTask(Exec.session(), task, state, taskIndex); return null; } } });
@Deprecated // @see docs/design/slf4j.md @SuppressWarnings("deprecation") public static Logger getLogger(String name) { return session().getLogger(name); }
@Deprecated // @see docs/design/slf4j.md @SuppressWarnings("deprecation") public static Logger getLogger(Class<?> name) { return session().getLogger(name); }
@Deprecated // https://github.com/embulk/embulk/issues/933 @SuppressWarnings("deprecation") public static org.embulk.config.CommitReport newCommitReport() { return session().newCommitReport(); }
public static boolean isPreview() { return session().isPreview(); } }
public static ConfigDiff newConfigDiff() { return session().newConfigDiff(); }
public static TaskSource newTaskSource() { return session().newTaskSource(); }
public static TempFileSpace getTempFileSpace() { return session().getTempFileSpace(); }
public static <T> T newPlugin(Class<T> iface, PluginType type) { return session().newPlugin(iface, type); }
public static Timestamp getTransactionTime() { return session().getTransactionTime(); }
public static ConfigSource newConfigSource() { return session().newConfigSource(); }
public static BufferAllocator getBufferAllocator() { return session().getBufferAllocator(); }
public static ModelManager getModelManager() { return session().getModelManager(); }
public static TaskReport newTaskReport() { return session().newTaskReport(); }
protected List<FilterPlugin> newFilterPlugins(PreviewTask task) { return Filters.newFilterPluginsFromConfigSources(Exec.session(), task.getFilterConfigs()); }
protected List<DecoderPlugin> newDecoderPlugins(RunnerTask task) { return Decoders.newDecoderPlugins(Exec.session(), task.getDecoderConfigs()); }
protected List<EncoderPlugin> newEncoderPlugins(RunnerTask task) { return Encoders.newEncoderPlugins(Exec.session(), task.getEncoderConfigs()); }
private void cleanupCommittedTransaction(ConfigSource config, LoaderState state) { try { doCleanup(config, state.buildResumeState(Exec.session())); } catch (Exception ex) { state.getLogger().warn("Commit succeeded but cleanup failed. Ignoring this exception.", ex); // TODO } }
public ProcessPluginSet(BulkLoaderTask task) { this.inputPluginType = task.getInputConfig().get(PluginType.class, "type"); this.outputPluginType = task.getOutputConfig().get(PluginType.class, "type"); this.filterPluginTypes = Filters.getPluginTypes(task.getFilterConfigs()); this.inputPlugin = Exec.newPlugin(InputPlugin.class, inputPluginType); this.outputPlugin = Exec.newPlugin(OutputPlugin.class, outputPluginType); this.filterPlugins = Filters.newFilterPlugins(Exec.session(), filterPluginTypes); }