[ 
https://issues.apache.org/jira/browse/GOBBLIN-971?focusedWorklogId=346859&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-346859
 ]

ASF GitHub Bot logged work on GOBBLIN-971:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Nov/19 16:44
            Start Date: 20/Nov/19 16:44
    Worklog Time Spent: 10m 
      Work Description: autumnust commented on pull request #2819: 
[GOBBLIN-971]Enable speculative execution awareness for RowQualityChecker
URL: https://github.com/apache/incubator-gobblin/pull/2819#discussion_r348618501
 
 

 ##########
 File path: 
gobblin-core/src/main/java/org/apache/gobblin/qualitychecker/row/RowLevelPolicyChecker.java
 ##########
 @@ -45,7 +46,17 @@
 import lombok.Getter;
 
 
-public class RowLevelPolicyChecker<S, D> implements Closeable, FinalState, 
RecordStreamProcessor<S, S, D, D> {
+public class RowLevelPolicyChecker<S, D> implements Closeable, FinalState, 
RecordStreamProcessor<S, S, D, D>,
+                                                    
SpeculativeAttemptAwareConstruct {
+
+  /**
+   * Given the existence of writer object when the policy is set to {@link 
RowLevelPolicy.Type#ERR_FILE}, objects of
+   * this class needs to be speculative-attempt-aware.
+   */
+  @Override
+  public boolean isSpeculativeAttemptSafe() {
+    return !this.list.stream().allMatch(x -> 
x.getType().equals(RowLevelPolicy.Type.ERR_FILE)) || 
this.allowSpeculativeExecWhenWriteErrFile;
 
 Review comment:
   oops, bad mistake, thanks for catching
 
----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 346859)
    Time Spent: 50m  (was: 40m)

> Enable speculative execution awareness for RowQualityChecker
> ------------------------------------------------------------
>
>                 Key: GOBBLIN-971
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-971
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Lei Sun
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to