Package com.netflix.lipstick.model

Examples of com.netflix.lipstick.model.P2jJobStatus


     * @return the newly created P2jJobStatus
     */
    @SuppressWarnings("deprecation")
    protected P2jJobStatus buildJobStatusMap(String jobId) {
        JobClient jobClient = PigStats.get().getJobClient();
        P2jJobStatus js = jobIdToJobStatusMap.get(jobId);

        try {
            RunningJob rj = jobClient.getJob(jobId);
            if (rj == null) {
                LOG.warn("Couldn't find job status for jobId=" + jobId);
                return js;
            }

            JobID jobID = rj.getID();
            Counters counters = rj.getCounters();
            js.setCounters(buildCountersMap(counters));
            js.setWarnings(getRunningJobWarnings(jobClient, jobID));

            js.setJobName(rj.getJobName());
            js.setTrackingUrl(rj.getTrackingURL());
            js.setIsComplete(rj.isComplete());
            js.setIsSuccessful(rj.isSuccessful());
            js.setMapProgress(rj.mapProgress());
            js.setReduceProgress(rj.reduceProgress());
            js.setTotalMappers((int)counters.findCounter(JobInProgress.Counter.TOTAL_LAUNCHED_MAPS).getCounter());
            js.setTotalReducers((int)counters.findCounter(JobInProgress.Counter.TOTAL_LAUNCHED_REDUCES).getCounter());
            return js;
        } catch (IOException e) {
            LOG.error("Error getting job info.", e);
        }

View Full Code Here


        // name is found. If so, look up it's scope and bind the jobId to
        // the DAGNode with the same scope.
        for (JobStats jobStats : jobGraph) {
            if (jobId.equals(jobStats.getJobId())) {
                LOG.info("jobStartedNotification - scope " + jobStats.getName() + " is jobId " + jobId);
                P2jJobStatus jobStatus = new P2jJobStatus();
                jobStatus.setJobId(jobId);
                jobStatus.setStartTime(System.currentTimeMillis());
                jobStatus.setScope(jobStats.getName());
                jobIdToJobStatusMap.put(jobId, jobStatus);
                runningJobIds.add(jobId);
            }
        }
        P2jPlanStatus planStatus = new P2jPlanStatus();
View Full Code Here

     *
     * @param planStatus the P2jPlanStatus object to update
     * @param jobId the map/reduce job id
     */
    protected void updatePlanStatusForJobId(P2jPlanStatus planStatus, String jobId) {
        P2jJobStatus status = buildJobStatusMap(jobId);
        if (status != null) {
            planStatus.updateWith(status);
        }
    }
View Full Code Here

                    if (0 != taskStartTime) {
                        startTime = Math.min(startTime, taskStartTime);
                    }
                    finishTime = Math.max(finishTime, rpt.getFinishTime());
                }
                P2jJobStatus jobStatus = jobIdToJobStatusMap.get(jobId);
                if (startTime < Long.MAX_VALUE) {
                    jobStatus.setStartTime(startTime);
                }
                if (finishTime > Long.MIN_VALUE) {
                    jobStatus.setFinishTime(finishTime);
                }
                LOG.info("Determined start and finish times for job " + jobId);
            } else {
                LOG.info("Skipping determining start and finish times for job " + jobId);
            }
View Full Code Here

TOP

Related Classes of com.netflix.lipstick.model.P2jJobStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.