public class MockRecordParser extends AbstractControllerService implements RecordReaderFactory
Constructor and Description |
---|
MockRecordParser() |
MockRecordParser(int failAfterN) |
Modifier and Type | Method and Description |
---|---|
void |
addRecord(java.lang.Object... values) |
void |
addSchemaField(java.lang.String fieldName,
RecordFieldType type) |
RecordReader |
createRecordReader(java.util.Map<java.lang.String,java.lang.String> variables,
java.io.InputStream in,
ComponentLog logger)
Create a RecordReader instance to read records from specified InputStream.
|
void |
failAfter(int failAfterN) |
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getProperty, getStateManager, init, initialize, isEnabled
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
createRecordReader
initialize
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
public MockRecordParser()
public MockRecordParser(int failAfterN)
public void failAfter(int failAfterN)
public void addSchemaField(java.lang.String fieldName, RecordFieldType type)
public void addRecord(java.lang.Object... values)
public RecordReader createRecordReader(java.util.Map<java.lang.String,java.lang.String> variables, java.io.InputStream in, ComponentLog logger) throws java.io.IOException, SchemaNotFoundException
RecordReaderFactory
createRecordReader
in interface RecordReaderFactory
variables
- A map contains variables which is used to resolve Record Schema via Expression Language dynamically.
This can be null or empty.in
- InputStream containing Records. This can be null or empty stream.logger
- A logger bind to a componentjava.io.IOException
SchemaNotFoundException