private void guessInternal(final ConfigSource configSource, final Path outputPath) throws IOException {
        try {
            checkFileWritable(outputPath);
        } catch (IOException ex) {
            throw new RuntimeException("Not writable: " + outputPath.toString());
        }

        final ConfigDiff configDiff = this.embed.guess(configSource);
        final ConfigSource guessedConfigSource = configSource.merge(configDiff);
        final String yaml = writeConfig(outputPath, guessedConfigSource);
        System.err.println(yaml);
        if (outputPath != null) {
            System.out.println("Created '" + outputPath + "' file.");
        } else {
            System.out.println("Use -o PATH option to write the guessed config file to a file.");
        }
    }
Runs the run subcommand.

It receives a ConfigSource and a String as parameters to be called from Ruby (embulk/runner.rb).
embulk-core/src/main/java/org/embulk/EmbulkRunner.java