Search in sources :

Example 21 with ActivityId

use of org.apache.hyracks.api.dataflow.ActivityId in project asterixdb by apache.

the class SplitOperatorDescriptor method contributeActivities.

@Override
public void contributeActivities(IActivityGraphBuilder builder) {
    SplitterMaterializerActivityNode sma = new SplitterMaterializerActivityNode(new ActivityId(odId, SPLITTER_MATERIALIZER_ACTIVITY_ID));
    builder.addActivity(this, sma);
    builder.addSourceEdge(0, sma, 0);
    for (int i = 0; i < outputArity; i++) {
        builder.addTargetEdge(i, sma, i);
    }
}
Also used : ActivityId(org.apache.hyracks.api.dataflow.ActivityId)

Example 22 with ActivityId

use of org.apache.hyracks.api.dataflow.ActivityId in project asterixdb by apache.

the class MaterializingOperatorDescriptor method contributeActivities.

@Override
public void contributeActivities(IActivityGraphBuilder builder) {
    if (isSingleActivity) {
        MaterializerReaderActivityNode mra = new MaterializerReaderActivityNode(new ActivityId(odId, MATERIALIZER_READER_ACTIVITY_ID));
        builder.addActivity(this, mra);
        builder.addSourceEdge(0, mra, 0);
        builder.addTargetEdge(0, mra, 0);
    } else {
        MaterializerActivityNode ma = new MaterializerActivityNode(new ActivityId(odId, MATERIALIZER_ACTIVITY_ID));
        ReaderActivityNode ra = new ReaderActivityNode(new ActivityId(odId, READER_ACTIVITY_ID));
        builder.addActivity(this, ma);
        builder.addSourceEdge(0, ma, 0);
        builder.addActivity(this, ra);
        builder.addTargetEdge(0, ra, 0);
        builder.addBlockingEdge(ma, ra);
    }
}
Also used : ActivityId(org.apache.hyracks.api.dataflow.ActivityId)

Example 23 with ActivityId

use of org.apache.hyracks.api.dataflow.ActivityId in project asterixdb by apache.

the class IntersectOperatorDescriptor method contributeActivities.

@Override
public void contributeActivities(IActivityGraphBuilder builder) {
    IActivity intersectActivity = new IntersectActivity(new ActivityId(getOperatorId(), 0));
    builder.addActivity(this, intersectActivity);
    for (int i = 0; i < getInputArity(); i++) {
        builder.addSourceEdge(i, intersectActivity, i);
    }
    builder.addTargetEdge(0, intersectActivity, 0);
}
Also used : IActivity(org.apache.hyracks.api.dataflow.IActivity) ActivityId(org.apache.hyracks.api.dataflow.ActivityId)

Example 24 with ActivityId

use of org.apache.hyracks.api.dataflow.ActivityId in project asterixdb by apache.

the class HybridHashJoinOperatorDescriptor method contributeActivities.

@Override
public void contributeActivities(IActivityGraphBuilder builder) {
    ActivityId p1Aid = new ActivityId(odId, BUILD_AND_PARTITION_ACTIVITY_ID);
    ActivityId p2Aid = new ActivityId(odId, PARTITION_AND_JOIN_ACTIVITY_ID);
    BuildAndPartitionActivityNode phase1 = new BuildAndPartitionActivityNode(p1Aid, p2Aid);
    PartitionAndJoinActivityNode phase2 = new PartitionAndJoinActivityNode(p2Aid, p1Aid);
    builder.addActivity(this, phase1);
    builder.addSourceEdge(1, phase1, 0);
    builder.addActivity(this, phase2);
    builder.addSourceEdge(0, phase2, 0);
    builder.addBlockingEdge(phase1, phase2);
    builder.addTargetEdge(0, phase2, 0);
}
Also used : ActivityId(org.apache.hyracks.api.dataflow.ActivityId)

Example 25 with ActivityId

use of org.apache.hyracks.api.dataflow.ActivityId in project asterixdb by apache.

the class InMemoryHashJoinOperatorDescriptor method contributeActivities.

@Override
public void contributeActivities(IActivityGraphBuilder builder) {
    ActivityId hbaId = new ActivityId(odId, 0);
    ActivityId hpaId = new ActivityId(odId, 1);
    HashBuildActivityNode hba = new HashBuildActivityNode(hbaId, hpaId);
    HashProbeActivityNode hpa = new HashProbeActivityNode(hpaId);
    builder.addActivity(this, hba);
    builder.addSourceEdge(1, hba, 0);
    builder.addActivity(this, hpa);
    builder.addSourceEdge(0, hpa, 0);
    builder.addTargetEdge(0, hpa, 0);
    builder.addBlockingEdge(hba, hpa);
}
Also used : ActivityId(org.apache.hyracks.api.dataflow.ActivityId)

Aggregations

ActivityId (org.apache.hyracks.api.dataflow.ActivityId)46 TaskId (org.apache.hyracks.api.dataflow.TaskId)12 HashMap (java.util.HashMap)11 IConnectorDescriptor (org.apache.hyracks.api.dataflow.IConnectorDescriptor)11 ActivityCluster (org.apache.hyracks.api.job.ActivityCluster)11 IActivity (org.apache.hyracks.api.dataflow.IActivity)9 Task (org.apache.hyracks.control.cc.job.Task)9 ArrayList (java.util.ArrayList)8 ConnectorDescriptorId (org.apache.hyracks.api.dataflow.ConnectorDescriptorId)7 OperatorDescriptorId (org.apache.hyracks.api.dataflow.OperatorDescriptorId)7 HashSet (java.util.HashSet)6 List (java.util.List)6 Pair (org.apache.commons.lang3.tuple.Pair)6 ActivityClusterGraph (org.apache.hyracks.api.job.ActivityClusterGraph)6 HyracksException (org.apache.hyracks.api.exceptions.HyracksException)5 ActivityPlan (org.apache.hyracks.control.cc.job.ActivityPlan)5 TaskCluster (org.apache.hyracks.control.cc.job.TaskCluster)5 IOperatorNodePushable (org.apache.hyracks.api.dataflow.IOperatorNodePushable)4 TaskAttemptId (org.apache.hyracks.api.dataflow.TaskAttemptId)4 IConnectorPolicy (org.apache.hyracks.api.dataflow.connectors.IConnectorPolicy)4