Hadoop学习(一) - 搭建环境&示例程序
环境:
CentOS release 6.5 (Final)
hadoop-2.2.0 下载地址: http://archive.apache.org/dist/hadoop/core/hadoop-2.2.0/hadoop-2.2.0.tar.gz
hadoop-eclipse-kepler-plugin-2.2.0 下载地址: http://pan.baidu.com/s/1mgvCVgc
eclipse 3.3.2 (eclipse 版本可随意, 但是 hadoop的版本 和 插件的版本最好要一致)
1.配置hadoop
配置 etc/hadoop/hadoop-env.sh h和 etc/hadoop/yarn-env.sh 中的JAVA_HOME路径
export JAVA_HOME=/usr/java/jdk1.7.0_67/
配置文件 hdfs-site.xml
<configuration> <property> <name>fs.default.name</name> <value>hdfs://localhost:9000/</value> </property> <property> <name>mapred.job.tracker</name> <value>localhost:9001</value> </property> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>mapred.child.java.opts</name> <value>-Xmx1024m</value> </property> <property> <name>dfs.permissions</name> <value>true</value> </property> </configuration>
2启动
./bin/hadoop namenode -format
./sbin/start-all.sh
3.eclipse 插件安装, 将附件中jar包拷到eclipse plugins 目录,重启eclipse
4.新建 Map/reduce工程
相关推荐
changjiang 2020-11-16
minerd 2020-10-28
WeiHHH 2020-09-23
Aleks 2020-08-19
WeiHHH 2020-08-17
飞鸿踏雪0 2020-07-26
tomli 2020-07-26
deyu 2020-07-21
strongyoung 2020-07-19
eternityzzy 2020-07-19
Elmo 2020-07-19
飞鸿踏雪0 2020-07-09
飞鸿踏雪0 2020-07-04
xieting 2020-07-04
WeiHHH 2020-06-28
genshengxiao 2020-06-26
Hhanwen 2020-06-25