use of org.apache.hyracks.control.cc.job.IJobManager in project asterixdb by apache.
the class RegisterPartitionRequestWork method run.
@Override
public void run() {
PartitionId pid = partitionRequest.getPartitionId();
IJobManager jobManager = ccs.getJobManager();
JobRun run = jobManager.get(pid.getJobId());
if (run == null) {
return;
}
PartitionMatchMaker pmm = run.getPartitionMatchMaker();
Pair<PartitionDescriptor, PartitionRequest> match = pmm.matchPartitionRequest(partitionRequest);
if (match != null) {
try {
PartitionUtils.reportPartitionMatch(ccs, pid, match);
} catch (Exception e) {
e.printStackTrace();
}
}
}
use of org.apache.hyracks.control.cc.job.IJobManager in project asterixdb by apache.
the class TaskCompleteWork method performEvent.
@Override
protected void performEvent(TaskAttempt ta) {
try {
IJobManager jobManager = ccs.getJobManager();
JobRun run = jobManager.get(jobId);
if (statistics != null) {
JobProfile jobProfile = run.getJobProfile();
Map<String, JobletProfile> jobletProfiles = jobProfile.getJobletProfiles();
JobletProfile jobletProfile = jobletProfiles.get(nodeId);
if (jobletProfile == null) {
jobletProfile = new JobletProfile(nodeId);
jobletProfiles.put(nodeId, jobletProfile);
}
jobletProfile.getTaskProfiles().put(taId, statistics);
}
run.getExecutor().notifyTaskComplete(ta);
} catch (HyracksException e) {
e.printStackTrace();
}
}
Aggregations