温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Hadoop学习--fsimage镜像文件--day04

发布时间:2020-07-23 23:49:48 来源:网络 阅读:634 作者:zhicx 栏目:大数据

1.查看fsp_w_picpath镜像文件

$hdfs oiv -i xxxImage -o xxx.xml -p XML

导出后放到eclipse中用shift+ctrl+f进行格式化后查看


2.查看edit_xxx编辑日志文件

$hdfs oev -i xxx_edit -o xxx.xml -p XML


3.hadoop fs ===  hdfs dfs


4.$hdfs datanode 

在前台运行一个datanode的程序,想要从前台放到后台先执行ctrl+z,

然后在可以用bg %jobnumber将选中的命令调出,

%jobnumber是通过jobs命令查到的后台正在执行的命令的序号(不是pid)。


5.在windows编程中需要添加log4j.properties

寻找位置:[{hadoop_home}/etc/hadoop/log4j.properties]

放入到src/log4j.properties中


6.关闭nodemanager和resourcemanager进程

在datanode上执行

$yarn-daemon.sh stop/start nodemanger

在namenode上执行

$yarn-daemon.sh stop/start resourcemanager


7.前台启动balancer平衡器

$hdfs balancer


8.合并getmerge命令

$hdfs dfs -getmerge -nl /user/ubuntu/data/hi.txt  /user/ubuntu/data/hello.txt ~/merge.txt

实际上就是合并了两个内容,并下载到了本地


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI