Class GenerateFlowFile
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.GenerateFlowFile
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent
,org.apache.nifi.processor.Processor
@SupportsBatching
@Tags({"test","random","generate","load"})
@InputRequirement(INPUT_FORBIDDEN)
@CapabilityDescription("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=ENVIRONMENT,
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.")
@WritesAttributes(@WritesAttribute(attribute="mime.type",description="Sets the MIME type of the output if the \'Mime Type\' property is set"))
@DefaultSchedule(strategy=TIMER_DRIVEN,
period="1 min")
public class GenerateFlowFile
extends org.apache.nifi.processor.AbstractProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptor
static final org.apache.nifi.components.PropertyDescriptor
static final org.apache.nifi.components.PropertyDescriptor
private final AtomicReference
<byte[]> static final org.apache.nifi.components.PropertyDescriptor
static final String
static final String
static final org.apache.nifi.components.PropertyDescriptor
static final org.apache.nifi.components.PropertyDescriptor
private static final List
<org.apache.nifi.components.PropertyDescriptor> private static final Set
<org.apache.nifi.processor.Relationship> static final org.apache.nifi.processor.Relationship
private static final char[]
static final org.apache.nifi.components.PropertyDescriptor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection
<org.apache.nifi.components.ValidationResult> customValidate
(org.apache.nifi.components.ValidationContext validationContext) private byte[]
generateData
(org.apache.nifi.processor.ProcessContext context) Set
<org.apache.nifi.processor.Relationship> protected org.apache.nifi.components.PropertyDescriptor
getSupportedDynamicPropertyDescriptor
(String propertyDescriptorName) protected List
<org.apache.nifi.components.PropertyDescriptor> void
onScheduled
(org.apache.nifi.processor.ProcessContext context) void
onTrigger
(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) Methods inherited from class org.apache.nifi.processor.AbstractProcessor
onTrigger
Methods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
equals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, validate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
Methods inherited from interface org.apache.nifi.processor.Processor
isStateful, migrateProperties, migrateRelationships
-
Field Details
-
data
-
DATA_FORMAT_BINARY
- See Also:
-
DATA_FORMAT_TEXT
- See Also:
-
FILE_SIZE
public static final org.apache.nifi.components.PropertyDescriptor FILE_SIZE -
BATCH_SIZE
public static final org.apache.nifi.components.PropertyDescriptor BATCH_SIZE -
DATA_FORMAT
public static final org.apache.nifi.components.PropertyDescriptor DATA_FORMAT -
UNIQUE_FLOWFILES
public static final org.apache.nifi.components.PropertyDescriptor UNIQUE_FLOWFILES -
CUSTOM_TEXT
public static final org.apache.nifi.components.PropertyDescriptor CUSTOM_TEXT -
CHARSET
public static final org.apache.nifi.components.PropertyDescriptor CHARSET -
MIME_TYPE
public static final org.apache.nifi.components.PropertyDescriptor MIME_TYPE -
PROPERTIES
-
SUCCESS
public static final org.apache.nifi.processor.Relationship SUCCESS -
RELATIONSHIPS
-
TEXT_CHARS
private static final char[] TEXT_CHARS
-
-
Constructor Details
-
GenerateFlowFile
public GenerateFlowFile()
-
-
Method Details
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptors
in classorg.apache.nifi.components.AbstractConfigurableComponent
-
getSupportedDynamicPropertyDescriptor
protected org.apache.nifi.components.PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) - Overrides:
getSupportedDynamicPropertyDescriptor
in classorg.apache.nifi.components.AbstractConfigurableComponent
-
getRelationships
- Specified by:
getRelationships
in interfaceorg.apache.nifi.processor.Processor
- Overrides:
getRelationships
in classorg.apache.nifi.processor.AbstractSessionFactoryProcessor
-
onScheduled
@OnScheduled public void onScheduled(org.apache.nifi.processor.ProcessContext context) -
customValidate
protected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext validationContext) - Overrides:
customValidate
in classorg.apache.nifi.components.AbstractConfigurableComponent
-
generateData
private byte[] generateData(org.apache.nifi.processor.ProcessContext context) -
onTrigger
public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) - Specified by:
onTrigger
in classorg.apache.nifi.processor.AbstractProcessor
-