tongyi007 发表于 2018-10-31 10:35:52

Hadoop local模式部署(单节点)


[*]  $ vim hdfs-site.xml
  在标签中(即嵌套在该标签中)加入以下内容:
  
  dfs.namenode.name.dir
  file:/hadoop/dfs/name
  Determineswhere on the local filesystem the DFS name node should store the name table.
  true
  
  
  dfs.datanode.data.dir
  file:/hadoop/dfs/data
  Determineswhere on the local filesystem an DFS data node should store its blocks.
  
  true
  
  
  dfs.replication
  1
  
  
  dfs.permissions
  false
  
  更多hdfs-site.xml的配置信息,参考:
http://hadoop.apache.org/docs/r2.2.0/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml配置mapred-site.xml
  默认不存在此文件,需要创建:
  $ cp mapred-site.xml.template mapred-site.xml
  $ vim mapred-site.xml
  在标签中(即嵌套在该标签中)加入以下内容:
  
  mapreduce.framework.name
  yarn
  
  
  mapred.system.dir
  file:/hadoop/mapred/system
  true
  
  
  mapred.local.dir
  file:/hadoop/mapred/local
  true
  
配置yarn-site.xml
  执行以下命令:
  $ vim yarn-site.xml
  在标签中(即嵌套在该标签中)加入以下内容:
  
  yarn.nodemanager.aux-services
  mapreduce_shuffle
  shuffle service that needsto be set for Map Reduce to run
  
  
  yarn.resourcemanager.hostname
  192.168.1.100
  hostanem of RM
  
  yarn.resourcemanager.hostname配置后,其他端口号将使用默认。详见:
http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-common/yarn-default.xml初始化
  格式化NameNode:

[*]  $ hdfs namenode -format

页: [1]
查看完整版本: Hadoop local模式部署(单节点)