You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "homatthew (via GitHub)" <gi...@apache.org> on 2023/02/15 18:47:41 UTC

[GitHub] [gobblin] homatthew opened a new pull request, #3645: [GOBBLIN-1787] Ability to delete watermarks in a state store

homatthew opened a new pull request, #3645:
URL: https://github.com/apache/gobblin/pull/3645

   Dear Gobblin maintainers,
   
   Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
   
   Let's improve the interface for state stores that Gobblin uses to storing watermarks and various other pieces of state. State stores like zookeeper have native methods for batch deletes that we cannot take advantage of with the current implementation.
   
   This is useful for cleaning up no longer used watermarks in a state store. The size of a state store has physical limitations depending on the underlying implementation (e.g. ZK supports roughly ~10k tables per state store). And even migrating to a new state store requires a lot of operational burden / doesn't clean up the old state store.
   
   Design:
   - Add a default method to the interface for backward compatibility in the OSS community
   - Use this method in the watermark based storage
   - Call batch delete in zk state store
   
   Alternate designs:
   - Create a new interface that extends the interface `StateStore` except it has a delete multiple tables method. The default approach is a much cleaner approach in terms of backwards compatibility / amount of code needed.
   - Add batch deletes as part of the watermark based storage, but this would be a hack since we'd just be calling delete with multiple threads
   
   
   ### JIRA
   - [X] 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-1787] My Gobblin PR"
       - https://issues.apache.org/jira/browse/GOBBLIN-1787
   
   
   ### Description
   - [X] Here are some details about my PR, including screenshots (if applicable):
   
   
   ### Tests
   - [X] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   Used batch delete of a singleton collection in UT
   
   ### 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] Will-Lo commented on pull request #3645: [GOBBLIN-1787] Ability to delete multiple watermarks in a state store

Posted by "Will-Lo (via GitHub)" <gi...@apache.org>.
Will-Lo commented on PR #3645:
URL: https://github.com/apache/gobblin/pull/3645#issuecomment-1435424737

   Lgtm!


