You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2015/05/15 10:04:48 UTC
incubator-kylin git commit: KYLIN-205 Give warning instead of error
when failed to get cube source size;
Repository: incubator-kylin
Updated Branches:
refs/heads/0.6 531ed58b6 -> a4692dba6
KYLIN-205 Give warning instead of error when failed to get cube source size;
Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/a4692dba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/a4692dba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/a4692dba
Branch: refs/heads/0.6
Commit: a4692dba681bc2f136e02c64565639eb0080fcc9
Parents: 531ed58
Author: shaofengshi <sh...@apache.org>
Authored: Fri May 15 16:01:13 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Fri May 15 16:01:13 2015 +0800
----------------------------------------------------------------------
.../java/com/kylinolap/job/flow/JobFlowListener.java | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4692dba/job/src/main/java/com/kylinolap/job/flow/JobFlowListener.java
----------------------------------------------------------------------
diff --git a/job/src/main/java/com/kylinolap/job/flow/JobFlowListener.java b/job/src/main/java/com/kylinolap/job/flow/JobFlowListener.java
index 8274d44..c9da3b1 100644
--- a/job/src/main/java/com/kylinolap/job/flow/JobFlowListener.java
+++ b/job/src/main/java/com/kylinolap/job/flow/JobFlowListener.java
@@ -244,9 +244,10 @@ public class JobFlowListener implements JobListener {
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");
}
@@ -263,9 +264,10 @@ public class JobFlowListener implements JobListener {
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");
}
@@ -274,9 +276,10 @@ public class JobFlowListener implements JobListener {
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");
}