Class ArrayListRecordWriter
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.controller.AbstractControllerService
org.apache.nifi.serialization.record.ArrayListRecordWriter
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.controller.ControllerService,RecordSetWriterFactory
public class ArrayListRecordWriter
extends org.apache.nifi.controller.AbstractControllerService
implements RecordSetWriterFactory
An implementation that is suitable for testing that does not serialize the data to an Output Stream but instead just buffers the data into an
ArrayList and then provides that List of written records to the user.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.nifi.serialization.record.RecordSchemaprivate final List<org.apache.nifi.serialization.record.Record> private final org.apache.nifi.serialization.record.RecordSchema -
Constructor Summary
ConstructorsConstructorDescriptionArrayListRecordWriter(org.apache.nifi.serialization.record.RecordSchema schema) -
Method Summary
Modifier and TypeMethodDescriptioncreateWriter(org.apache.nifi.logging.ComponentLog logger, org.apache.nifi.serialization.record.RecordSchema schema, OutputStream out, Map<String, String> variables) org.apache.nifi.serialization.record.RecordSchemaList<org.apache.nifi.serialization.record.Record> org.apache.nifi.serialization.record.RecordSchemagetSchema(Map<String, String> variables, org.apache.nifi.serialization.record.RecordSchema readSchema) 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.RecordSetWriterFactory
createWriter
-
Field Details
-
records
-
schema
private final org.apache.nifi.serialization.record.RecordSchema schema -
declaredSchema
private volatile org.apache.nifi.serialization.record.RecordSchema declaredSchema
-
-
Constructor Details
-
ArrayListRecordWriter
public ArrayListRecordWriter(org.apache.nifi.serialization.record.RecordSchema schema)
-
-
Method Details
-
getDeclaredSchema
public org.apache.nifi.serialization.record.RecordSchema getDeclaredSchema() -
getSchema
public org.apache.nifi.serialization.record.RecordSchema getSchema(Map<String, String> variables, org.apache.nifi.serialization.record.RecordSchema readSchema) - Specified by:
getSchemain interfaceRecordSetWriterFactory
-
createWriter
public RecordSetWriter createWriter(org.apache.nifi.logging.ComponentLog logger, org.apache.nifi.serialization.record.RecordSchema schema, OutputStream out, Map<String, String> variables) - Specified by:
createWriterin interfaceRecordSetWriterFactory
-
getRecordsWritten
-