use of org.apache.hyracks.control.common.job.profiling.om.JobletProfile in project asterixdb by apache.
the class BuildJobProfilesWork method doRun.
@Override
protected void doRun() throws Exception {
List<JobProfile> profiles = new ArrayList<JobProfile>();
Map<JobId, Joblet> jobletMap = ncs.getJobletMap();
for (Joblet ji : jobletMap.values()) {
profiles.add(new JobProfile(ji.getJobId()));
}
for (JobProfile jProfile : profiles) {
Joblet ji;
JobletProfile jobletProfile = new JobletProfile(ncs.getId());
ji = jobletMap.get(jProfile.getJobId());
if (ji != null) {
ji.dumpProfile(jobletProfile);
jProfile.getJobletProfiles().put(ncs.getId(), jobletProfile);
}
}
fv.setValue(profiles);
}
use of org.apache.hyracks.control.common.job.profiling.om.JobletProfile 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