You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2019/11/20 16:44:36 UTC
[GitHub] [incubator-gobblin] autumnust commented on a change in pull request
#2819: [GOBBLIN-971]Enable speculative execution awareness for
RowQualityChecker
autumnust commented on a change in 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:
users@infra.apache.org
With regards,
Apache Git Services