[
https://issues.apache.org/jira/browse/GOBBLIN-1119?focusedWorklogId=423614&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-423614
]
ASF GitHub Bot logged work on GOBBLIN-1119:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 16/Apr/20 17:51
Start Date: 16/Apr/20 17:51
Worklog Time Spent: 10m
Work Description: sv2000 commented on pull request #2959: [GOBBLIN-1119]
Enable close-on-flush for quality-checker's err-file
URL: https://github.com/apache/incubator-gobblin/pull/2959#discussion_r409739806
##########
File path:
gobblin-core/src/main/java/org/apache/gobblin/qualitychecker/row/RowLevelPolicyChecker.java
##########
@@ -197,7 +198,23 @@ public State getFinalState() {
* @return a {@link ControlMessageHandler}.
*/
protected ControlMessageHandler getMessageHandler() {
- return ControlMessageHandler.NOOP;
+ /**
+ * When seeing {@link FlushControlMessage and using ERR_FILE as the
quality-checker handling,
+ * close the open error file and create new one.
+ */
+ return new ControlMessageHandler() {
+ @Override
+ public void handleMessage(ControlMessage message) {
+ if (message instanceof FlushControlMessage ) {
+ try {
+ RowLevelPolicyChecker.this.close();
+ RowLevelPolicyChecker.this.writer = new
RowLevelErrFileWriter(RowLevelPolicyChecker.this.fs);
Review comment:
Can the creation be moved inside checkResult() where we check if the file is
open or not?
----------------------------------------------------------------
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: 423614)
Time Spent: 20m (was: 10m)
> Flush quality-checker-err-file in streaming pipeline
> ----------------------------------------------------
>
> Key: GOBBLIN-1119
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1119
> Project: Apache Gobblin
> Issue Type: Bug
> Reporter: Lei Sun
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)