You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@griffin.apache.org by GitBox <gi...@apache.org> on 2020/01/06 09:37:20 UTC

[GitHub] [griffin] chitralverma commented on a change in pull request #562: [GRIFFIN-316] Fix job exception handling

chitralverma commented on a change in pull request #562: [GRIFFIN-316] Fix job exception handling
URL: https://github.com/apache/griffin/pull/562#discussion_r363218555
 
 

 ##########
 File path: measure/src/main/scala/org/apache/griffin/measure/job/DQJob.scala
 ##########
 @@ -25,8 +27,16 @@ case class DQJob(dqSteps: Seq[DQStep]) extends Serializable {
   /**
    * @return execution success
    */
-  def execute(context: DQContext): Boolean = {
-    dqSteps.forall(dqStep => dqStep.execute(context))
+  def execute(context: DQContext): Try[Boolean] = {
+    val tmp = dqSteps.map(dqStep => dqStep.execute(context))
 
 Review comment:
   mapping the elements of `Seq[_]` is not lazy. If there are issues while `.execute`, they will not be handled.
   
   Also, a different variable name can be used in place of `tmp`.

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


With regards,
Apache Git Services