Interface SchemaReferenceWriter
- All Superinterfaces:
ConfigurableComponent,ControllerService
Service interface responsible for writing Schema Identifier reference information to attributes or encoded content information
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributes(RecordSchema recordSchema) Get Attributes containing Record Schema content or references based on service implementation requirementsGet required Record Schema Fields for writing schema informationvoidvalidateSchema(RecordSchema recordSchema) Validate provided Record Schema for required information or throw SchemaNotFoundException indicating missing fieldsvoidwriteHeader(RecordSchema recordSchema, OutputStream outputStream) Writer Record Schema to the provided OutputStream as header information when requiredMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.controller.ControllerService
initialize, isStateful, migrateProperties
-
Method Details
-
writeHeader
Writer Record Schema to the provided OutputStream as header information when required- Parameters:
recordSchema- Record Schema to be written to the provided Output StreamoutputStream- Output Stream to which the provided Record Schema should be written- Throws:
IOException- Thrown in failure to write Record Schema to the Output Stream
-
getAttributes
Get Attributes containing Record Schema content or references based on service implementation requirements- Returns:
- Attributes containing Record Schema information or empty when not populated
-
validateSchema
Validate provided Record Schema for required information or throw SchemaNotFoundException indicating missing fields- Parameters:
recordSchema- Record Schema to be validated- Throws:
SchemaNotFoundException- Thrown when the provided Record Schema is missing required information
-
getRequiredSchemaFields
Set<SchemaField> getRequiredSchemaFields()Get required Record Schema Fields for writing schema information- Returns:
- Required Record Schema Fields
-