Class MockRecordParser

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.controller.AbstractControllerService
org.apache.nifi.serialization.record.MockRecordParser
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.controller.ControllerService, RecordReaderFactory

public class MockRecordParser extends org.apache.nifi.controller.AbstractControllerService implements RecordReaderFactory
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
     
     
    private final List<org.apache.nifi.serialization.record.RecordField>
     
    private final List<Object[]>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    MockRecordParser(int failAfterN)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addRecord(Object... values)
     
    void
    addSchemaField(String fieldName, org.apache.nifi.serialization.record.RecordFieldType type)
     
    void
    addSchemaField(String fieldName, org.apache.nifi.serialization.record.RecordFieldType type, boolean isNullable)
     
    void
    addSchemaField(org.apache.nifi.serialization.record.RecordField recordField)
     
    createRecordReader(Map<String,String> variables, InputStream in, long inputLength, org.apache.nifi.logging.ComponentLog logger)
     
    void
    failAfter(int failAfterN)
     
    void
    failAfter(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, isEnabled

    Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent

    customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, toString, validate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.controller.ControllerService

    initialize, isStateful, migrateProperties

    Methods inherited from interface org.apache.nifi.serialization.RecordReaderFactory

    createRecordReader
  • Field Details

    • records

      private final List<Object[]> records
    • fields

      private final List<org.apache.nifi.serialization.record.RecordField> fields
    • failAfterN

      private int failAfterN
    • failureType

      private MockRecordFailureType failureType
  • Constructor Details

    • MockRecordParser

      public MockRecordParser()
    • MockRecordParser

      public MockRecordParser(int failAfterN)
  • Method Details