Sha256: ae28f4f1f2908f2a440c28549026f16eacfa895d088daae6c432da0caaf66dcc

Contents?: true

Size: 1.15 KB

Versions: 3

Compression:

Stored size: 1.15 KB

Contents

package org.embulk.standards;

import org.embulk.config.ConfigSource;
import org.embulk.config.TaskSource;
import org.embulk.config.NextConfig;
import org.embulk.config.CommitReport;
import org.embulk.spi.Schema;
import org.embulk.spi.Page;
import org.embulk.spi.Exec;
import org.embulk.spi.OutputPlugin;
import org.embulk.spi.TransactionalPageOutput;

public class NullOutputPlugin
        implements OutputPlugin
{
    @Override
    public NextConfig transaction(ConfigSource config,
            Schema schema, int processorCount,
            OutputPlugin.Control control)
    {
        control.run(Exec.newTaskSource());
        return Exec.newNextConfig();
    }

    @Override
    public TransactionalPageOutput open(TaskSource taskSource, Schema schema, int processorIndex)
    {
        return new TransactionalPageOutput() {
            public void add(Page page)
            {
                page.release();
            }

            public void finish() { }

            public void close() { }

            public void abort() { }

            public CommitReport commit()
            {
                return Exec.newCommitReport();
            }
        };
    }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
embulk-0.2.1 embulk-standards/src/main/java/org/embulk/standards/NullOutputPlugin.java
embulk-0.2.0 embulk-standards/src/main/java/org/embulk/standards/NullOutputPlugin.java
embulk-0.1.0 embulk-standards/src/main/java/org/embulk/standards/NullOutputPlugin.java