Class RecordBin
java.lang.Object
org.apache.nifi.processors.standard.merge.RecordBin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final org.apache.nifi.processor.ProcessContextprivate final longprivate final List<org.apache.nifi.flowfile.FlowFile> private intprivate final longprivate static final AtomicLongprivate final org.apache.nifi.logging.ComponentLogprivate org.apache.nifi.flowfile.FlowFileprivate ByteCountingOutputStreamprivate final Lockprivate intprivate RecordSetWriterprivate intprivate final ReadWriteLockprivate final org.apache.nifi.processor.ProcessSessionprivate final RecordBinThresholdsprivate final Lockprivate final RecordSetWriterFactory -
Constructor Summary
ConstructorsConstructorDescriptionRecordBin(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session, org.apache.nifi.logging.ComponentLog logger, RecordBinThresholds thresholds) -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidfail()private longprivate intbooleanbooleanisFull()booleanbooleanisOlderThan(long period, TimeUnit unit) booleanisOlderThan(RecordBin other) booleanoffer(org.apache.nifi.flowfile.FlowFile flowFile, RecordReader recordReader, org.apache.nifi.processor.ProcessSession flowFileSession, boolean block) voidrollback()toString()private voidvalidateFragmentCount(String countAttributeName) Ensure that at least one FlowFile has a fragment.count attribute and that they all have the same value, if they have a value.
-
Field Details
-
logger
private final org.apache.nifi.logging.ComponentLog logger -
session
private final org.apache.nifi.processor.ProcessSession session -
writerFactory
-
thresholds
-
context
private final org.apache.nifi.processor.ProcessContext context -
flowFiles
-
rwLock
-
readLock
-
writeLock
-
creationNanos
private final long creationNanos -
merged
private org.apache.nifi.flowfile.FlowFile merged -
recordWriter
-
out
-
recordCount
private int recordCount -
fragmentCount
private int fragmentCount -
complete
private volatile boolean complete -
idGenerator
-
id
private final long id -
requiredRecordCount
private volatile int requiredRecordCount
-
-
Constructor Details
-
RecordBin
public RecordBin(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session, org.apache.nifi.logging.ComponentLog logger, RecordBinThresholds thresholds)
-
-
Method Details
-
isOlderThan
-
isOlderThan
-
isComplete
public boolean isComplete() -
offer
public boolean offer(org.apache.nifi.flowfile.FlowFile flowFile, RecordReader recordReader, org.apache.nifi.processor.ProcessSession flowFileSession, boolean block) throws IOException - Throws:
IOException
-
isFull
public boolean isFull() -
getMinimumRecordCount
private int getMinimumRecordCount() -
isFullEnough
public boolean isFullEnough() -
rollback
public void rollback() -
getBinAge
private long getBinAge() -
fail
private void fail() -
validateFragmentCount
Ensure that at least one FlowFile has a fragment.count attribute and that they all have the same value, if they have a value. -
complete
- Throws:
IOException
-
toString
-