public abstract class AbstractExchange extends AbstractSingle implements Exchange
Exchange.ParallelizationDependency
Modifier and Type | Field and Description |
---|---|
protected List<CoordinationProtos.DrillbitEndpoint> |
receiverLocations |
protected int |
receiverMajorFragmentId |
protected List<CoordinationProtos.DrillbitEndpoint> |
senderLocations |
protected int |
senderMajorFragmentId |
child
INIT_ALLOCATION, initialAllocation, MAX_ALLOCATION, maxAllocation, userName
Constructor and Description |
---|
AbstractExchange(PhysicalOperator child) |
Modifier and Type | Method and Description |
---|---|
<T,X,E extends Throwable> |
accept(PhysicalVisitor<T,X,E> physicalVisitor,
X value)
Provides capability to build a set of output based on traversing a query graph tree.
|
protected static List<EndpointAffinity> |
getDefaultAffinityMap(List<CoordinationProtos.DrillbitEndpoint> fragmentEndpoints)
Get a default endpoint affinity map where affinity of a Drillbit is proportional to the number of its occurrences
in given endpoint list.
|
String |
getOperatorType() |
Exchange.ParallelizationDependency |
getParallelizationDependency()
Get the parallelization dependency of the Exchange.
|
long |
getReceiverMemory(int receivers,
int senders)
Returns the memory requirement for the receiver side of the exchange operator.
|
ParallelizationInfo |
getReceiverParallelizationInfo(List<CoordinationProtos.DrillbitEndpoint> senderFragmentEndpoints)
Default receiver parallelization width range is [1, Integer.MAX_VALUE] and affinity to nodes where sender
fragments are running.
|
long |
getSenderMemory(int receivers,
int senders)
Returns the memory requirement for the sender side of the exchange operator.
|
ParallelizationInfo |
getSenderParallelizationInfo(List<CoordinationProtos.DrillbitEndpoint> receiverFragmentEndpoints)
Default sender parallelization width range is [1, Integer.MAX_VALUE] and no endpoint affinity
|
boolean |
isExecutable()
Exchanges are not executable.
|
void |
setupReceivers(int majorFragmentId,
List<CoordinationProtos.DrillbitEndpoint> receiverLocations)
Inform this Exchange node about its receiver locations.
|
protected void |
setupReceivers(List<CoordinationProtos.DrillbitEndpoint> receiverLocations) |
void |
setupSenders(int majorFragmentId,
List<CoordinationProtos.DrillbitEndpoint> senderLocations)
Inform this Exchange node about its sender locations.
|
protected void |
setupSenders(List<CoordinationProtos.DrillbitEndpoint> senderLocations) |
getChild, getNewWithChild, getNewWithChildren, iterator
accept, getCost, getInitialAllocation, getMaxAllocation, getOperatorId, getSVMode, getUserName, isBufferedOperator, setCost, setMaxAllocation, setOperatorId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChild, getReceiver, getSender
getCost, getInitialAllocation, getMaxAllocation, getNewWithChildren, getOperatorId, getSVMode, getUserName, isBufferedOperator, setCost, setMaxAllocation, setOperatorId
accept
forEach, iterator, spliterator
protected int senderMajorFragmentId
protected int receiverMajorFragmentId
protected List<CoordinationProtos.DrillbitEndpoint> senderLocations
protected List<CoordinationProtos.DrillbitEndpoint> receiverLocations
public AbstractExchange(PhysicalOperator child)
public boolean isExecutable()
isExecutable
in interface PhysicalOperator
isExecutable
in class AbstractBase
public ParallelizationInfo getSenderParallelizationInfo(List<CoordinationProtos.DrillbitEndpoint> receiverFragmentEndpoints)
getSenderParallelizationInfo
in interface Exchange
receiverFragmentEndpoints
- Endpoints assigned to receiver fragment if available, otherwise an empty list.ParallelizationInfo
.public ParallelizationInfo getReceiverParallelizationInfo(List<CoordinationProtos.DrillbitEndpoint> senderFragmentEndpoints)
getReceiverParallelizationInfo
in interface Exchange
senderFragmentEndpoints
- Endpoints assigned to receiver fragment if available, otherwise an empty list.ParallelizationInfo
.protected static List<EndpointAffinity> getDefaultAffinityMap(List<CoordinationProtos.DrillbitEndpoint> fragmentEndpoints)
fragmentEndpoints
- Drillbit endpoint assignments of fragments.protected void setupSenders(List<CoordinationProtos.DrillbitEndpoint> senderLocations)
protected void setupReceivers(List<CoordinationProtos.DrillbitEndpoint> receiverLocations) throws PhysicalOperatorSetupException
PhysicalOperatorSetupException
public final void setupSenders(int majorFragmentId, List<CoordinationProtos.DrillbitEndpoint> senderLocations) throws PhysicalOperatorSetupException
Exchange
setupSenders
in interface Exchange
PhysicalOperatorSetupException
public final void setupReceivers(int majorFragmentId, List<CoordinationProtos.DrillbitEndpoint> receiverLocations) throws PhysicalOperatorSetupException
Exchange
setupReceivers
in interface Exchange
PhysicalOperatorSetupException
public final <T,X,E extends Throwable> T accept(PhysicalVisitor<T,X,E> physicalVisitor, X value) throws E extends Throwable
PhysicalOperator
accept
in interface PhysicalOperator
E extends Throwable
public String getOperatorType()
getOperatorType
in interface PhysicalOperator
public Exchange.ParallelizationDependency getParallelizationDependency()
Exchange
getParallelizationDependency
in interface Exchange
public long getSenderMemory(int receivers, int senders)
Exchange
getSenderMemory
in interface Exchange
receivers
- number of receivers at the receiving end of this exchange operator.senders
- number of senders sending the rows for this exchange operator.public long getReceiverMemory(int receivers, int senders)
Exchange
getReceiverMemory
in interface Exchange
receivers
- number of receivers receiving the rows sent by the sender side of this
exchange operator.senders
- number of senders sending the rows.Copyright © 1970 The Apache Software Foundation. All rights reserved.