← 返回 Skills 市场
ivangdavila

Hadoop

作者 Iván · GitHub ↗ · v1.0.0
linuxdarwin ⚠ suspicious
476
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install hadoop
功能描述
Manage Hadoop clusters with HDFS operations, YARN job tuning, and distributed processing diagnostics.
使用说明 (SKILL.md)

Setup

If ~/hadoop/ doesn't exist or is empty, read setup.md and start the conversation naturally.

When to Use

User works with Hadoop ecosystem (HDFS, YARN, MapReduce, Hive). Agent handles cluster diagnostics, job optimization, storage management, and troubleshooting distributed processing failures.

Architecture

Memory lives in ~/hadoop/. See memory-template.md for structure.

~/hadoop/
├── memory.md        # Cluster configs, common issues, preferences
├── clusters/        # Per-cluster notes and configs
│   └── {name}.md    # Specific cluster context
└── scripts/         # Custom diagnostic scripts

Quick Reference

Topic File
Setup process setup.md
Memory template memory-template.md
HDFS operations hdfs.md
YARN tuning yarn.md
Troubleshooting troubleshooting.md

Core Rules

1. Verify Cluster State First

Before any operation, check cluster health:

hdfs dfsadmin -report
yarn node -list

Never assume cluster is healthy. A single dead DataNode changes everything.

2. Storage Before Compute

HDFS issues cascade into job failures. Always check:

hdfs dfs -df -h                    # Capacity
hdfs fsck / -files -blocks         # Block health

A job failing with "No space left" is storage, not code.

3. Resource Calculator Awareness

YARN allocates based on configured scheduler. Know which is active:

yarn rmadmin -getServiceState rm1
cat /etc/hadoop/conf/yarn-site.xml | grep scheduler

Default (Capacity) vs Fair scheduler behave very differently.

4. Replication Factor Context

Default replication=3. For temp data, suggest 1-2 to save space:

hdfs dfs -setrep -w 1 /tmp/scratch/

For critical data, verify replication is honored:

hdfs fsck /data/critical -files -blocks -replicaDetails

5. Log Location Awareness

Hadoop logs scatter across machines. Key locations:

Component Log Path
NameNode /var/log/hadoop-hdfs/hadoop-hdfs-namenode-*.log
DataNode /var/log/hadoop-hdfs/hadoop-hdfs-datanode-*.log
ResourceManager /var/log/hadoop-yarn/yarn-yarn-resourcemanager-*.log
NodeManager /var/log/hadoop-yarn/yarn-yarn-nodemanager-*.log
Application yarn logs -applicationId \x3Capp_id>

6. Safe Mode Handling

NameNode enters safe mode on startup or low block count:

hdfs dfsadmin -safemode get        # Check status
hdfs dfsadmin -safemode leave      # Exit (if blocks OK)

Never force-leave if blocks are actually missing.

7. Memory Settings Matter

90% of "job killed" issues are memory:

# Container settings
yarn.nodemanager.resource.memory-mb     # Total per node
yarn.scheduler.minimum-allocation-mb    # Min container
mapreduce.map.memory.mb                 # Map task
mapreduce.reduce.memory.mb              # Reduce task

Check these before assuming code is wrong.

HDFS Operations

Essential Commands

# Navigation
hdfs dfs -ls /path
hdfs dfs -du -h /path              # Size with human units
hdfs dfs -count -q /path           # Quota info

# Data movement
hdfs dfs -put local.txt /hdfs/     # Upload
hdfs dfs -get /hdfs/file.txt .     # Download
hdfs dfs -cp /src /dst             # Copy within HDFS
hdfs dfs -mv /src /dst             # Move within HDFS

# Maintenance
hdfs dfs -rm -r /path              # Delete (trash)
hdfs dfs -rm -r -skipTrash /path   # Delete (permanent)
hdfs dfs -expunge                  # Empty trash

Block Management

# Find corrupt blocks
hdfs fsck / -list-corruptfileblocks

# Delete corrupt file (after confirming unrecoverable)
hdfs fsck /path/file -delete

# Force replication
hdfs dfs -setrep -w 3 /important/data/

YARN Job Management

Application Lifecycle

# List applications
yarn application -list                    # Running
yarn application -list -appStates ALL     # All states

# Application details
yarn application -status \x3Capp_id>

# Kill stuck application
yarn application -kill \x3Capp_id>

# Get logs (after completion)
yarn logs -applicationId \x3Capp_id>
yarn logs -applicationId \x3Capp_id> -containerId \x3Ccontainer_id>