-- 
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 #3645: [GOBBLIN-1787] Ability to delete multiple watermarks in a state store

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3645:
URL: https://github.com/apache/gobblin/pull/3645#issuecomment-1431876932

   # [Codecov](https://codecov.io/gh/apache/gobblin/pull/3645?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 [#3645](https://codecov.io/gh/apache/gobblin/pull/3645?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (29f5eb5) into [master](https://codecov.io/gh/apache/gobblin/commit/26fd2445850c91a04dc1016b0ffc3e7f7a3fc915?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (26fd244) will **decrease** coverage by `6.40%`.
   > The diff coverage is `33.33%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3645      +/-   ##
   ============================================
   - Coverage     46.61%   40.22%   -6.40%     
   + Complexity    10712     3547    -7165     
   ============================================
     Files          2133      791    -1342     
     Lines         83637    33296   -50341     
     Branches       9300     3699    -5601     
   ============================================
   - Hits          38986    13392   -25594     
   + Misses        41095    18588   -22507     
   + Partials       3556     1316    -2240     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/gobblin/pull/3645?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../java/org/apache/gobblin/metastore/StateStore.java](https://codecov.io/gh/apache/gobblin/pull/3645?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1tZXRhc3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vbWV0YXN0b3JlL1N0YXRlU3RvcmUuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...bblin/runtime/StateStoreBasedWatermarkStorage.java](https://codecov.io/gh/apache/gobblin/pull/3645?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1tZXRhc3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vcnVudGltZS9TdGF0ZVN0b3JlQmFzZWRXYXRlcm1hcmtTdG9yYWdlLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...ava/org/apache/gobblin/metastore/ZkStateStore.java](https://codecov.io/gh/apache/gobblin/pull/3645?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1tb2R1bGVzL2dvYmJsaW4taGVsaXgvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vbWV0YXN0b3JlL1prU3RhdGVTdG9yZS5qYXZh) | `64.03% <100.00%> (+0.97%)` | :arrow_up: |
   | [...ava/org/apache/gobblin/fsm/FiniteStateMachine.java](https://codecov.io/gh/apache/gobblin/pull/3645?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi11dGlsaXR5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2ZzbS9GaW5pdGVTdGF0ZU1hY2hpbmUuamF2YQ==) | `73.48% <0.00%> (-3.04%)` | :arrow_down: |
   | [...main/java/org/apache/gobblin/util/HadoopUtils.java](https://codecov.io/gh/apache/gobblin/pull/3645?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==) | `30.29% <0.00%> (-0.66%)` | :arrow_down: |
   | [...blin/source/extractor/watermark/DateWatermark.java](https://codecov.io/gh/apache/gobblin/pull/3645?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3NvdXJjZS9leHRyYWN0b3Ivd2F0ZXJtYXJrL0RhdGVXYXRlcm1hcmsuamF2YQ==) | | |
   | [...mented/fork/InstrumentedForkOperatorDecorator.java](https://codecov.io/gh/apache/gobblin/pull/3645?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1jb3JlLWJhc2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vaW5zdHJ1bWVudGVkL2ZvcmsvSW5zdHJ1bWVudGVkRm9ya09wZXJhdG9yRGVjb3JhdG9yLmphdmE=) | | |
   | [.../data/DynamicWorkUnitDeserializationException.java](https://codecov.io/gh/apache/gobblin/pull/3645?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvbWVzc2FnaW5nL2RhdGEvRHluYW1pY1dvcmtVbml0RGVzZXJpYWxpemF0aW9uRXhjZXB0aW9uLmphdmE=) | | |
   | [...e/gobblin/recordaccess/IncorrectTypeException.java](https://codecov.io/gh/apache/gobblin/pull/3645?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vcmVjb3JkYWNjZXNzL0luY29ycmVjdFR5cGVFeGNlcHRpb24uamF2YQ==) | | |
   | [...ement/conversion/hive/task/HiveConverterUtils.java](https://codecov.io/gh/apache/gobblin/pull/3645?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1kYXRhLW1hbmFnZW1lbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vZGF0YS9tYW5hZ2VtZW50L2NvbnZlcnNpb24vaGl2ZS90YXNrL0hpdmVDb252ZXJ0ZXJVdGlscy5qYXZh) | | |
   | ... and [1341 more](https://codecov.io/gh/apache/gobblin/pull/3645?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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] Will-Lo merged pull request #3645: [GOBBLIN-1787] Ability to delete multiple watermarks in a state store

Posted by "Will-Lo (via GitHub)" <gi...@apache.org>.
Will-Lo merged PR #3645:
URL: https://github.com/apache/gobblin/pull/3645


-- 
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] homatthew commented on a diff in pull request #3645: [GOBBLIN-1787] Ability to delete multiple watermarks in a state store

Posted by "homatthew (via GitHub)" <gi...@apache.org>.
homatthew commented on code in PR #3645:
URL: https://github.com/apache/gobblin/pull/3645#discussion_r1107568271


##########
gobblin-metastore/src/main/java/org/apache/gobblin/runtime/StateStoreBasedWatermarkStorage.java:
##########
@@ -55,10 +56,10 @@ public class StateStoreBasedWatermarkStorage implements WatermarkStorage {
    * A watermark prefix that is compatible with different watermark storage implementations.
    * As such, this prefix should not include any characters disallowed in a {@link java.net.URI}.
    */
-  private static final String WATERMARK_STORAGE_PREFIX="streamingWatermarks_";
+  protected static final String WATERMARK_STORAGE_PREFIX="streamingWatermarks_";
 
   public final StateStore<CheckpointableWatermarkState> _stateStore;
-  private final String _storeName;

Review Comment:
   Extensions of this class should have access to this for interacting with the state store



-- 
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] hanghangliu commented on pull request #3645: [GOBBLIN-1787] Ability to delete multiple watermarks in a state store

Posted by "hanghangliu (via GitHub)" <gi...@apache.org>.
hanghangliu commented on PR #3645:
URL: https://github.com/apache/gobblin/pull/3645#issuecomment-1432110098

   LGTM +1


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