{"record":{"id":"644ee343be1999ca","repo":"apache/iceberg","slug":"not-exposing-the-current-snapshot-summary-in-h","errorCode":null,"errorMessage":"Not exposing the current snapshot({}) summary in HMS since it exceeds {} characters","messagePattern":"Not exposing the current snapshot\\((.+?)\\) summary in HMS since it exceeds (.+?) characters","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"hive-metastore/src/main/java/org/apache/iceberg/hive/HMSTablePropertyHelper.java","lineNumber":227,"sourceCode":"          TableProperties.CURRENT_SNAPSHOT_ID, String.valueOf(currentSnapshot.snapshotId()));\n      parameters.put(\n          TableProperties.CURRENT_SNAPSHOT_TIMESTAMP,\n          String.valueOf(currentSnapshot.timestampMillis()));\n      setSnapshotSummary(parameters, currentSnapshot, maxHiveTablePropertySize);\n    }\n\n    parameters.put(TableProperties.SNAPSHOT_COUNT, String.valueOf(metadata.snapshots().size()));\n  }\n\n  @VisibleForTesting\n  static void setSnapshotSummary(\n      Map<String, String> parameters, Snapshot currentSnapshot, long maxHiveTablePropertySize) {\n    try {\n      String summary = JsonUtil.mapper().writeValueAsString(currentSnapshot.summary());\n      if (summary.length() <= maxHiveTablePropertySize) {\n        parameters.put(TableProperties.CURRENT_SNAPSHOT_SUMMARY, summary);\n      } else {\n        LOG.warn(\n            \"Not exposing the current snapshot({}) summary in HMS since it exceeds {} characters\",\n            currentSnapshot.snapshotId(),\n            maxHiveTablePropertySize);\n      }\n    } catch (JsonProcessingException e) {\n      LOG.warn(\n          \"Failed to convert current snapshot({}) summary to a json string\",\n          currentSnapshot.snapshotId(),\n          e);\n    }\n  }\n\n  @VisibleForTesting\n  static void setPartitionSpec(\n      TableMetadata metadata, Map<String, String> parameters, long maxHiveTablePropertySize) {\n    parameters.remove(TableProperties.DEFAULT_PARTITION_SPEC);\n    if (exposeInHmsProperties(maxHiveTablePropertySize)\n        && metadata.spec() != null","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/hive-metastore/src/main/java/org/apache/iceberg/hive/HMSTablePropertyHelper.java#L209-L245","documentation":"HMSTablePropertyHelper.setSnapshotSummary writes the current snapshot's summary (as JSON) into the Hive metastore table parameters, but HMS parameters have a size limit (configurable). When the JSON exceeds maxHiveTablePropertySize characters, the summary is deliberately omitted and this warning is logged instead of failing the commit.","triggerScenarios":"Committing a snapshot whose summary map serializes to JSON longer than maxHiveTablePropertySize — typically large jobs with many metrics entries (huge file counts, lots of partition summaries).","commonSituations":"Very large writes/overwrites producing rich snapshot summaries; low maxHiveTablePropertySize configured; HMS backends with restrictive parameter sizes (e.g. older MySQL-backed metastores).","solutions":["Increase maxHiveTablePropertySize (table property write.max-hive-table-property-size / catalog config) if the HMS backend can tolerate larger parameters","Accept the omission — the summary is informational; the table still functions","Reduce job fan-out (fewer partitions/files per commit) to shrink summaries","Check snapshot summary contents (e.g. extra write metrics) that inflate the JSON"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"long max = Long.parseLong(properties.getOrDefault(\"write.max-hive-table-property-size\", \"2_000_000\".replace(\"_\",\"\")));\nString json = JsonUtil.mapper().writeValueAsString(snapshot.summary());\nif (json.length() > max) { /* raise limit or skip */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Size maxHiveTablePropertySize to your worst-case summaries","Keep per-commit partition/file counts bounded","Confirm HMS backend parameter size limits first","Treat the warning as expected behavior when over the limit"],"tags":["hive-metastore","snapshot-summary","size-limit"],"backgroundTag":"value-out-of-range","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}