hadoop 2.5 伪分布安装,hadoop2.5分布安装最新的hadoop2.5 安装目录做了一定修改,安装变得稍微简单一点
首先安装准备工具
$ sudo apt-get install ssh $ sudo apt-get install rsync 配置ssh $ ssh localhost If you cannot ssh to localhost without a passphrase, execute the following commands: $ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa $ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
进入etc/hadoop/hadoop-env.sh 配置运行环境 # set to the root of your Java installation export JAVA_HOME=/usr/java/latest # Assuming your installation directory is /usr/local/hadoop export HADOOP_PREFIX=/usr/local/hadoop 配置hdfs端口和备份数
etc/hadoop/core-site.xml: <configuration> <property> <name>fs.defaultFS</name> <value>hdfs://localhost:9000</value> </property> <property>#ClientDatanodeProtocol 调用getBlockLocalPathInfo的时候 <name>dfs.block.local-path-access.user</name> <value>infomorrow</value> </property> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>hadoop.tmp.dir</name> <value>/home/infomorrow/hadoop-tmp</value> </property> </configuration> etc/hadoop/hdfs-site.xml: <configuration> <property> <name>dfs.replication</name> <value>1</value> </property> </configuration> 配置使用yarn
etc/hadoop/mapred-site.xml: <configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> </configuration> etc/hadoop/yarn-site.xml: NodeManager 在 启 动 时 加 载shuffle server,shuffle server 实 际 上 是 Jetty/Netty Server,Reduce Task 通 过 该 server 从 各 个NodeManager 上远程复制 Map Task 产生的中间结果 <configuration> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property> </configuration> 启动过程: hdfs
$ sbin/stop-dfs.sh$ sbin/stop-yarn.sh
用chukwa的人很少 去hadoop论坛问问吧
伪分布模式也是在一台单机上运行,但用不同的 Java 进程模仿分布式运行中的各类结点 ( NameNode, DataNode, JobTracker, TaskTracker, Secondary NameNode ),分布式运行中的这几个结点的区别: |