Hadoop: 搭建Hadoop cluster环境

先把我的配置文件贴上来,详细解释以后再弄:
➜ hadoop vim hadoop-env.sh

# The java implementation to use.
export JAVA_HOME=/usr/lib/jvm/sun_jdk

  1. ➜  hadoop  vim core-site.xml
  2. <configuration>
  3. <property>
  4. <name>fs.defaultFS</name>
  5. <value>hdfs://master:9000</value>
  6. </property>
  7. <property>
  8. <name>hadoop.tmp.dir</name>
  9. <value>/home/yuliang/bigdata/hadoop/tmp/</value>
  10. <description>A base for other temporary directories</description>
  11. </property>
  12. <property>
  13. <name>io.file.buffer.size</name>
  14. <value>131072</value>
  15. </property>
  16. </configuration>
  17.  
  18.  
  19. ➜  hadoop  vim hdfs-site.xml
  20. <configuration>
  21. <property>
  22. <name>dfs.namenode.name.dir</name>
  23. <value>file:/home/yuliang/bigdata/hadoop/name</value>
  24. <final>true</final>
  25. </property>
  26. <property>
  27. <name>dfs.datanode.data.dir</name>
  28. <value>file:/home/yuliang/bigdata/hadoop/data</value>
  29. <final>true</final>
  30. </property>
  31. <property>
  32. <name>dfs.replication</name>
  33. <value>2</value>
  34. <final>true</final>
  35. </property>
  36. <property>
  37. <name>dfs.webhdfs.enabled</name>
  38. <value>true</value>
  39. </property>
  40. </configuration>
  41.  
  42. ➜  hadoop  vim yarn-site.xml
  43. <property>
  44. <name>yarn.nodemanager.aux-services</name>
  45. <value>mapreduce_shuffle</value>
  46. </property>
  47. <property>
  48. <name>yarn.nodemanager.aux-services.mapreduce_shuffle.class</name>
  49. <value>org.apache.hadoop.mapred.ShuffleHandler</value>
  50. </property>
  51. <property>
  52. <name>yarn.app.mapreduce.am.log.level</name>
  53. <value>DEBUG</value>
  54. </property>
  55. <property>
  56. <name>yarn.resourcemanager.resource-tracker.address</name>
  57. <value>master:8025</value>
  58. </property>
  59. <property>
  60. <name>yarn.resourcemanager.scheduler.address</name>
  61. <value>master:8030</value>
  62. </property>
  63. <property>
  64. <name>yarn.resourcemanager.address</name>
  65. <value>master:8050</value>
  66. </property>
  67. </configuration>
  68.  
  69. ➜  hadoop  vim mapred-site.xml
  70. <configuration>
  71. <property>
  72. <name>mapreduce.framework.name</name>
  73. <value>yarn</value>
  74. </property>
  75. </configuration>

发布者

690130229

coder,喜欢安静,喜欢读书,wechat: leslie-liya

发表评论