seemebaby 发表于 2018-10-29 09:54:05

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

  1.查看fsimage镜像文件
  $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
  实际上就是合并了两个内容,并下载到了本地

页: [1]
查看完整版本: Hadoop学习--fsimage镜像文件--day04