Apache Hudiのテーブル設計を用途やデータ更新の条件から検討し、設計判断と理由を文書化します。対応する構成では設定や実行例もまとめます。
- 新規Hudiテーブルを設計したいとき
- 既存テーブルの設計を見直したいとき
- SparkとFlinkの設計比較
Apache Hudiのメタデータテーブルを読み取り専用で点検し、同期のずれやファイル一覧の不整合、圧縮処理の遅れ、索引の容量不足と対処を整理します。
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.
実行スコア 未検証
インストール方法を見るApache Hudiのメタデータテーブルが正常かを、読み取り専用のHoodieTableHealthCheckerで点検します。データテーブルとの同期、ストレージ上のファイルと一覧の一致、コンパクション(更新内容をまとめる処理)の遅れ、レコード索引の容量を確認します。JSONレポートを根拠に、問題と次に調べる項目を整理します。
ファイル一覧を信用してよいか判断したい運用担当者や、メタデータの更新・圧縮が進まない原因を調べたい人に向いています。自動で回復する状態と、担当者の対応が必要な状態を区別します。
hudi-utilities-bundleのjar、Java実行環境、テーブルのパスと書き込み設定が必要です。Sparkセッションは不要です。設定不足によるSKIPPEDは正常判定ではありません。診断と対処の提案までを担い、設定変更や再構築は実行しません。メタデータテーブルの再構築は、一覧の不整合を別の検証ツールでも確認した場合に限って提案します。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
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.
| Check | Question |
|---|---|
mdt-sync | Has every completed data-table write reached the metadata table, and does its file listing match storage? |
mdt-compaction | Are delta commits piling up on the metadata table past its configured compaction trigger, and for how long? |
record-index | Does 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.
Two things, and the second is the one users forget:
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.
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".
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").
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.
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.--apply-all-defaults without the user's explicit choice.まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
Apache Hudiのテーブル設計を用途やデータ更新の条件から検討し、設計判断と理由を文書化します。対応する構成では設定や実行例もまとめます。
Apache Hudiのジョブ失敗をログや設定から調べ、根本の例外と既知の障害パターンを照合します。根拠の確かさを示し、対処の優先順を整理します。
Apache Hudiのデータ整理や履歴保管が取り込みに追いついているかを、専用ツールの診断結果から確認し、問題の根拠と次の対処を示すスキル。
Apache Hudiのテーブル容量やファイルサイズ、パーティションの偏りを読み取り専用ツールで調べ、小さいファイルの蓄積や書き込み集中を診断します。