@EventDriven @SideEffectFree @SupportsBatching @Tags(value={"segment","split"}) @InputRequirement(value=INPUT_REQUIRED) @CapabilityDescription(value="Segments a FlowFile into multiple smaller segments on byte boundaries. Each segment is given the following attributes: fragment.identifier, fragment.index, fragment.count, segment.original.filename; these attributes can then be used by the MergeContent processor in order to reconstitute the original FlowFile") @WritesAttribute(attribute="segment.identifier",description="All segments produced from the same parent FlowFile will have the same randomly generated UUID added for this attribute. This attribute is added to maintain backward compatibility, but the fragment.identifier is preferred, as it is designed to work in conjunction with the MergeContent Processor") @WritesAttribute(attribute="segment.index",description="A one-up number that indicates the ordering of the segments that were created from a single parent FlowFile. This attribute is added to maintain backward compatibility, but the fragment.index is preferred, as it is designed to work in conjunction with the MergeContent Processor") @WritesAttribute(attribute="segment.count",description="The number of segments generated from the parent FlowFile. This attribute is added to maintain backward compatibility, but the fragment.count is preferred, as it is designed to work in conjunction with the MergeContent Processor") @WritesAttribute(attribute="fragment.identifier",description="All segments produced from the same parent FlowFile will have the same randomly generated UUID added for this attribute") @WritesAttribute(attribute="fragment.index",description="A one-up number that indicates the ordering of the segments that were created from a single parent FlowFile") @WritesAttribute(attribute="fragment.count",description="The number of segments generated from the parent FlowFile") @WritesAttribute(attribute="segment.original.filename ",description="The filename of the parent FlowFile") @WritesAttribute(attribute="segment.original.filename ",description="The filename will be updated to include the parent\'s filename, the segment index, and the segment count") @SeeAlso(value=MergeContent.class) public class SegmentContent extends AbstractProcessor
Modifier and Type | Field and Description |
---|---|
static String |
FRAGMENT_COUNT |
static String |
FRAGMENT_ID |
static String |
FRAGMENT_INDEX |
private List<PropertyDescriptor> |
propertyDescriptors |
static Relationship |
REL_ORIGINAL |
static Relationship |
REL_SEGMENTS |
private Set<Relationship> |
relationships |
static String |
SEGMENT_COUNT |
static String |
SEGMENT_ID |
static String |
SEGMENT_INDEX |
static String |
SEGMENT_ORIGINAL_FILENAME |
static PropertyDescriptor |
SIZE |
Constructor and Description |
---|
SegmentContent() |
Modifier and Type | Method and Description |
---|---|
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ProcessorInitializationContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
public static final String SEGMENT_ID
public static final String SEGMENT_INDEX
public static final String SEGMENT_COUNT
public static final String SEGMENT_ORIGINAL_FILENAME
public static final String FRAGMENT_ID
public static final String FRAGMENT_INDEX
public static final String FRAGMENT_COUNT
public static final PropertyDescriptor SIZE
public static final Relationship REL_SEGMENTS
public static final Relationship REL_ORIGINAL
private Set<Relationship> relationships
private List<PropertyDescriptor> propertyDescriptors
protected void init(ProcessorInitializationContext context)
init
in class AbstractSessionFactoryProcessor
public Set<Relationship> getRelationships()
getRelationships
in interface Processor
getRelationships
in class AbstractSessionFactoryProcessor
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
public void onTrigger(ProcessContext context, ProcessSession session)
onTrigger
in class AbstractProcessor
Copyright © 2020 Apache NiFi Project. All rights reserved.