[GitHub] [hudi] codope commented on a change in pull request #3184: [HUDI-1860] Add INSERT_OVERWRITE and INSERT_OVERWRITE_TABLE support to DeltaStreamer
codope commented on a change in pull request #3184: URL: https://github.com/apache/hudi/pull/3184#discussion_r87674 ## File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java ## @@ -449,6 +449,9 @@ public void refreshTimeline() throws IOException { case BULK_INSERT: writeStatusRDD = writeClient.bulkInsert(records, instantTime); break; + case INSERT_OVERWRITE: Review comment: Thanks! Could you also add unit tests for the two operation types in `TestHoodieDeltaStreamer`? Specifically, we can start with insert/bulk insert and then verify for insert_overwrite, with and without partition, that the writes are successful. -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [hudi] codope commented on a change in pull request #3184: [HUDI-1860] Add INSERT_OVERWRITE and INSERT_OVERWRITE_TABLE support to DeltaStreamer
codope commented on a change in pull request #3184: URL: https://github.com/apache/hudi/pull/3184#discussion_r87674 ## File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java ## @@ -449,6 +449,9 @@ public void refreshTimeline() throws IOException { case BULK_INSERT: writeStatusRDD = writeClient.bulkInsert(records, instantTime); break; + case INSERT_OVERWRITE: Review comment: Thanks! Could you also add a unit test for the two operation types in `TestHoodieDeltaStreamer`? -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [hudi] codope commented on a change in pull request #3184: [HUDI-1860] Add INSERT_OVERWRITE and INSERT_OVERWRITE_TABLE support to DeltaStreamer
codope commented on a change in pull request #3184: URL: https://github.com/apache/hudi/pull/3184#discussion_r87005 ## File path: hudi-integ-test/src/main/java/org/apache/hudi/integ/testsuite/HoodieDeltaStreamerWrapper.java ## @@ -53,14 +54,37 @@ public HoodieDeltaStreamerWrapper(Config cfg, JavaSparkContext jssc) throws Exce return upsert(WriteOperationType.BULK_INSERT); } + public JavaRDD insertOverwrite() throws + Exception { +return insertOverwrite(WriteOperationType.INSERT_OVERWRITE); + } + + public JavaRDD insertOverwrite(WriteOperationType operation) throws Exception { +cfg.operation = operation; +return deltaSyncService.get().getDeltaSync().syncOnce().getRight(); + } + + public JavaRDD insertOverwriteTable() throws + Exception { +return insertOverwriteTable(WriteOperationType.INSERT_OVERWRITE_TABLE); + } + + public JavaRDD insertOverwriteTable(WriteOperationType operation) throws Review comment: Instead of new method, can we not reuse `insertOverwrite()` method in line 62? Note that these wrapper methods are only used for integration test suite. -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org