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, setThisWorker
getOperatorID
getEstimatedCardinality, hasNext, next, setEstimatedCardinality
private 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()
Exchange
public java.net.InetSocketAddress getCollectServerAddr()
public void open() throws DbException, TransactionAbortedException
DbIterator
open
in interface DbIterator
open
in class Operator
DbException
- when there are problems opening/accessing the database.TransactionAbortedException
public void close()
Operator
close
in interface DbIterator
close
in class Operator
public void rewind() throws DbException, TransactionAbortedException
DbIterator
DbException
- when rewind is unsupported.TransactionAbortedException
public TupleDesc getTupleDesc()
DbIterator
getTupleDesc
in interface DbIterator
getTupleDesc
in class Operator
protected Tuple fetchNext() throws DbException, TransactionAbortedException
Operator
next
and hasNext
.fetchNext
in class Operator
DbException
TransactionAbortedException
public DbIterator[] getChildren()
getChildren
in class Operator
public void setChildren(DbIterator[] children)
Operator
setChildren
in class Operator
children
- the DbIterators which are to be set as the children(child) of
this operator