Search in sources :

Example 21 with PartitionId

use of org.apache.hyracks.api.partitions.PartitionId in project asterixdb by apache.

the class NetworkManager method readInitialMessage.

private static PartitionId readInitialMessage(ByteBuffer buffer) {
    JobId jobId = new JobId(buffer.getLong());
    ConnectorDescriptorId cdid = new ConnectorDescriptorId(buffer.getInt());
    int senderIndex = buffer.getInt();
    int receiverIndex = buffer.getInt();
    return new PartitionId(jobId, cdid, senderIndex, receiverIndex);
}
Also used : ConnectorDescriptorId(org.apache.hyracks.api.dataflow.ConnectorDescriptorId) PartitionId(org.apache.hyracks.api.partitions.PartitionId) JobId(org.apache.hyracks.api.job.JobId)

Example 22 with PartitionId

use of org.apache.hyracks.api.partitions.PartitionId in project asterixdb by apache.

the class TaskProfile method readFields.

@Override
public void readFields(DataInput input) throws IOException {
    super.readFields(input);
    taskAttemptId = TaskAttemptId.create(input);
    int size = input.readInt();
    partitionSendProfile = new HashMap<PartitionId, PartitionProfile>();
    for (int i = 0; i < size; i++) {
        PartitionId key = PartitionId.create(input);
        PartitionProfile value = PartitionProfile.create(input);
        partitionSendProfile.put(key, value);
    }
}
Also used : PartitionId(org.apache.hyracks.api.partitions.PartitionId)

Aggregations

PartitionId (org.apache.hyracks.api.partitions.PartitionId)22 PartitionRequest (org.apache.hyracks.control.common.job.PartitionRequest)6 ConnectorDescriptorId (org.apache.hyracks.api.dataflow.ConnectorDescriptorId)5 PartitionDescriptor (org.apache.hyracks.control.common.job.PartitionDescriptor)5 ArrayList (java.util.ArrayList)4 PartitionMatchMaker (org.apache.hyracks.control.cc.partitions.PartitionMatchMaker)4 List (java.util.List)3 Pair (org.apache.commons.lang3.tuple.Pair)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)2 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 PartitionChannel (org.apache.hyracks.api.comm.PartitionChannel)2 ActivityId (org.apache.hyracks.api.dataflow.ActivityId)2 TaskId (org.apache.hyracks.api.dataflow.TaskId)2 IConnectorPolicy (org.apache.hyracks.api.dataflow.connectors.IConnectorPolicy)2 JobId (org.apache.hyracks.api.job.JobId)2 IJobManager (org.apache.hyracks.control.cc.job.IJobManager)2 JobRun (org.apache.hyracks.control.cc.job.JobRun)2