embulk-standards/src/main/java/org/embulk/standards/LocalFileOutputPlugin.java in embulk-0.4.3 vs embulk-standards/src/main/java/org/embulk/standards/LocalFileOutputPlugin.java in embulk-0.4.4

- old
+ new

@@ -38,38 +38,38 @@ } private final Logger log = Exec.getLogger(getClass()); @Override - public ConfigDiff transaction(ConfigSource config, int processorCount, + public ConfigDiff transaction(ConfigSource config, int taskCount, FileOutputPlugin.Control control) { PluginTask task = config.loadConfig(PluginTask.class); // validate sequence_format String.format(task.getSequenceFormat(), 0, 0); - return resume(task.dump(), processorCount, control); + return resume(task.dump(), taskCount, control); } @Override public ConfigDiff resume(TaskSource taskSource, - int processorCount, + int taskCount, FileOutputPlugin.Control control) { control.run(taskSource); return Exec.newConfigDiff(); } @Override public void cleanup(TaskSource taskSource, - int processorCount, + int taskCount, List<CommitReport> successCommitReports) { } @Override - public TransactionalFileOutput open(TaskSource taskSource, final int processorIndex) + public TransactionalFileOutput open(TaskSource taskSource, final int taskIndex) { PluginTask task = taskSource.loadTask(PluginTask.class); final String pathPrefix = task.getPathPrefix(); final String pathSuffix = task.getFileNameExtension(); @@ -82,10 +82,10 @@ private FileOutputStream output = null; public void nextFile() { closeFile(); - String path = pathPrefix + String.format(sequenceFormat, processorIndex, fileIndex) + pathSuffix; + String path = pathPrefix + String.format(sequenceFormat, taskIndex, fileIndex) + pathSuffix; log.info("Writing local file '{}'", path); fileNames.add(path); try { output = new FileOutputStream(new File(path)); } catch (FileNotFoundException ex) {