public abstract class AbstractDataCollector extends Object
| Modifier and Type | Field and Description |
|---|---|
protected RawBatchBuffer[] |
buffers |
protected ArrayWrappedIntIntMap |
fragmentMap |
static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
AbstractDataCollector(AtomicInteger parentAccounter,
int numBuffers,
BitControl.Collector collector,
int bufferCapacity,
FragmentContext context) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
batchArrived(int minorFragmentId,
RawFragmentBatch batch) |
void |
close() |
protected abstract RawBatchBuffer |
getBuffer(int minorFragmentId) |
RawBatchBuffer[] |
getBuffers() |
int |
getOppositeMajorFragmentId() |
int |
getTotalIncomingFragments() |
protected final RawBatchBuffer[] buffers
protected final ArrayWrappedIntIntMap fragmentMap
public static final org.slf4j.Logger logger
public AbstractDataCollector(AtomicInteger parentAccounter, int numBuffers, BitControl.Collector collector, int bufferCapacity, FragmentContext context)
parentAccounter - receiver - numBuffers - Number of RawBatchBuffer inputs required to store the incoming databufferCapacity - Capacity of each RawBatchBuffer.context - public int getOppositeMajorFragmentId()
public RawBatchBuffer[] getBuffers()
public boolean batchArrived(int minorFragmentId,
RawFragmentBatch batch)
throws IOException
IOExceptionpublic int getTotalIncomingFragments()
protected abstract RawBatchBuffer getBuffer(int minorFragmentId)
Copyright © 2017 The Apache Software Foundation. All rights reserved.