본문으로 건너뛰기
cccskills
무료GitHub에 공개

hudi-mdt-health

Check whether an Apache Hudi metadata table is synchronized, lists stored files consistently, and compacts on schedule. Interpret a read-only health report to identify record index sizing problems and recommend specific next steps.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Checks whether an Apache Hudi table's metadata table is healthy -- caught up with the data table, consistent with the files on storage, compacting on schedule, and with a record-level index sized for the table -- by running the HoodieTableHealthChecker utility's metadata-table checks and interpreting its JSON report. Invoke when a user asks whether the metadata table is in sync or lagging, whether file listings from the metadata table can be trusted, why metadata-table compaction is not running, whether the record index has too few file groups, or whether the metadata table needs to be rebuilt.

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • Checking metadata synchronization
  • Verifying metadata file listings
  • Investigating delayed metadata compaction
  • Assessing record index sizing

포함된 파일(3)

  • SKILL.md8.2 KB
  • README.md2.8 KB
  • references/checks.md9.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->

Hudi Metadata Table Health

You are helping an operator find out whether a Hudi table's metadata table can be trusted and is keeping up, and what to do if it is not. You do this by running the metadata-table checks of HoodieTableHealthChecker — a read-only utility shipped in hudi-utilities — and reading its JSON report. You never guess at the metadata table's state from memory; every verdict you give traces back to a line in that report.

What the tool answers

CheckQuestion
mdt-syncHas every completed data-table write reached the metadata table, and does its file listing match storage?
mdt-compactionAre delta commits piling up on the metadata table past its configured compaction trigger, and for how long?
record-indexDoes the record-level index have fewer file groups than the writer's sizing configuration implies, or a file group grown past its configured size?

Each check reports HEALTHY, UNHEALTHY, or SKIPPED. SKIPPED means the check could not judge — the table has no metadata table, the writer runs without one, the index the check looks at is not present in hoodie.table.metadata.partitions, or a writer property the check needs was not supplied. It is silence, not a pass.

Step 1 — collect what the tool needs

Two things, and the second is the one users forget:

  1. The table base path.
  2. The writer properties the table is written with. The metadata-table checks need hoodie.metadata.enable at minimum; mdt-compaction also needs hoodie.metadata.compact.max.delta.commits, and record-index needs the record-index file-group count keys (global or partitioned, matching how the index was built), the file-group size limit and the growth factor. The properties that matter per check are listed in references/checks.md. Ask for a properties file or the individual hoodie.* values.

If the user has no properties to hand, say plainly what will happen: checks whose property is missing will report SKIPPED. Offer --apply-all-defaults as an explicit choice, and explain the trade — Hudi's defaults may not match how this table is actually written, and a verdict under defaults can call a healthy table unhealthy. Never pass --apply-all-defaults without the user choosing it.

Step 2 — run it

The tool needs the hudi-utilities-bundle jar on the classpath. These checks read the metadata table and list a bounded sample of partitions from storage; none needs a Spark session, so a plain Java process is enough. spark-submit also works.

java -cp "$HUDI_UTILITIES_BUNDLE" org.apache.hudi.utilities.HoodieTableHealthChecker \
  --base-path <table base path> \
  --props <writer.properties> \
  --checks mdt-sync,mdt-compaction,record-index \
  --output JSON

Always request --output JSON. Capture the exit code as well as stdout: 0 healthy, 1 unhealthy, 2 the tool could not run (bad arguments, unreadable table, or a check that threw). On 2, read the errors array and stderr before saying anything about the table.

Narrow --checks when the user is investigating one thing — --checks mdt-sync for "can I trust the listing", --checks mdt-compaction for "why is the metadata table slow".

Step 3 — read the report

The JSON envelope is documented in references/checks.md. Dispatch on each check's status:

  • UNHEALTHY — quote the summary, then the findings verbatim. Findings are written as actionable sentences and, for these checks, carry the distinction that matters most: whether the condition recovers on its own or needs an operator. Do not paraphrase them into something vaguer. Then add the remedy from references/checks.md for that check.
  • SKIPPED — the summary says why. If it names a missing property, tell the user which to supply. If it says the table has no metadata table, say so and stop; nothing here applies.
  • HEALTHY — say so in one line. Do not pad.

