use of org.apache.hyracks.control.common.job.profiling.om.JobProfile 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.JobProfile in project asterixdb by apache.
the class ReportProfilesWork method run.
@Override
public void run() {
for (JobProfile profile : profiles) {
JobRun run = jobManager.get(profile.getJobId());
if (run != null) {
JobProfile jp = run.getJobProfile();
jp.merge(profile);
}
}
}
use of org.apache.hyracks.control.common.job.profiling.om.JobProfile 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