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



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

Review comment:
       @zhangayqian Thanks for reviewing. A nice finding,I will remove the two 
method. 
   The new method is to combine `parseToJobInstanceQuietly(CubingJob job, 
Map<String, Output> outputs)` and 
`parseToJobInstanceQuietly(CheckpointExecutable job, Map<String, Output> 
outputs)`, so the ut about the two method is suitable for new method.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to