Queue Management

# List queues
yarn queue -list

# Queue status
yarn queue -status \x3Cqueue_name>

# Move application between queues
yarn application -movetoqueue \x3Capp_id> -queue \x3Ctarget_queue>

Common Traps

  • Deleting without -skipTrash on full cluster → Trash still uses space, cluster stays full
  • Setting container memory below JVM heap → Instant container kill, confusing errors
  • Ignoring speculative execution on slow jobs → Wastes resources on duplicated tasks
  • Running fsck on busy cluster → Performance impact, run during maintenance
  • Assuming HDFS = POSIX semantics → No append-in-place, no random writes
  • Forgetting timezone in scheduling → Oozie/Airflow jobs fire at wrong times

Security & Privacy

Data that stays local:

  • Cluster notes saved in ~/hadoop/clusters/
  • Preferences and environment context

What commands access:

  • hdfs/yarn commands connect to your Hadoop cluster
  • Some commands read system paths (/var/log, /etc/hadoop/conf)
  • Destructive commands require explicit user confirmation

This skill does NOT:

  • Store credentials (use kinit/keytab separately)
  • Make external API calls beyond your cluster
  • Run destructive commands without asking first

Related Skills

Install with clawhub install \x3Cslug> if user confirms:

  • linux — system administration
  • docker — containerized deployments
  • bash — shell scripting

Feedback

  • If useful: clawhub star hadoop
  • Stay updated: clawhub sync
安全使用建议
This skill appears coherent for Hadoop administration. If you install it: ensure the agent runs from a host that legitimately has hdfs/yarn/hadoop on PATH and appropriate cluster network access; expect the skill to read /var/log and /etc/hadoop/conf for diagnostics and to create ~/hadoop/ memory files. The docs state that destructive commands (rm -rf, forcible safe-mode leave, datanode data removal, killing apps) will require your explicit confirmation—do not approve destructive operations unless you understand the consequences. Because the skill does not request credentials, continue to manage Kerberos keytabs/tickets yourself. If you need stronger assurances, ask the owner for provenance (who maintains this skill) or run the agent in a sandboxed admin node rather than on an arbitrary workstation.
功能分析
Type: OpenClaw Skill Name: hadoop Version: 1.0.0 The skill bundle is classified as suspicious due to the inclusion of highly destructive commands like `rm -rf` (in `troubleshooting.md`) and powerful authentication commands like `kinit -kt` (also in `troubleshooting.md`). While these commands are presented within legitimate troubleshooting contexts and are accompanied by explicit warnings and requirements for user confirmation, their inherent risk for data loss or unauthorized access, especially if the agent's safety mechanisms are bypassed by prompt injection or user error, elevates the classification from benign. There is no evidence of intentional malicious behavior such as data exfiltration or backdoor installation.
能力评估
Purpose & Capability
Name, description, and required binaries (hdfs, yarn, hadoop) match the documented capabilities (HDFS operations, YARN job management, diagnostics). No unrelated credentials or tools are requested.
Instruction Scope
Instructions explicitly tell the agent to run administrative hdfs/yarn commands and to read cluster logs/configs (e.g., /var/log, /etc/hadoop/conf). This is appropriate for cluster diagnostics but means the agent will read system-level files and may suggest destructive admin actions (the docs state destructive commands require explicit user confirmation).
Install Mechanism
No install spec or external downloads—instruction-only skill. Nothing is written to disk by an installer other than the skill's own memory files under ~/hadoop/, which is documented.
Credentials
The skill requests no environment variables or credentials. It documents that credentials (Kerberos keytabs) should be managed separately and that it does not store credentials—this is proportionate to its admin role.
Persistence & Privilege
The skill persists state under ~/hadoop/ (memory.md and cluster notes) which is reasonable. It is not always-included and uses normal autonomous invocation defaults; because it can run admin commands, users must confirm destructive actions when prompted.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install hadoop
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /hadoop 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
Slug hadoop
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Hadoop 是什么?

Manage Hadoop clusters with HDFS operations, YARN job tuning, and distributed processing diagnostics. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 476 次。

如何安装 Hadoop?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install hadoop」即可一键安装,无需额外配置。

Hadoop 是免费的吗?

是的,Hadoop 完全免费(开源免费),可自由下载、安装和使用。

Hadoop 支持哪些平台?

Hadoop 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin)。

谁开发了 Hadoop?

由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.0。

💬 留言讨论