Class MockRecordParser
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.controller.AbstractControllerService
org.apache.nifi.serialization.record.MockRecordParser
- All Implemented Interfaces:
ConfigurableComponent,ControllerService,RecordReaderFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate MockRecordFailureTypeprivate final List<RecordField> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddSchemaField(String fieldName, RecordFieldType type) voidaddSchemaField(String fieldName, RecordFieldType type, boolean isNullable) voidaddSchemaField(RecordField recordField) createRecordReader(Map<String, String> variables, InputStream in, long inputLength, ComponentLog logger) voidfailAfter(int failAfterN) voidfailAfter(int failAfterN, MockRecordFailureType failureType) Methods inherited from class org.apache.nifi.controller.AbstractControllerService
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabledMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, toString, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.controller.ControllerService
initialize, isStateful, migratePropertiesMethods inherited from interface org.apache.nifi.serialization.RecordReaderFactory
createRecordReader
-
Field Details
-
records
-
fields
-
failAfterN
private int failAfterN -
failureType
-
-
Constructor Details
-
MockRecordParser
public MockRecordParser() -
MockRecordParser
public MockRecordParser(int failAfterN)
-
-
Method Details
-
failAfter
public void failAfter(int failAfterN) -
failAfter
-
addSchemaField
-
addSchemaField
-
addSchemaField
-
addRecord
-
createRecordReader
public RecordReader createRecordReader(Map<String, String> variables, InputStream in, long inputLength, ComponentLog logger) throws IOException, SchemaNotFoundException- Specified by:
createRecordReaderin interfaceRecordReaderFactory- Throws:
IOExceptionSchemaNotFoundException
-