Constructor and Description |
---|
CallablePipesIterator(PipesIterator pipesIterator,
ArrayBlockingQueue<FetchEmitTuple> queue)
This sets timeoutMillis to -1, meaning that
this will block forever trying to add fetchemittuples to the queue.
|
CallablePipesIterator(PipesIterator pipesIterator,
ArrayBlockingQueue<FetchEmitTuple> queue,
long timeoutMillis)
This sets the number of
PipesIterator.COMPLETED_SEMAPHORE to 1. |
CallablePipesIterator(PipesIterator pipesIterator,
ArrayBlockingQueue<FetchEmitTuple> queue,
long timeoutMillis,
int numConsumers) |
public CallablePipesIterator(PipesIterator pipesIterator, ArrayBlockingQueue<FetchEmitTuple> queue)
PipesIterator.COMPLETED_SEMAPHORE
to 1.
This means that your consumers must put the semaphore back in the queue
after they finish.pipesIterator
- queue
- public CallablePipesIterator(PipesIterator pipesIterator, ArrayBlockingQueue<FetchEmitTuple> queue, long timeoutMillis)
PipesIterator.COMPLETED_SEMAPHORE
to 1.
This means that your consumers must put the semaphore back in the queue
after they finish.pipesIterator
- underlying pipes iterator to usequeue
- queue to add the fetch emit tuples totimeoutMillis
- how long to try to offer the fetch emit tuples to the queue. If -1,
this will block with ArrayBlockingQueue.put(Object)
forever.public CallablePipesIterator(PipesIterator pipesIterator, ArrayBlockingQueue<FetchEmitTuple> queue, long timeoutMillis, int numConsumers)
pipesIterator
- underlying pipes iterator to usequeue
- queue to add the fetch emit tuples totimeoutMillis
- how long to try to offer the fetch emit tuples to the queue. If -1,
this will block with ArrayBlockingQueue.put(Object)
forever.numConsumers
- how many PipesIterator.COMPLETED_SEMAPHORE
to add to the
queue. If the consumers are adding this back to the queue when they
find it, then this should be set to 1, otherwise, for a single semaphore
for each consumer, set this to the number of consumersCopyright © 2007–2023 The Apache Software Foundation. All rights reserved.