use of edu.iu.dsc.tws.api.compute.graph.Edge in project twister2 by DSC-SPIDAL.
the class BuildableTLink method build.
@Override
default void build(GraphBuilder graphBuilder, Collection<? extends TBase> buildSequence) {
// filter out the relevant sources out of the predecessors
HashSet<TBase> relevantSources = new HashSet<>(getTBaseGraph().getPredecessors(this));
relevantSources.retainAll(buildSequence);
// filter out the relevant sources out of the successors
HashSet<TBase> relevantTargets = new HashSet<>(getTBaseGraph().getSuccessors(this));
relevantTargets.retainAll(buildSequence);
for (TBase source : relevantSources) {
for (TBase target : relevantTargets) {
String s = source.getId();
String t = target.getId();
Edge edge = getEdge();
edge.setName(edge.getName() + "_" + s + "_" + t);
TLinkUtils.generateCommsSchema(edge);
graphBuilder.connect(s, t, edge);
}
}
}
use of edu.iu.dsc.tws.api.compute.graph.Edge in project twister2 by DSC-SPIDAL.
the class SKeyedDirectTLink method getEdge.
@Override
public Edge getEdge() {
// NOTE: There is no keyed direct in the communication layer!!! Hence this is an keyed direct
// emulation. Therefore, we can not use user provided data types here because we will be using
// Tuple<K, V> object through a DirectLink here.
// todo fix this ambiguity!
Edge e = new Edge(getId(), OperationNames.DIRECT, MessageTypes.OBJECT);
TLinkUtils.generateCommsSchema(getSchema(), e);
return e;
}
use of edu.iu.dsc.tws.api.compute.graph.Edge in project twister2 by DSC-SPIDAL.
the class SReplicateTLink method getEdge.
@Override
public Edge getEdge() {
Edge e = new Edge(getId(), OperationNames.BROADCAST, this.getSchema().getDataType());
TLinkUtils.generateCommsSchema(getSchema(), e);
return e;
}
use of edu.iu.dsc.tws.api.compute.graph.Edge in project twister2 by DSC-SPIDAL.
the class PartitionTLink method getEdge.
@Override
public Edge getEdge() {
Edge e = new Edge(getId(), OperationNames.PARTITION, this.getSchema().getDataType());
if (partitionFunction != null) {
e.setPartitioner(partitionFunction);
}
e.addProperty(CommunicationContext.USE_DISK, this.useDisk);
TLinkUtils.generateCommsSchema(getSchema(), e);
return e;
}
use of edu.iu.dsc.tws.api.compute.graph.Edge in project twister2 by DSC-SPIDAL.
the class RowDirectLink method getEdge.
@Override
public Edge getEdge() {
Edge e = new Edge(getId(), OperationNames.TABLE_DIRECT, MessageTypes.ARROW_TABLE);
e.addProperty(CommunicationContext.USE_DISK, this.useDisk);
TLinkUtils.generateCommsSchema(getSchema(), e);
return e;
}
Aggregations