@SupportsBatching @Tags(value={"test","random","generate","load"}) @InputRequirement(value=INPUT_FORBIDDEN) @CapabilityDescription(value="This processor creates FlowFiles with random data or custom content. GenerateFlowFile is useful for load testing, configuration, and simulation. Also see DuplicateFlowFile for additional load testing.") @DynamicProperty(name="Generated FlowFile attribute name", value="Generated FlowFile attribute value", expressionLanguageScope=VARIABLE_REGISTRY, description="Specifies an attribute on generated FlowFiles defined by the Dynamic Property\'s key and value. If Expression Language is used, evaluation will be performed only once per batch of generated FlowFiles.") public class GenerateFlowFile extends AbstractProcessor
Modifier and Type | Field and Description |
---|---|
static PropertyDescriptor |
BATCH_SIZE |
static PropertyDescriptor |
CHARSET |
static PropertyDescriptor |
CUSTOM_TEXT |
private AtomicReference<byte[]> |
data |
static PropertyDescriptor |
DATA_FORMAT |
static String |
DATA_FORMAT_BINARY |
static String |
DATA_FORMAT_TEXT |
private List<PropertyDescriptor> |
descriptors |
static PropertyDescriptor |
FILE_SIZE |
static PropertyDescriptor |
MIME_TYPE |
private Set<Relationship> |
relationships |
static Relationship |
SUCCESS |
private static char[] |
TEXT_CHARS |
static PropertyDescriptor |
UNIQUE_FLOWFILES |
Constructor and Description |
---|
GenerateFlowFile() |
Modifier and Type | Method and Description |
---|---|
protected Collection<ValidationResult> |
customValidate(ValidationContext validationContext) |
private byte[] |
generateData(ProcessContext context) |
Set<Relationship> |
getRelationships() |
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ProcessorInitializationContext context) |
void |
onScheduled(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
equals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
private final AtomicReference<byte[]> data
public static final String DATA_FORMAT_BINARY
public static final String DATA_FORMAT_TEXT
public static final PropertyDescriptor FILE_SIZE
public static final PropertyDescriptor BATCH_SIZE
public static final PropertyDescriptor DATA_FORMAT
public static final PropertyDescriptor UNIQUE_FLOWFILES
public static final PropertyDescriptor CUSTOM_TEXT
public static final PropertyDescriptor CHARSET
public static final PropertyDescriptor MIME_TYPE
public static final Relationship SUCCESS
private List<PropertyDescriptor> descriptors
private Set<Relationship> relationships
private static final char[] TEXT_CHARS
protected void init(ProcessorInitializationContext context)
init
in class AbstractSessionFactoryProcessor
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor
in class AbstractConfigurableComponent
public Set<Relationship> getRelationships()
getRelationships
in interface Processor
getRelationships
in class AbstractSessionFactoryProcessor
@OnScheduled public void onScheduled(ProcessContext context)
protected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate
in class AbstractConfigurableComponent
private byte[] generateData(ProcessContext context)
public void onTrigger(ProcessContext context, ProcessSession session)
onTrigger
in class AbstractProcessor
Copyright © 2021 Apache NiFi Project. All rights reserved.