@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.") @DefaultSchedule(strategy=TIMER_DRIVEN, period="1 min") 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) |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprivate 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 AbstractSessionFactoryProcessorprotected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprotected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor in class AbstractConfigurableComponentpublic Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessor@OnScheduled public void onScheduled(ProcessContext context)
protected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate in class AbstractConfigurableComponentprivate byte[] generateData(ProcessContext context)
public void onTrigger(ProcessContext context, ProcessSession session)
onTrigger in class AbstractProcessorCopyright © 2023 Apache NiFi Project. All rights reserved.