guangxuCheng commented on a change in pull request #1254:
URL: https://github.com/apache/kylin/pull/1254#discussion_r446150666



##########
File path: 
engine-mr/src/main/java/org/apache/kylin/engine/mr/common/JobInfoConverter.java
##########
@@ -43,25 +43,21 @@
 public class JobInfoConverter {
     private static final Logger logger = 
LoggerFactory.getLogger(JobInfoConverter.class);
 
-    public static JobInstance parseToJobInstanceQuietly(CubingJob job, 
Map<String, Output> outputs) {
+    public static JobInstance parseToJobInstanceQuietly(AbstractExecutable 
job, Map<String, Output> outputs) {
         try {
-            return parseToJobInstance(job, outputs);
-        } catch (Exception e) {
-            logger.error("Failed to parse job instance: uuid={}", job, e);
-            return null;
-        }
-    }
-
-    public static JobInstance parseToJobInstanceQuietly(CheckpointExecutable 
job, Map<String, Output> outputs) {
-        try {
-            return parseToJobInstance(job, outputs);
+            if (job instanceof CheckpointExecutable) {
+                return parseToJobInstance((CheckpointExecutable)job, outputs);
+            } else if (job instanceof CubingJob) {
+                return parseToJobInstance((CubingJob)job, outputs);
+            } else {
+                return null;

Review comment:
       Hi @sanjulian thanks for your reviewing. 
JobInfoConverter#parseToJobInstanceQuietly is only called by 
JobService#innerSearchJobs. The search mode of job are only CUBING_ONLY and 
CHECKPOINT_ONLY, so I think that it's ok for the implemented of 
JobInfoConverter#parseToJobInstanceQuietly.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to