{"record":{"id":"44c649bb6c807b5b","repo":"apache/iceberg","slug":"for-table-with-at-failed-to-plan-d-44c649","errorCode":null,"errorMessage":"[For table {} with {}[{}] at {}]: Failed to plan data file rewrite groups","messagePattern":"\\[For table (.+?) with (.+?)\\[(.+?)\\] at (.+?)\\]: Failed to plan data file rewrite groups","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/DataFileRewritePlanner.java","lineNumber":184,"sourceCode":"          taskName,\n          taskIndex,\n          ctx.timestamp(),\n          groups.size(),\n          groups);\n      plannedGroupsCounter.inc(groups.size());\n\n      for (RewriteFileGroup group : groups) {\n        LOG.info(\n            DataFileRewritePlanner.MESSAGE_PREFIX + \"Emitting {}\",\n            tableName,\n            taskName,\n            taskIndex,\n            ctx.timestamp(),\n            group);\n        out.collect(new PlannedGroup(table, groupsPerCommit, group, branch));\n      }\n    } catch (Exception e) {\n      LOG.warn(\n          DataFileRewritePlanner.MESSAGE_PREFIX + \"Failed to plan data file rewrite groups\",\n          tableName,\n          taskName,\n          taskIndex,\n          ctx.timestamp(),\n          e);\n      ctx.output(TaskResultAggregator.ERROR_STREAM, e);\n      errorCounter.inc();\n    }\n  }\n\n  @Override\n  public void close() throws Exception {\n    super.close();\n    tableLoader.close();\n  }\n\n  public static class PlannedGroup {","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/DataFileRewritePlanner.java#L166-L202","documentation":"This warning is emitted by DataFileRewritePlanner.processElement when planning rewrite groups for a table fails. The planner refreshes the table, finds data files exceeding the rewrite threshold, and groups them into commits; any exception in that planning pipeline (table refresh, scanning, group construction) is caught, logged with table/task context, and does not fail the Flink job. The affected maintenance trigger cycle is simply skipped.","triggerScenarios":"Raised in DataFileRewritePlanner.processElement when rewritingGroups()/table operations throw — e.g. TableMetadata refresh failure against the catalog, snapshot scan errors while finding oversized/fragmented files, or exceptions building the rewrite groups with the configured options (partial progress, max-file-group-size, etc.).","commonSituations":"Catalog connectivity problems (Hive/REST/JDBC catalog timeout) during table refresh; corrupted or missing metadata/snapshot; invalid rewrite options passed via the action configuration; concurrent schema or partition-spec evolution during planning.","solutions":["Read the nested exception in the log; fix the underlying cause (catalog access, bad rewrite option, corrupted metadata)","Verify catalog connectivity and credentials from the Flink TaskManager","Validate the RewriteDataFiles options (e.g. min-input-files, partial-progress.enabled) passed to the maintenance action","Re-trigger the maintenance job after the table is consistent; the planner is designed to retry on the next trigger"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Watch the ERROR_STREAM / logs; the planner already catches internally\n// e.g. consume side output when wiring the action job","preventionTips":["Validate RewriteDataFiles options before submitting the maintenance action","Ensure catalog connectivity and credentials from TaskManagers","Retry on the next scheduled trigger; the planner is idempotent","Avoid schema/spec evolution overlapping rewrite planning windows"],"tags":["flink","maintenance","compaction","planning"],"backgroundTag":"api-request-failed","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}