Search in sources :

Example 1 with CommaSeparatedRecordReader

use of org.apache.nifi.serialization.record.CommaSeparatedRecordReader in project nifi by apache.

the class TestMergeRecord method setup.

@Before
public void setup() throws InitializationException {
    runner = TestRunners.newTestRunner(new MergeRecord());
    readerService = new CommaSeparatedRecordReader();
    writerService = new MockRecordWriter("header", false);
    runner.addControllerService("reader", readerService);
    runner.enableControllerService(readerService);
    runner.addControllerService("writer", writerService);
    runner.enableControllerService(writerService);
    runner.setProperty(MergeRecord.RECORD_READER, "reader");
    runner.setProperty(MergeRecord.RECORD_WRITER, "writer");
}
Also used : CommaSeparatedRecordReader(org.apache.nifi.serialization.record.CommaSeparatedRecordReader) MockRecordWriter(org.apache.nifi.serialization.record.MockRecordWriter) Before(org.junit.Before)

Aggregations

CommaSeparatedRecordReader (org.apache.nifi.serialization.record.CommaSeparatedRecordReader)1 MockRecordWriter (org.apache.nifi.serialization.record.MockRecordWriter)1 Before (org.junit.Before)1