huawei-cloud-kafka-replica-reassignment
Kafka 集群副本扩容与分区重分配工具:支持可变副本数(1→2、1→3、2→N)、可调磁盘使用率阈值(默认 70%)、Web UI 界面(上传 topic/broker 表格、下载模板、调整参数)、三阶段流水线(分配→合并→转 JSON)每阶段带检查门控、策略化 JSON 文件生成(大 topic 单独出文件、按…
от huaweicloudskill321 установка в других каталогах
Установить huawei-cloud-kafka-replica-reassignment в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Kafka Replica Expansion & Partition Reassignment
Expand Kafka cluster partitions from their current replication factor to a target factor and
produce partition reassignment JSON that can be passed directly to
kafka-reassign-partitions.sh --execute.
Configurable Parameters
| Parameter | Default | Description |
|---|---|---|
replica_count |
2 | Target replication factor. Accepts 2, 3, N. The scripts add replica_count - current_replicas new replicas per partition. |
disk_threshold |
70 | Disk usage ceiling (%). After allocation, no mount point's projected usage may exceed this value. |
json_strategy |
size_10g |
Strategy for splitting the output JSON, described below. |
json_strategy_param |
10 | Strategy parameter (topic-count threshold or size threshold, depending on strategy). |
JSON Split Strategies
| Strategy | Meaning | Parameter Usage |
|---|---|---|
size_10g |
Topics with any single partition > 10 GB get their own JSON file; the rest are merged into a common file. | json_strategy_param = size threshold (GB), default 10 |
topic_count |
Merge N topics into one JSON file. | json_strategy_param = topic count, default 10 |
single_file |
Merge all partitions into one JSON file. | none |
per_topic |
One JSON file per topic. | none |
custom |
Combined strategy. | json_strategy_param = JSON string, e.g. {"big_size": 10, "small_batch": 10}: topics larger than big_size get one file each, the remaining topics are packed small_batch per file |
Users can also define combined strategies in the UI, e.g. "one file per topic larger than 10 GB,
then 10 topics per file for the rest" — this combination maps to the custom strategy.
The Three Stages (sequential, each gated by checks)
Stage 1: Allocate new replicas -> check -> PASS? -> Stage 2
Stage 2: Merge master table -> check -> PASS? -> Stage 3
Stage 3: Emit JSON -> check -> PASS? -> Deliver
Gate rule: after each stage its corresponding validation runs (see
references/validation-rules.md). Only a PASS moves to the next stage; a FAIL reports the exact
assertion and offending rows, so fix the data and re-run that stage. The gate lives inside the
scripts themselves (validate.py); the Web UI and the CLI share the same checks. If the
validation module is unavailable, the stage is treated as FAIL — never silently pass. Later
stages depend on the previous stage's output files.
Stage 1: Allocate new replicas -> read references/stage1-allocate.md
- Input:
topic.xlsx(current partitions),broker.xlsx(disk usage) - Outputs:
topic.xlsx(original replica table),topic_new.xlsx(new replicas),broker_updated.xlsx(refreshed disk table) - Naming: output names are fixed (
topic.xlsx/topic_new.xlsx/topic_all.xlsx/broker_updated.xlsx) and contain no cluster name. Because the input table is also calledtopic.xlsx,--output-dirmust differ from the input directory; otherwise the script blocks withOUTPUT_OVERWRITES_INPUT(rc=1, no artifacts written). Legacydolce_main*.csvintermediate files from older versions can still be read. - Core: process topics in order and bring every partition up to the target replication factor. Placement is decided by projected usage (current value + the capacity being placed now). Only distinct brokers (L0) are allowed; new replicas are spread across brokers to avoid piling onto one or two, and broker watermarks are refreshed after every allocation.
- Checks: no threshold breach caused by this run (pre-existing over-threshold disks only warn and
are listed in
pre_existing_over_threshold), replica count complete, no same-broker conflicts, new-replica distribution balanced. - When allocation is impossible, block:
status=FAIL, exit code 2, no artifacts written,blockersprovides quantified gaps — never "place it anyway" to fake a complete plan:NO_OTHER_BROKER: only same-broker different-mount candidates are within threshold. Kafka reassignment JSON forbids duplicate broker IDs in one partition'sreplicas(log_dirscan only name directories for existing replicas), so such a plan cannot be expressed and would be rejected on submission — block instead of degrading.L3_BLOCKED: no mount point is within threshold at all (insufficient capacity).
Stage 2: Merge master table -> read references/stage2-merge.md
- Inputs:
topic.xlsx(original replicas),topic_new.xlsx(new replicas) - Output:
topic_all.xlsx(merged master table) - Core: sort by topic total capacity ascending; same topic grouped together, partitions ascending.
- Checks: row count matches, sort order correct, column structure complete.
Stage 3: Emit JSON -> read references/stage3-json.md
- Input:
topic_all.xlsx - Outputs: the reassignment JSON file set under
/json/ - Core: split files by strategy, then validate th
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-kafka-replica-reassignment?
Kafka 集群副本扩容与分区重分配工具:支持可变副本数(1→2、1→3、2→N)、可调磁盘使用率阈值(默认 70%)、Web UI 界面(上传 topic/broker 表格、下载模板、调整参数)、三阶段流水线(分配→合并→转 JSON)每阶段带检查门控、策略化 JSON 文件生成(大 topic 单独出文件、按 N 个 topic 打包,或在 Web UI 上按 topic 个数 / topic 分区大小自定义拆分)、格式 校验、复核报告生成。触发词:Kafka 副本扩容、加副本、副本数调整、partition reassignment、分区重 分配、reassignment json、单副本改双副本/多副本、磁盘使用率分配、dolce_main、broker-main、 topic.xls、broker.xls、kafka reassignment tool。不适用于:仅查询分区现状、非 Kafka 场景的 CSV 转换、集群装机与部署、Kafka 参数调优。
Как установить скилл huawei-cloud-kafka-replica-reassignment?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-kafka-replica-reassignment запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…