Search in sources :

Example 11 with Edge

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);
        }
    }
}
Also used : TBase(edu.iu.dsc.tws.api.tset.TBase) Edge(edu.iu.dsc.tws.api.compute.graph.Edge) HashSet(java.util.HashSet)

Example 12 with 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;
}
Also used : Edge(edu.iu.dsc.tws.api.compute.graph.Edge)

Example 13 with Edge

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;
}
Also used : Edge(edu.iu.dsc.tws.api.compute.graph.Edge)

Example 14 with Edge

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;
}
Also used : Edge(edu.iu.dsc.tws.api.compute.graph.Edge)

Example 15 with Edge

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;
}
Also used : Edge(edu.iu.dsc.tws.api.compute.graph.Edge)

Aggregations

Edge (edu.iu.dsc.tws.api.compute.graph.Edge)32 HashSet (java.util.HashSet)2 HashBasedTable (com.google.common.collect.HashBasedTable)1 Table (com.google.common.collect.Table)1 CheckpointingClient (edu.iu.dsc.tws.api.checkpointing.CheckpointingClient)1 Communicator (edu.iu.dsc.tws.api.comms.Communicator)1 LogicalPlan (edu.iu.dsc.tws.api.comms.LogicalPlan)1 ExecutionPlan (edu.iu.dsc.tws.api.compute.executor.ExecutionPlan)1 ExecutorContext (edu.iu.dsc.tws.api.compute.executor.ExecutorContext)1 IExecutionPlanBuilder (edu.iu.dsc.tws.api.compute.executor.IExecutionPlanBuilder)1 INodeInstance (edu.iu.dsc.tws.api.compute.executor.INodeInstance)1 IParallelOperation (edu.iu.dsc.tws.api.compute.executor.IParallelOperation)1 ComputeGraph (edu.iu.dsc.tws.api.compute.graph.ComputeGraph)1 OperationMode (edu.iu.dsc.tws.api.compute.graph.OperationMode)1 Vertex (edu.iu.dsc.tws.api.compute.graph.Vertex)1 ICompute (edu.iu.dsc.tws.api.compute.nodes.ICompute)1 INode (edu.iu.dsc.tws.api.compute.nodes.INode)1 ISource (edu.iu.dsc.tws.api.compute.nodes.ISource)1 TaskInstancePlan (edu.iu.dsc.tws.api.compute.schedule.elements.TaskInstancePlan)1 TaskSchedulePlan (edu.iu.dsc.tws.api.compute.schedule.elements.TaskSchedulePlan)1