public class CollectProducer extends Producer
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
CollectProducer.WorkingThread
The working thread, which executes the child operator and send the tuples
to the paired CollectConsumer operator
|
Exchange.ParallelOperatorID| Modifier and Type | Field and Description |
|---|---|
private DbIterator |
child |
private java.net.InetSocketAddress |
collectConsumerAddr
The paired collect consumer address
|
private CollectProducer.WorkingThread |
runningThread |
private static long |
serialVersionUID |
operatorID| Constructor and Description |
|---|
CollectProducer(DbIterator child,
Exchange.ParallelOperatorID operatorID,
java.net.InetSocketAddress collectServerAddr) |
CollectProducer(DbIterator child,
Exchange.ParallelOperatorID operatorID,
java.lang.String collectServerHost,
int collectServerPort) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this iterator.
|
protected Tuple |
fetchNext()
Returns the next Tuple in the iterator, or null if the iteration is
finished.
|
DbIterator[] |
getChildren() |
java.net.InetSocketAddress |
getCollectServerAddr() |
java.lang.String |
getName()
Return the name of the exchange, used only to display the operator in the
operator tree
|
TupleDesc |
getTupleDesc()
Returns the TupleDesc associated with this DbIterator.
|
void |
open()
Opens the iterator.
|
void |
rewind()
Resets the iterator to the start.
|
void |
setChildren(DbIterator[] children)
Set the children(child) of this operator.
|
getThisWorker, setThisWorkergetOperatorIDgetEstimatedCardinality, hasNext, next, setEstimatedCardinalityprivate static final long serialVersionUID
private transient CollectProducer.WorkingThread runningThread
private final java.net.InetSocketAddress collectConsumerAddr
private DbIterator child
public CollectProducer(DbIterator child, Exchange.ParallelOperatorID operatorID, java.lang.String collectServerHost, int collectServerPort)
public CollectProducer(DbIterator child, Exchange.ParallelOperatorID operatorID, java.net.InetSocketAddress collectServerAddr)
public java.lang.String getName()
Exchangepublic java.net.InetSocketAddress getCollectServerAddr()
public void open()
throws DbException,
TransactionAbortedException
DbIteratoropen in interface DbIteratoropen in class OperatorDbException - when there are problems opening/accessing the database.TransactionAbortedExceptionpublic void close()
Operatorclose in interface DbIteratorclose in class Operatorpublic void rewind()
throws DbException,
TransactionAbortedException
DbIteratorDbException - when rewind is unsupported.TransactionAbortedExceptionpublic TupleDesc getTupleDesc()
DbIteratorgetTupleDesc in interface DbIteratorgetTupleDesc in class Operatorprotected Tuple fetchNext() throws DbException, TransactionAbortedException
Operatornext
and hasNext.fetchNext in class OperatorDbExceptionTransactionAbortedExceptionpublic DbIterator[] getChildren()
getChildren in class Operatorpublic void setChildren(DbIterator[] children)
OperatorsetChildren in class Operatorchildren - the DbIterators which are to be set as the children(child) of
this operator