當前位置: 首頁>>代碼示例>>Java>>正文


Java JobInstance.setExecEndTime方法代碼示例

本文整理匯總了Java中org.apache.kylin.job.JobInstance.setExecEndTime方法的典型用法代碼示例。如果您正苦於以下問題:Java JobInstance.setExecEndTime方法的具體用法?Java JobInstance.setExecEndTime怎麽用?Java JobInstance.setExecEndTime使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.kylin.job.JobInstance的用法示例。


在下文中一共展示了JobInstance.setExecEndTime方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: parseToJobInstance

import org.apache.kylin.job.JobInstance; //導入方法依賴的package包/類
private JobInstance parseToJobInstance(CubingJob cubeJob, Map<String, Output> outputs) {
    CubeInstance cube = CubeManager.getInstance(KylinConfig.getInstanceFromEnv())
            .getCube(CubingExecutableUtil.getCubeName(cubeJob.getParams()));

    Output output = outputs.get(cubeJob.getId());
    final JobInstance result = new JobInstance();
    result.setName(cubeJob.getName());
    if (cube != null) {
        result.setRelatedCube(cube.getDisplayName());
    } else {
        result.setRelatedCube(CubingExecutableUtil.getCubeName(cubeJob.getParams()));
    }
    result.setRelatedSegment(CubingExecutableUtil.getSegmentId(cubeJob.getParams()));
    result.setLastModified(output.getLastModified());
    result.setSubmitter(cubeJob.getSubmitter());
    result.setUuid(cubeJob.getId());
    result.setType(CubeBuildTypeEnum.BUILD);
    result.setStatus(parseToJobStatus(output.getState()));
    result.setMrWaiting(AbstractExecutable.getExtraInfoAsLong(output, CubingJob.MAP_REDUCE_WAIT_TIME, 0L) / 1000);
    result.setExecStartTime(AbstractExecutable.getStartTime(output));
    result.setExecEndTime(AbstractExecutable.getEndTime(output));
    result.setExecInterruptTime(AbstractExecutable.getInterruptTime(output));
    result.setDuration(AbstractExecutable.getDuration(AbstractExecutable.getStartTime(output), AbstractExecutable.getEndTime(output), AbstractExecutable.getInterruptTime(output)) / 1000);
    for (int i = 0; i < cubeJob.getTasks().size(); ++i) {
        AbstractExecutable task = cubeJob.getTasks().get(i);
        result.addStep(parseToJobStep(task, i, outputs.get(task.getId())));
    }
    return result;
}
 
開發者ID:apache,項目名稱:kylin,代碼行數:30,代碼來源:JobInstanceExtractor.java

示例2: parseToJobInstance

import org.apache.kylin.job.JobInstance; //導入方法依賴的package包/類
public static JobInstance parseToJobInstance(CubingJob job, Map<String, Output> outputs) {
    if (job == null) {
        logger.warn("job is null.");
        return null;
    }

    Output output = outputs.get(job.getId());
    if (output == null) {
        logger.warn("job output is null.");
        return null;
    }

    CubingJob cubeJob = (CubingJob) job;
    CubeInstance cube = CubeManager.getInstance(KylinConfig.getInstanceFromEnv())
            .getCube(CubingExecutableUtil.getCubeName(cubeJob.getParams()));

    final JobInstance result = new JobInstance();
    result.setName(job.getName());
    result.setRelatedCube(cube != null ? cube.getDisplayName() : CubingExecutableUtil.getCubeName(cubeJob.getParams()));
    result.setRelatedSegment(CubingExecutableUtil.getSegmentId(cubeJob.getParams()));
    result.setLastModified(output.getLastModified());
    result.setSubmitter(job.getSubmitter());
    result.setUuid(job.getId());
    result.setType(CubeBuildTypeEnum.BUILD);
    result.setStatus(parseToJobStatus(output.getState()));
    result.setMrWaiting(AbstractExecutable.getExtraInfoAsLong(output, CubingJob.MAP_REDUCE_WAIT_TIME, 0L) / 1000);
    result.setExecStartTime(AbstractExecutable.getStartTime(output));
    result.setExecEndTime(AbstractExecutable.getEndTime(output));
    result.setExecInterruptTime(AbstractExecutable.getInterruptTime(output));
    result.setDuration(AbstractExecutable.getDuration(result.getExecStartTime(), result.getExecEndTime(),
            result.getExecInterruptTime()) / 1000);
    for (int i = 0; i < job.getTasks().size(); ++i) {
        AbstractExecutable task = job.getTasks().get(i);
        result.addStep(parseToJobStep(task, i, outputs.get(task.getId())));
    }
    return result;
}
 
開發者ID:apache,項目名稱:kylin,代碼行數:38,代碼來源:JobInfoConverter.java


注:本文中的org.apache.kylin.job.JobInstance.setExecEndTime方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。