@SideEffectFree @SupportsBatching @Tags(value={"avro","convert","json"}) @InputRequirement(value=INPUT_REQUIRED) @CapabilityDescription(value="Converts a Binary Avro record into a JSON object. This processor provides a direct mapping of an Avro field to a JSON field, such that the resulting JSON will have the same hierarchical structure as the Avro document. Note that the Avro schema information will be lost, as this is not a translation from binary Avro to JSON formatted Avro. The output JSON is encoded the UTF-8 encoding. If an incoming FlowFile contains a stream of multiple Avro records, the resultant FlowFile will contain a JSON Array containing all of the Avro records or a sequence of JSON Objects. If an incoming FlowFile does not contain any records, an empty JSON object is the output. Empty/Single Avro record FlowFile inputs are optionally wrapped in a container as dictated by \'Wrap Single Record\'") @WritesAttribute(attribute="mime.type", description="Sets the mime type to application/json") public class ConvertAvroToJSON extends AbstractProcessor
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
CONTAINER_ARRAY |
protected static java.lang.String |
CONTAINER_NONE |
| Constructor and Description |
|---|
ConvertAvroToJSON() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<Relationship> |
getRelationships() |
protected java.util.List<PropertyDescriptor> |
getSupportedPropertyDescriptors()
Allows subclasses to register which property descriptor objects are
supported.
|
protected void |
init(ProcessorInitializationContext context)
Provides subclasses the ability to perform initialization logic
|
void |
onTrigger(ProcessContext context,
ProcessSession session) |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTruecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprotected static final java.lang.String CONTAINER_ARRAY
protected static final java.lang.String CONTAINER_NONE
protected void init(ProcessorInitializationContext context)
AbstractSessionFactoryProcessorinit in class AbstractSessionFactoryProcessorcontext - in which to perform initializationprotected java.util.List<PropertyDescriptor> getSupportedPropertyDescriptors()
AbstractConfigurableComponentgetSupportedPropertyDescriptors in class AbstractConfigurableComponentpublic java.util.Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorpublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessException