欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

HDFS安装

程序员文章站 2024-02-21 18:54:52
...

HDFS安装

HDFS安装
HDFS安装
HDFS安装

HDFS启动

格式化文件系统

[aaa@qq.com ~]$ cd $HADOOP_HOME/bin
[aaa@qq.com bin]$ ls
hadoop  hadoop.cmd  hdfs  hdfs.cmd  mapred  mapred.cmd  rcc  yarn  yarn.cmd

查看hdfs都有什么命令可以用:

[aaa@qq.com bin]$ hdfs
Usage: hdfs [--config confdir] COMMAND
       where COMMAND is one of:
  dfs                  run a filesystem command on the file systems supported in Hadoop.
  namenode -format     format the DFS filesystem
  secondarynamenode    run the DFS secondary namenode
  namenode             run the DFS namenode
  journalnode          run the DFS journalnode
  zkfc                 run the ZK Failover Controller daemon
  datanode             run a DFS datanode
  dfsadmin             run a DFS admin client
  diskbalancer         Distributes data evenly among disks on a given node
  haadmin              run a DFS HA admin client
  fsck                 run a DFS filesystem checking utility
  balancer             run a cluster balancing utility
  jmxget               get JMX exported values from NameNode or DataNode.
  mover                run a utility to move block replicas across
                       storage types
  oiv                  apply the offline fsimage viewer to an fsimage
  oiv_legacy           apply the offline fsimage viewer to an legacy fsimage
  oev                  apply the offline edits viewer to an edits file
  fetchdt              fetch a delegation token from the NameNode
  getconf              get config values from configuration
  groups               get the groups which users belong to
  snapshotDiff         diff two snapshots of a directory or diff the
                       current directory contents with a snapshot
  lsSnapshottableDir   list all snapshottable dirs owned by the current user
						Use -help to see options
  portmap              run a portmap service
  nfs3                 run an NFS version 3 gateway
  cacheadmin           configure the HDFS cache
  crypto               configure HDFS encryption zones
  storagepolicies      list/get/set block storage policies
  version              print the version

文件系统格式化:

[aaa@qq.com bin]$ hdfs namenode -format

显示信息成功格式化:
20/07/13 16:55:35 INFO common.Storage: Storage directory /home/hadoop/app/tmp/dfs/name has been successfully formatted.
HDFS安装

启动集群

[aaa@qq.com hadoop-2.6.0-cdh5.15.1]$ cd sbin
[aaa@qq.com sbin]$ ls
distribute-exclude.sh  hdfs-config.sh  mr-jobhistory-daemon.sh  start-all.sh       start-secure-dns.sh  stop-all.sh       stop-secure-dns.sh  yarn-daemons.sh
hadoop-daemon.sh       httpfs.sh       refresh-namenodes.sh     start-balancer.sh  start-yarn.cmd       stop-balancer.sh  stop-yarn.cmd
hadoop-daemons.sh      kms.sh          slaves.sh                start-dfs.cmd      start-yarn.sh        stop-dfs.cmd      stop-yarn.sh
hdfs-config.cmd        Linux           start-all.cmd            start-dfs.sh       stop-all.cmd         stop-dfs.sh       yarn-daemon.sh
[aaa@qq.com sbin]$ ./start-dfs.sh