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 2021/09/17 01:46:24 UTC

[GitHub] [gobblin] vikrambohra opened a new pull request #3398: [GOBBLIN-1547] Set completion watermark to end of hour instead of beg…

vikrambohra opened a new pull request #3398:
URL: https://github.com/apache/gobblin/pull/3398


   …inning
   
   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
   - [ ] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-1547] My Gobblin PR"
       - https://issues.apache.org/jira/browse/GOBBLIN-1547
   
   
   ### Description
   - [ ] Here are some details about my PR, including screenshots (if applicable):
   
   
   ### 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.

To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [gobblin] codecov-commenter commented on pull request #3398: [GOBBLIN-1547] Set completion watermark to end of hour instead of beg…

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #3398:
URL: https://github.com/apache/gobblin/pull/3398#issuecomment-922101115


   # [Codecov](https://codecov.io/gh/apache/gobblin/pull/3398?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#3398](https://codecov.io/gh/apache/gobblin/pull/3398?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9bdde28) into [master](https://codecov.io/gh/apache/gobblin/commit/ed68f6cd16c77b246e119bf530ab0432baf9f4ca?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ed68f6c) will **decrease** coverage by `3.20%`.
   > The diff coverage is `33.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/gobblin/pull/3398/graphs/tree.svg?width=650&height=150&src=pr&token=4MgURJ0bGc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/gobblin/pull/3398?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3398      +/-   ##
   ============================================
   - Coverage     46.54%   43.33%   -3.21%     
   + Complexity    10242     2005    -8237     
   ============================================
     Files          2062      401    -1661     
     Lines         80420    17184   -63236     
     Branches       8983     2115    -6868     
   ============================================
   - Hits          37428     7447   -29981     
   + Misses        39523     8899   -30624     
   + Partials       3469      838    -2631     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/gobblin/pull/3398?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../gobblin/iceberg/writer/IcebergMetadataWriter.java](https://codecov.io/gh/apache/gobblin/pull/3398/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1pY2ViZXJnL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2ljZWJlcmcvd3JpdGVyL0ljZWJlcmdNZXRhZGF0YVdyaXRlci5qYXZh) | `72.11% <33.33%> (-0.09%)` | :arrow_down: |
   | [...main/java/org/apache/gobblin/util/HadoopUtils.java](https://codecov.io/gh/apache/gobblin/pull/3398/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi11dGlsaXR5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3V0aWwvSGFkb29wVXRpbHMuamF2YQ==) | `29.93% <0.00%> (-0.66%)` | :arrow_down: |
   | [.../org/apache/gobblin/cluster/GobblinTaskRunner.java](https://codecov.io/gh/apache/gobblin/pull/3398/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvR29iYmxpblRhc2tSdW5uZXIuamF2YQ==) | `63.46% <0.00%> (-0.33%)` | :arrow_down: |
   | [...ache/gobblin/runtime/api/JobLifecycleListener.java](https://codecov.io/gh/apache/gobblin/pull/3398/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvYXBpL0pvYkxpZmVjeWNsZUxpc3RlbmVyLmphdmE=) | | |
   | [...obblin/service/modules/flowgraph/BaseFlowEdge.java](https://codecov.io/gh/apache/gobblin/pull/3398/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3NlcnZpY2UvbW9kdWxlcy9mbG93Z3JhcGgvQmFzZUZsb3dFZGdlLmphdmE=) | | |
   | [...g/apache/gobblin/hive/HivePartitionComparator.java](https://codecov.io/gh/apache/gobblin/pull/3398/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1oaXZlLXJlZ2lzdHJhdGlvbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ29iYmxpbi9oaXZlL0hpdmVQYXJ0aXRpb25Db21wYXJhdG9yLmphdmE=) | | |
   | [...g/apache/gobblin/eventhub/EventhubMetricNames.java](https://codecov.io/gh/apache/gobblin/pull/3398/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1tb2R1bGVzL2dvYmJsaW4tZXZlbnRodWIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vZXZlbnRodWIvRXZlbnRodWJNZXRyaWNOYW1lcy5qYXZh) | | |
   | [...ce/modules/flowgraph/pathfinder/BFSPathFinder.java](https://codecov.io/gh/apache/gobblin/pull/3398/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3NlcnZpY2UvbW9kdWxlcy9mbG93Z3JhcGgvcGF0aGZpbmRlci9CRlNQYXRoRmluZGVyLmphdmE=) | | |
   | [...eplication/CopyRouteGeneratorOptimizedLatency.java](https://codecov.io/gh/apache/gobblin/pull/3398/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1kYXRhLW1hbmFnZW1lbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vZGF0YS9tYW5hZ2VtZW50L2NvcHkvcmVwbGljYXRpb24vQ29weVJvdXRlR2VuZXJhdG9yT3B0aW1pemVkTGF0ZW5jeS5qYXZh) | | |
   | [.../org/apache/gobblin/metrics/RootMetricContext.java](https://codecov.io/gh/apache/gobblin/pull/3398/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1tZXRyaWNzLWxpYnMvZ29iYmxpbi1tZXRyaWNzLWJhc2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vbWV0cmljcy9Sb290TWV0cmljQ29udGV4dC5qYXZh) | | |
   | ... and [1654 more](https://codecov.io/gh/apache/gobblin/pull/3398/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/gobblin/pull/3398?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/gobblin/pull/3398?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [ed68f6c...9bdde28](https://codecov.io/gh/apache/gobblin/pull/3398?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [gobblin] vikrambohra commented on a change in pull request #3398: [GOBBLIN-1547] Set completion watermark to end of hour instead of beg…

Posted by GitBox <gi...@apache.org>.
vikrambohra commented on a change in pull request #3398:
URL: https://github.com/apache/gobblin/pull/3398#discussion_r711240830



##########
File path: gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/IcebergMetadataWriter.java
##########
@@ -729,9 +729,9 @@ private StructLike addLatePartitionValueToIcebergTable(Table table, TableMetadat
   private int isLate(String datepartition, long previousWatermark) {
     ZonedDateTime partitionDateTime = ZonedDateTime.parse(datepartition, HOURLY_DATEPARTITION_FORMAT);
     long partitionEpochTime = partitionDateTime.toInstant().toEpochMilli();
-    if(partitionEpochTime > previousWatermark) {
+    if(partitionEpochTime >= previousWatermark) {

Review comment:
       if CW = 9am then data for datepartition <= 8am is complete and datepartion>=9 is still not complete (so late =0)
   




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

To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [gobblin] autumnust merged pull request #3398: [GOBBLIN-1547] Set completion watermark to end of hour instead of beg…

Posted by GitBox <gi...@apache.org>.
autumnust merged pull request #3398:
URL: https://github.com/apache/gobblin/pull/3398


   


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

To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [gobblin] ZihanLi58 commented on a change in pull request #3398: [GOBBLIN-1547] Set completion watermark to end of hour instead of beg…

Posted by GitBox <gi...@apache.org>.
ZihanLi58 commented on a change in pull request #3398:
URL: https://github.com/apache/gobblin/pull/3398#discussion_r711216983



##########
File path: gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/IcebergMetadataWriter.java
##########
@@ -729,9 +729,9 @@ private StructLike addLatePartitionValueToIcebergTable(Table table, TableMetadat
   private int isLate(String datepartition, long previousWatermark) {
     ZonedDateTime partitionDateTime = ZonedDateTime.parse(datepartition, HOURLY_DATEPARTITION_FORMAT);
     long partitionEpochTime = partitionDateTime.toInstant().toEpochMilli();
-    if(partitionEpochTime > previousWatermark) {
+    if(partitionEpochTime >= previousWatermark) {

Review comment:
       Why do we change this part? If current watermark is 09am, does that mean data for 09 has completed? And then if we see dat for 09am, is that a late data? 




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

To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [gobblin] autumnust commented on a change in pull request #3398: [GOBBLIN-1547] Set completion watermark to end of hour instead of beg…

Posted by GitBox <gi...@apache.org>.
autumnust commented on a change in pull request #3398:
URL: https://github.com/apache/gobblin/pull/3398#discussion_r711355246



##########
File path: gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/IcebergMetadataWriter.java
##########
@@ -861,11 +861,13 @@ public void flush(String dbName, String tableName) throws IOException {
   }
 
   /**
+   * NOTE: cw for a window [t1, t2] is marked as t2 if audit counts match

Review comment:
       Let's avoid abbr. like `cw` in the comments. 

##########
File path: gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/IcebergMetadataWriter.java
##########
@@ -729,9 +729,9 @@ private StructLike addLatePartitionValueToIcebergTable(Table table, TableMetadat
   private int isLate(String datepartition, long previousWatermark) {
     ZonedDateTime partitionDateTime = ZonedDateTime.parse(datepartition, HOURLY_DATEPARTITION_FORMAT);
     long partitionEpochTime = partitionDateTime.toInstant().toEpochMilli();
-    if(partitionEpochTime > previousWatermark) {
+    if(partitionEpochTime >= previousWatermark) {
       return 0;
-    } else if(partitionEpochTime <= previousWatermark && partitionDateTime.toLocalDate().equals(getDateFromEpochMillis(previousWatermark))) {
+    } else if(partitionEpochTime < previousWatermark && partitionDateTime.toLocalDate().equals(getDateFromEpochMillis(previousWatermark))) {

Review comment:
       this line seems way too long to me, did you apply style file in your IDE ? 

##########
File path: gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/IcebergMetadataWriter.java
##########
@@ -895,9 +897,9 @@ private long computeCompletenessWatermark(String table, SortedSet<ZonedDateTime>
       while (iterator.hasNext()) {
         ZonedDateTime timestampDT = iterator.next();
         if (timestampDT.isAfter(prevWatermarkDT)
-            && TimeIterator.durationBetween(prevWatermarkDT, now, granularity) > 1) {
+            && TimeIterator.durationBetween(prevWatermarkDT, now, granularity) > 0) {
           long timestampMillis = timestampDT.toInstant().toEpochMilli();
-          if(auditCountVerifier.get().isComplete(table, timestampMillis, TimeIterator.inc(timestampDT, granularity, 1).toInstant().toEpochMilli())) {
+          if(auditCountVerifier.get().isComplete(table, TimeIterator.dec(timestampDT, granularity, 1).toInstant().toEpochMilli(), timestampMillis)) {

Review comment:
       there's no blank after `(` and line is too long




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

To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org