Skip to content

Commit

Permalink
KYLIN-205 Give warning instead of error when failed to get cube sourc…
Browse files Browse the repository at this point in the history
…e size;
  • Loading branch information
shaofengshi committed May 15, 2015
1 parent 531ed58 commit a4692db
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions job/src/main/java/com/kylinolap/job/flow/JobFlowListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,10 @@ private void updateCubeSegmentInfoOnSucceed(JobInstance jobInstance, JobEngineCo
if (null != convertToHFileStep) {
String cubeSizeString = convertToHFileStep.getInfo(JobInstance.HDFS_BYTES_WRITTEN);
if (cubeSizeString == null || cubeSizeString.equals("")) {
throw new RuntimeException("Can't get cube segment size.");
log.warn("Can't get cube segment size from job " + jobInstance.getUuid());
} else {
cubeSize = Long.parseLong(cubeSizeString) / 1024;
}
cubeSize = Long.parseLong(cubeSizeString) / 1024;
} else {
log.info("No step with name '" + JobConstants.STEP_NAME_CONVERT_CUBOID_TO_HFILE + "' is found");
}
Expand All @@ -263,9 +264,10 @@ private void updateCubeSegmentInfoOnSucceed(JobInstance jobInstance, JobEngineCo
if (null != baseCuboidStep) {
String sourceRecordsCount = baseCuboidStep.getInfo(JobInstance.SOURCE_RECORDS_COUNT);
if (sourceRecordsCount == null || sourceRecordsCount.equals("")) {
throw new RuntimeException("Can't get cube source record count.");
log.warn("Can't get cube source record count from job " + jobInstance.getUuid());
} else {
sourceCount = Long.parseLong(sourceRecordsCount);
}
sourceCount = Long.parseLong(sourceRecordsCount);
} else {
log.info("No step with name '" + JobConstants.STEP_NAME_BUILD_BASE_CUBOID + "' is found");
}
Expand All @@ -274,9 +276,10 @@ private void updateCubeSegmentInfoOnSucceed(JobInstance jobInstance, JobEngineCo
if (null != createFlatTableStep) {
String sourceRecordsSize = createFlatTableStep.getInfo(JobInstance.SOURCE_RECORDS_SIZE);
if (sourceRecordsSize == null || sourceRecordsSize.equals("")) {
throw new RuntimeException("Can't get cube source record size.");
log.warn("Can't get cube source record from job " + jobInstance.getUuid());
} else {
sourceSize = Long.parseLong(sourceRecordsSize);
}
sourceSize = Long.parseLong(sourceRecordsSize);
} else {
log.info("No step with name '" + JobConstants.STEP_NAME_CREATE_FLAT_HIVE_TABLE + "' is found");
}
Expand Down

0 comments on commit a4692db

Please sign in to comment.