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 2020/04/16 06:09:09 UTC

[GitHub] [incubator-gobblin] autumnust opened a new pull request #2959: [GOBBLIN-1119] Enable close-on-flush for quality-checker's err-file

autumnust opened a new pull request #2959: [GOBBLIN-1119] Enable close-on-flush for quality-checker's err-file
URL: https://github.com/apache/incubator-gobblin/pull/2959
 
 
   Dear Gobblin maintainers,
   
   Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
   
   
   ### JIRA
   - https://issues.apache.org/jira/browse/GOBBLIN-1119
   
   
   ### Description
   - Currently if using `RowLevelPolicyChecker.java` in long-running Gobblin-on-Yarn pipeline, the err-file will be opened when the task is initialized but not being flushed periodically. This fix is to enable close-on-flush semantics for err-file and add unit test for that. 
   
   
   ### Tests
   - [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   
   
   ### Commits
   - [ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
       1. Subject is separated from body by a blank line
       2. Subject is limited to 50 characters
       3. Subject does not end with a period
       4. Subject uses the imperative mood ("add", not "adding")
       5. Body wraps at 72 characters
       6. Body explains "what" and "why", not "how"
   
   

----------------------------------------------------------------
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

[GitHub] [incubator-gobblin] sv2000 commented on a change in pull request #2959: [GOBBLIN-1119] Enable close-on-flush for quality-checker's err-file

Posted by GitBox <gi...@apache.org>.
sv2000 commented on a change in 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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-gobblin] asfgit closed pull request #2959: [GOBBLIN-1119] Enable close-on-flush for quality-checker's err-file

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #2959: [GOBBLIN-1119] Enable close-on-flush for quality-checker's err-file
URL: https://github.com/apache/incubator-gobblin/pull/2959
 
 
   

----------------------------------------------------------------
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

[GitHub] [incubator-gobblin] codecov-io commented on issue #2959: [GOBBLIN-1119] Enable close-on-flush for quality-checker's err-file

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #2959: [GOBBLIN-1119] Enable close-on-flush for quality-checker's err-file
URL: https://github.com/apache/incubator-gobblin/pull/2959#issuecomment-614830193
 
 
   # [Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2959?src=pr&el=h1) Report
   > Merging [#2959](https://codecov.io/gh/apache/incubator-gobblin/pull/2959?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-gobblin/commit/5bc977d5dc11e0cfc46aea7b371f2ba93325ddc9&el=desc) will **decrease** coverage by `0.89%`.
   > The diff coverage is `72.72%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-gobblin/pull/2959/graphs/tree.svg?width=650&height=150&src=pr&token=4MgURJ0bGc)](https://codecov.io/gh/apache/incubator-gobblin/pull/2959?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2959      +/-   ##
   ============================================
   - Coverage     45.56%   44.67%   -0.90%     
   + Complexity     9175     9012     -163     
   ============================================
     Files          1938     1938              
     Lines         73427    73434       +7     
     Branches       8111     8112       +1     
   ============================================
   - Hits          33456    32803     -653     
   - Misses        36866    37556     +690     
   + Partials       3105     3075      -30     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-gobblin/pull/2959?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...blin/qualitychecker/row/RowLevelPolicyChecker.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2959/diff?src=pr&el=tree#diff-Z29iYmxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3F1YWxpdHljaGVja2VyL3Jvdy9Sb3dMZXZlbFBvbGljeUNoZWNrZXIuamF2YQ==) | `50.56% <72.72%> (+15.19%)` | `8.00 <2.00> (+5.00)` | |
   | [...gobblin/runtime/mapreduce/GobblinOutputFormat.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2959/diff?src=pr&el=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvbWFwcmVkdWNlL0dvYmJsaW5PdXRwdXRGb3JtYXQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | `0.00% <0.00%> (-2.00%)` | |
   | [...askStateCollectorServiceHiveRegHandlerFactory.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2959/diff?src=pr&el=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvVGFza1N0YXRlQ29sbGVjdG9yU2VydmljZUhpdmVSZWdIYW5kbGVyRmFjdG9yeS5qYXZh) | `0.00% <0.00%> (-100.00%)` | `0.00% <0.00%> (-2.00%)` | |
   | [...re/filesystem/FsDatasetStateStoreEntryManager.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2959/diff?src=pr&el=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvbWV0YXN0b3JlL2ZpbGVzeXN0ZW0vRnNEYXRhc2V0U3RhdGVTdG9yZUVudHJ5TWFuYWdlci5qYXZh) | `0.00% <0.00%> (-100.00%)` | `0.00% <0.00%> (-3.00%)` | |
   | [...in/runtime/mapreduce/CustomizedProgresserBase.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2959/diff?src=pr&el=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvbWFwcmVkdWNlL0N1c3RvbWl6ZWRQcm9ncmVzc2VyQmFzZS5qYXZh) | `0.00% <0.00%> (-83.34%)` | `0.00% <0.00%> (-1.00%)` | |
   | [...rg/apache/gobblin/runtime/ZkDatasetStateStore.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2959/diff?src=pr&el=tree#diff-Z29iYmxpbi1tb2R1bGVzL2dvYmJsaW4taGVsaXgvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vcnVudGltZS9aa0RhdGFzZXRTdGF0ZVN0b3JlLmphdmE=) | `0.00% <0.00%> (-80.77%)` | `0.00% <0.00%> (-7.00%)` | |
   | [...lin/runtime/locks/LegacyJobLockFactoryManager.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2959/diff?src=pr&el=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvbG9ja3MvTGVnYWN5Sm9iTG9ja0ZhY3RvcnlNYW5hZ2VyLmphdmE=) | `0.00% <0.00%> (-78.58%)` | `0.00% <0.00%> (-2.00%)` | |
   | [.../apache/gobblin/metastore/ZkStateStoreFactory.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2959/diff?src=pr&el=tree#diff-Z29iYmxpbi1tb2R1bGVzL2dvYmJsaW4taGVsaXgvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vbWV0YXN0b3JlL1prU3RhdGVTdG9yZUZhY3RvcnkuamF2YQ==) | `0.00% <0.00%> (-71.43%)` | `0.00% <0.00%> (-2.00%)` | |
   | [...he/gobblin/runtime/ZkDatasetStateStoreFactory.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2959/diff?src=pr&el=tree#diff-Z29iYmxpbi1tb2R1bGVzL2dvYmJsaW4taGVsaXgvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vcnVudGltZS9aa0RhdGFzZXRTdGF0ZVN0b3JlRmFjdG9yeS5qYXZh) | `0.00% <0.00%> (-71.43%)` | `0.00% <0.00%> (-2.00%)` | |
   | [...apache/gobblin/runtime/MysqlDatasetStateStore.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2959/diff?src=pr&el=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvTXlzcWxEYXRhc2V0U3RhdGVTdG9yZS5qYXZh) | `0.00% <0.00%> (-70.00%)` | `0.00% <0.00%> (-7.00%)` | |
   | ... and [40 more](https://codecov.io/gh/apache/incubator-gobblin/pull/2959/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2959?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2959?src=pr&el=footer). Last update [5bc977d...d330bb5](https://codecov.io/gh/apache/incubator-gobblin/pull/2959?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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