Class SampleRecord
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.SampleRecord
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor
@SideEffectFree
@SupportsBatching
@Tags({"record","sample","reservoir","range","interval"})
@InputRequirement(INPUT_REQUIRED)
@CapabilityDescription("Samples the records of a FlowFile based on a specified sampling strategy (such as Reservoir Sampling). The resulting FlowFile may be of a fixed number of records (in the case of reservoir-based algorithms) or some subset of the total number of records (in the case of probabilistic sampling), or a deterministic number of records (in the case of interval sampling).")
@SystemResourceConsideration(resource=MEMORY)
@WritesAttribute(attribute="mime.type",description="The MIME type indicated by the record writer") @WritesAttribute(attribute="record.count",description="The number of records in the resulting flow file")
public class SampleRecord
extends org.apache.nifi.processor.AbstractProcessor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static class(package private) static class(package private) static class(package private) static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Pattern(package private) static final org.apache.nifi.components.AllowableValue(package private) static final String(package private) static final org.apache.nifi.components.AllowableValue(package private) static final Stringprivate static final List<org.apache.nifi.components.PropertyDescriptor> (package private) static final org.apache.nifi.components.PropertyDescriptorprivate static final Pattern(package private) static final org.apache.nifi.components.AllowableValue(package private) static final Stringprivate static final String(package private) static final org.apache.nifi.components.PropertyDescriptor(package private) static final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.processor.Relationshipstatic final org.apache.nifi.processor.Relationshipstatic final org.apache.nifi.processor.Relationshipprivate static final Set<org.apache.nifi.processor.Relationship> (package private) static final org.apache.nifi.components.AllowableValue(package private) static final String(package private) static final org.apache.nifi.components.PropertyDescriptor(package private) static final org.apache.nifi.components.PropertyDescriptor(package private) static final org.apache.nifi.components.PropertyDescriptor(package private) static final org.apache.nifi.components.PropertyDescriptor(package private) static final org.apache.nifi.components.PropertyDescriptor -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.nifi.processor.AbstractProcessor
onTriggerMethods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.processor.Processor
isStateful, migrateProperties, migrateRelationships
-
Field Details
-
INTERVAL_SAMPLING_KEY
- See Also:
-
RANGE_SAMPLING_KEY
- See Also:
-
PROBABILISTIC_SAMPLING_KEY
- See Also:
-
RESERVOIR_SAMPLING_KEY
- See Also:
-
INTERVAL_SAMPLING
static final org.apache.nifi.components.AllowableValue INTERVAL_SAMPLING -
RANGE_SAMPLING
static final org.apache.nifi.components.AllowableValue RANGE_SAMPLING -
PROBABILISTIC_SAMPLING
static final org.apache.nifi.components.AllowableValue PROBABILISTIC_SAMPLING -
RESERVOIR_SAMPLING
static final org.apache.nifi.components.AllowableValue RESERVOIR_SAMPLING -
RANGE_SEPARATOR
- See Also:
-
RANGE_PATTERN
-
INTERVAL_PATTERN
-
RECORD_READER_FACTORY
static final org.apache.nifi.components.PropertyDescriptor RECORD_READER_FACTORY -
RECORD_WRITER_FACTORY
static final org.apache.nifi.components.PropertyDescriptor RECORD_WRITER_FACTORY -
SAMPLING_STRATEGY
static final org.apache.nifi.components.PropertyDescriptor SAMPLING_STRATEGY -
SAMPLING_INTERVAL
static final org.apache.nifi.components.PropertyDescriptor SAMPLING_INTERVAL -
SAMPLING_RANGE
static final org.apache.nifi.components.PropertyDescriptor SAMPLING_RANGE -
SAMPLING_PROBABILITY
static final org.apache.nifi.components.PropertyDescriptor SAMPLING_PROBABILITY -
RESERVOIR_SIZE
static final org.apache.nifi.components.PropertyDescriptor RESERVOIR_SIZE -
RANDOM_SEED
static final org.apache.nifi.components.PropertyDescriptor RANDOM_SEED -
PROPERTY_DESCRIPTORS
-
REL_ORIGINAL
public static final org.apache.nifi.processor.Relationship REL_ORIGINAL -
REL_SUCCESS
public static final org.apache.nifi.processor.Relationship REL_SUCCESS -
REL_FAILURE
public static final org.apache.nifi.processor.Relationship REL_FAILURE -
RELATIONSHIPS
-
-
Constructor Details
-
SampleRecord
public SampleRecord()
-
-
Method Details
-
getRelationships
- Specified by:
getRelationshipsin interfaceorg.apache.nifi.processor.Processor- Overrides:
getRelationshipsin classorg.apache.nifi.processor.AbstractSessionFactoryProcessor
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
onTrigger
public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) throws org.apache.nifi.processor.exception.ProcessException - Specified by:
onTriggerin classorg.apache.nifi.processor.AbstractProcessor- Throws:
org.apache.nifi.processor.exception.ProcessException
-