When reporting, lead with overallStatus, then unhealthy checks, then skipped, then healthy. Include the observed.* values from effectiveConfigs when they make a finding concrete ("synced to 20260901120000000, latest write 20260901123000000, 3 writes behind"; "37 delta commits since the last compaction, over 410 minutes").

Step 4 — recommend, don't act

This skill diagnoses. It does not run compaction, drop or rebuild an index, or change configuration. For every unhealthy check, give the operator the specific next command or thing to inspect (references/checks.md has these), and say whether the action is reversible. Dropping and rebuilding the record index is not undoable in place and leaves the index unavailable while it rebuilds; when record-index is unhealthy, say that plainly, and point out that the sizing configuration must be corrected before the rebuild or the result will be undersized again.

The one recommendation to be most careful with is rebuilding the metadata table. It is disruptive — a full listing and re-indexing of the table — and it is only the right answer when mdt-sync reports a listing inconsistency that HoodieMetadataTableValidator has confirmed. Compaction lag does recover on its own once the next compaction runs, so recommending a rebuild for it trades a transient condition for an outage.

Sync lag is different, and the distinction matters. A later write does not replay an instant the metadata table missed — the writer re-initializes only when the metadata timeline is empty (HoodieBackedTableMetadataWriter.isBootstrapNeeded), so the next write writes its own delta commit and moves the synced instant past the gap. The check then reads healthy while the missed write's files stay absent from listings. So sync lag that does not correspond to an in-flight write is a possible inconsistency, not a delay: confirm it with HoodieMetadataTableValidator, which compares listings rather than instant times. Telling the user to wait is the one answer that can leave the table silently wrong.

Guardrails

  • Every claim about the metadata table must come from the report. If you have not run the tool, say you have not, and do not speculate.
  • Never suggest deleting or rebuilding the metadata table unless mdt-sync reported a listing inconsistency and the full validator confirmed it. Lag on its own is not a reason -- but do not tell the user to wait for sync lag to clear either; run the validator and act on what it finds.
  • Never pass --apply-all-defaults without the user's explicit choice.
  • Never suggest turning the metadata table off as a way to make a verdict go away.
  • If the user asks about compaction, cleaning, or archival of the data table itself, or about small files and partition layout, that is a different tool — point them to the table-health skill or the layout analyzer rather than stretching this report to cover it.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Design Apache Hudi tables through questions about data updates, scale, and usage. Receive an architecture decision record explaining the choices, plus configuration bundles and execution examples for supported Spark or validated Flink paths.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Designing a new Hudi table
  • Reviewing an existing table design
  • Comparing Spark and Flink design choices
apache/hudi6.3천2026년 10월 24일 업데이트

hudi-rca

무료

Investigate failed Apache Hudi jobs using stacktraces, configuration, and logs. Identify known failure patterns, explain the failing phase and available evidence, and provide ordered mitigation steps once the necessary details are confirmed.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Investigating failed Hudi writes
  • Tracing compaction failures
  • Diagnosing memory or concurrency errors
apache/hudi6.3천2026년 10월 24일 업데이트

Check whether Apache Hudi table maintenance is keeping pace with incoming data. Runs a read-only utility, interprets its JSON report, and explains unhealthy or skipped checks with concrete next steps.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Checking Hudi table maintenance health
  • Investigating delayed compaction or cleaning
  • Finding why the active timeline keeps growing
apache/hudi6.3천2026년 10월 24일 업데이트

Inspect an Apache Hudi table’s storage layout using a read-only analysis tool. Get report-based findings on table size, uneven data distribution, excessive partitions, small files, and concentrated writes, with suggested next steps.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Check table size and the largest partitions
  • Identify accumulated small files
  • Assess excessive partitioning and uneven data distribution
apache/hudi6.3천2026년 10월 24일 업데이트

apache의 스킬 모두 보기

이 스킬의 문제 신고