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 |
childINIT_ALLOCATION, initialAllocation, MAX_ALLOCATION, maxAllocation| 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, iteratoraccept, getCost, getInitialAllocation, getMaxAllocation, getOperatorId, getSVMode, getUserName, isBufferedOperator, setCost, setMaxAllocation, setOperatorIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChild, getReceiver, getSendergetCost, getInitialAllocation, getMaxAllocation, getNewWithChildren, getOperatorId, getSVMode, getUserName, isBufferedOperator, setCost, setMaxAllocation, setOperatorIdacceptforEach, iterator, spliteratorprotected 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 PhysicalOperatorisExecutable in class AbstractBasepublic ParallelizationInfo getSenderParallelizationInfo(List<CoordinationProtos.DrillbitEndpoint> receiverFragmentEndpoints)
getSenderParallelizationInfo in interface ExchangereceiverFragmentEndpoints - Endpoints assigned to receiver fragment if available, otherwise an empty list.ParallelizationInfo.public ParallelizationInfo getReceiverParallelizationInfo(List<CoordinationProtos.DrillbitEndpoint> senderFragmentEndpoints)
getReceiverParallelizationInfo in interface ExchangesenderFragmentEndpoints - 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
PhysicalOperatorSetupExceptionpublic final void setupSenders(int majorFragmentId,
List<CoordinationProtos.DrillbitEndpoint> senderLocations)
throws PhysicalOperatorSetupException
ExchangesetupSenders in interface ExchangePhysicalOperatorSetupExceptionpublic final void setupReceivers(int majorFragmentId,
List<CoordinationProtos.DrillbitEndpoint> receiverLocations)
throws PhysicalOperatorSetupException
ExchangesetupReceivers in interface ExchangePhysicalOperatorSetupExceptionpublic final <T,X,E extends Throwable> T accept(PhysicalVisitor<T,X,E> physicalVisitor, X value) throws E extends Throwable
PhysicalOperatoraccept in interface PhysicalOperatorE extends Throwablepublic String getOperatorType()
getOperatorType in interface PhysicalOperatorpublic Exchange.ParallelizationDependency getParallelizationDependency()
ExchangegetParallelizationDependency in interface Exchangepublic long getSenderMemory(int receivers,
int senders)
ExchangegetSenderMemory in interface Exchangereceivers - 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)
ExchangegetReceiverMemory in interface Exchangereceivers - number of receivers receiving the rows sent by the sender side of this
exchange operator.senders - number of senders sending the rows.Copyright © 2021 The Apache Software Foundation. All rights reserved.