You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/10/10 16:27:35 UTC

[GitHub] [hudi] pramodbiligiri commented on a diff in pull request #6886: [HUDI-4994] Fix bug that prevents re-ingestion of soft-deleted Datahub entities

pramodbiligiri commented on code in PR #6886:
URL: https://github.com/apache/hudi/pull/6886#discussion_r991465618


##########
hudi-sync/hudi-datahub-sync/src/main/java/org/apache/hudi/sync/datahub/DataHubSyncClient.java:
##########
@@ -135,6 +133,37 @@ public void close() {
     // no op;
   }
 
+  // When updating an entity, it is ncessary to set its soft-delete status to false, or else the update won't get
+  // reflected in the UI.
+  private void undoSoftDelete(RestEmitter client, DatahubResponseLogger responseLogger) throws IOException, ExecutionException,
+          InterruptedException {
+    MetadataChangeProposalWrapper softDeleteUndoProposal = MetadataChangeProposalWrapper.builder()
+            .entityType("dataset")
+            .entityUrn(datasetUrn)
+            .upsert()
+            .aspect(SOFT_DELETE_FALSE)
+            .aspectName("status")
+            .build();
+
+    client.emit(softDeleteUndoProposal, responseLogger).get();

Review Comment:
   Done.



-- 
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-unsubscribe@hudi.apache.org

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