: (result.getThrowable() != null ? result.getThrowable() : null);
protected void updateMetrics(ExecutableContext context, ExecuteResult result, ExecutableState state) { JobMetricsFacade.JobStatisticsResult jobStats = new JobMetricsFacade.JobStatisticsResult(); jobStats.setWrapper(getSubmitter(), getProjectName(), CubingExecutableUtil.getCubeName(getParams()), getId(), getJobType(), getAlgorithm() == null ? "NULL" : getAlgorithm().toString()); if (state == ExecutableState.SUCCEED) { jobStats.setJobStats(findSourceSizeBytes(), findCubeSizeBytes(), getDuration(), getMapReduceWaitTime(), getPerBytesTimeCost(findSourceSizeBytes(), getDuration())); if (CubingJobTypeEnum.getByName(getJobType()) == CubingJobTypeEnum.BUILD) { jobStats.setJobStepStats(getTaskDurationByName(ExecutableConstants.STEP_NAME_FACT_DISTINCT_COLUMNS), getTaskDurationByName(ExecutableConstants.STEP_NAME_BUILD_DICTIONARY), getTaskDurationByName(ExecutableConstants.STEP_NAME_BUILD_IN_MEM_CUBE), getTaskDurationByName(ExecutableConstants.STEP_NAME_CONVERT_CUBOID_TO_HFILE)); } } else if (state == ExecutableState.ERROR) { jobStats.setJobException(result.getThrowable() != null ? result.getThrowable() : new Exception()); } JobMetricsFacade.updateMetrics(jobStats); }
: (result.getThrowable() != null ? result.getThrowable() : null);
protected void updateMetrics(ExecutableContext context, ExecuteResult result, ExecutableState state) { JobMetricsFacade.JobStatisticsResult jobStats = new JobMetricsFacade.JobStatisticsResult(); jobStats.setWrapper(getSubmitter(), getProjectName(), CubingExecutableUtil.getCubeName(getParams()), getId(), getJobType(), getAlgorithm() == null ? "NULL" : getAlgorithm().toString()); if (state == ExecutableState.SUCCEED) { jobStats.setJobStats(findSourceSizeBytes(), findCubeSizeBytes(), getDuration(), getMapReduceWaitTime(), getPerBytesTimeCost(findSourceSizeBytes(), getDuration())); if (CubingJobTypeEnum.getByName(getJobType()) == CubingJobTypeEnum.BUILD) { jobStats.setJobStepStats(getTaskDurationByName(ExecutableConstants.STEP_NAME_FACT_DISTINCT_COLUMNS), getTaskDurationByName(ExecutableConstants.STEP_NAME_BUILD_DICTIONARY), getTaskDurationByName(ExecutableConstants.STEP_NAME_BUILD_IN_MEM_CUBE), getTaskDurationByName(ExecutableConstants.STEP_NAME_CONVERT_CUBOID_TO_HFILE)); } } else if (state == ExecutableState.ERROR) { jobStats.setJobException(result.getThrowable() != null ? result.getThrowable() : new Exception()); } JobMetricsFacade.updateMetrics(jobStats); }