hadoop集群的常用命令

上传文件

hadoop fs -put a.txt /a/b

下载文件

hadoop fs -get /a/b/* ./

查看文件
hadoop fs -ls /a/b

递归删除文件夹
hadoop fs -rm -r /a/b

分屏查看
hadoop fs -cat /a/b/* | more

把hdfs一堆小文件合并到本地的一个文件中
hadoop fs -cat /a/b/* >> test.csv

统计文件行数
hadoop fs -cat /a* | wc -l

统计文件大小
hadoop fs -count -h /file

du统计文件大小
hadoop fs -du -h / # 统计文件夹下每个文件的大小
hadoop fs -du -s -h / #统计这个文件夹总大小,返回的数据是,文件夹大小,备份总大小
hadoop fs -count / # 统计文件数量,返回的数据是目录个数,文件个数,文件总计大小,输入路径

yarn

杀死yarn任务
yarn application -kill application_id

查看yarn日志
yarn logs -applicationId application_id > logs.txt

查看yarn正在运行的任务列表
yarn application -list

查找yarn已经完成的任务列表
yarn application -appStates finished -list

查找yarn所有任务列表
yarn application -appStates ALL -list

相关推荐
HypoxiaDream2 小时前
LINUX-Ext系列⽂件系统
linux·运维·服务器
小毛驴8502 小时前
Linux curl 命令用法
linux·运维·chrome
java-yi2 小时前
Elasticsearch(ES)核心用法与实战技巧分享
大数据·elasticsearch·搜索引擎
李斯啦果2 小时前
【Linux】Linux目录配置
linux·运维·服务器
AI+程序员在路上2 小时前
linux下线程中pthread_detach与pthread_join区别
linux·运维·服务器
代码游侠2 小时前
C语言核心概念复习——C语言基础阶段
linux·开发语言·c++·学习
logocode_li2 小时前
说透 Linux Shell:命令与语法的底层执行逻辑
linux·运维·ssh
CHENKONG_CK2 小时前
晨控CK-LR08-E00与汇川H5U系列PLC配置MODBUSTCP通讯连接手册
linux·服务器·网络
LongQ30ZZ2 小时前
Linux-基础IO
linux
来鸟 鸣间2 小时前
Linux下3个so库之间的关系
linux·运维