meethngala commented on code in PR #3687:
URL: https://github.com/apache/gobblin/pull/3687#discussion_r1204611662


##########
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/retention/version/HiveDatasetVersionCleaner.java:
##########
@@ -88,20 +88,24 @@ public void clean() throws IOException {
       Partition partition = hiveDatasetVersion.getPartition();
       try {
         if (!cleanableHiveDataset.isSimulate()) {
+          if (cleanableHiveDataset.isShouldDeleteData()) {
+            
cleanableHiveDataset.getFsCleanableHelper().clean(hiveDatasetVersion, 
possiblyEmptyDirectories);
+          }
           client.get().dropPartition(partition.getTable().getDbName(), 
partition.getTable().getTableName(), partition.getValues(), false);

Review Comment:
   yup.. makes sense! I have added the comments outlining why the order is 
critical in my latest commit!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to