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 2020/05/10 18:55:10 UTC

[GitHub] [incubator-hudi] bvaradar commented on a change in pull request #1542: [HUDI-820] cleaner repair command should only inspect clean metadata files

bvaradar commented on a change in pull request #1542:
URL: https://github.com/apache/incubator-hudi/pull/1542#discussion_r422684688



##########
File path: hudi-cli/src/main/java/org/apache/hudi/cli/commands/RepairsCommand.java
##########
@@ -147,14 +149,16 @@ public String overwriteHoodieProperties(
   public void removeCorruptedPendingCleanAction() {
 
     HoodieTableMetaClient client = HoodieCLI.getTableMetaClient();
-    HoodieActiveTimeline activeTimeline = HoodieCLI.getTableMetaClient().getActiveTimeline();
-
-    activeTimeline.filterInflightsAndRequested().getInstants().forEach(instant -> {
+    HoodieTimeline cleanerTimeline = HoodieCLI.getTableMetaClient().getActiveTimeline().getCleanerTimeline();
+    LOG.info("Inspecting pending clean metadata in timeline for corrupted files");
+    cleanerTimeline.filterInflightsAndRequested().getInstants().forEach(instant -> {
       try {
         CleanerUtils.getCleanerPlan(client, instant);
-      } catch (IOException e) {
-        LOG.warn("try to remove corrupted instant file: " + instant);
+      } catch (AvroRuntimeException e) {

Review comment:
       @lamber-ken : Thanks. I have made changes to specifically look for this message in the exception to detect corruption. Please take a look. 




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

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