@EventDriven @SideEffectFree @SupportsBatching @Tags(value={"json","jolt","transform","shiftr","chainr","defaultr","removr","cardinality","sort"}) @InputRequirement(value=INPUT_REQUIRED) @WritesAttribute(attribute="mime.type", description="Always set to application/json") @CapabilityDescription(value="Applies a list of Jolt specifications to the flowfile JSON payload. A new FlowFile is created with transformed content and is routed to the \'success\' relationship. If the JSON transform fails, the original FlowFile is routed to the \'failure\' relationship.") @RequiresInstanceClassLoading public class JoltTransformJSON extends AbstractProcessor
| Constructor and Description |
|---|
JoltTransformJSON() |
| Modifier and Type | Method and Description |
|---|---|
private com.bazaarvoice.jolt.JoltTransform |
createTransform(ProcessContext context,
FlowFile flowFile) |
protected Collection<ValidationResult> |
customValidate(ValidationContext validationContext) |
protected FilenameFilter |
getJarFilenameFilter() |
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
private com.bazaarvoice.jolt.JoltTransform |
getTransform(ProcessContext context,
FlowFile flowFile) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
private String |
readTransform(PropertyValue propertyValue) |
private String |
readTransform(PropertyValue propertyValue,
FlowFile flowFile) |
void |
setup(ProcessContext context) |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final AllowableValue SHIFTR
public static final AllowableValue CHAINR
public static final AllowableValue DEFAULTR
public static final AllowableValue REMOVR
public static final AllowableValue CARDINALITY
public static final AllowableValue SORTR
public static final AllowableValue CUSTOMR
public static final AllowableValue MODIFIER_DEFAULTR
public static final AllowableValue MODIFIER_OVERWRITER
public static final AllowableValue MODIFIER_DEFINER
public static final PropertyDescriptor JOLT_TRANSFORM
public static final PropertyDescriptor JOLT_SPEC
public static final PropertyDescriptor CUSTOM_CLASS
public static final PropertyDescriptor MODULES
static final PropertyDescriptor TRANSFORM_CACHE_SIZE
public static final PropertyDescriptor PRETTY_PRINT
public static final Relationship REL_SUCCESS
public static final Relationship REL_FAILURE
private static final List<PropertyDescriptor> properties
private static final Set<Relationship> relationships
private volatile ClassLoader customClassLoader
private static final String DEFAULT_CHARSET
private com.github.benmanes.caffeine.cache.Cache<Optional<String>,com.bazaarvoice.jolt.JoltTransform> transformCache
public Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorprotected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprotected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate in class AbstractConfigurableComponentpublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessExceptionprivate com.bazaarvoice.jolt.JoltTransform getTransform(ProcessContext context, FlowFile flowFile)
@OnScheduled public void setup(ProcessContext context)
private com.bazaarvoice.jolt.JoltTransform createTransform(ProcessContext context, FlowFile flowFile) throws Exception
Exceptionprivate String readTransform(PropertyValue propertyValue, FlowFile flowFile)
private String readTransform(PropertyValue propertyValue)
protected FilenameFilter getJarFilenameFilter()
Copyright © 2023 Apache NiFi Project. All rights reserved.