Mac OSX System Brew install Hadoop Installation Guide
- Brew Install Hadoop
- Configure Core-site.xml: Configure the HDFs file address (remember to chmod the corresponding folder, otherwise it will not start HDFs properly) and Namenode RPC traffic port
- Configuring the map reduce communication port in Mapred-site.xml
- Configures the number of Datanode replicas in Hdfs-site.xml.
- Format HDFs File system
- Start Hadoop and yarn Namenode datanode mapred, which is: Run start_all.sh
- (optional) Create the address of the current user in HDFs: Hadoop fs-mkdir-p/user/fan
- Start, the Web UI address defaults to: http://localhost:50070.
problems encountered:One, as in Hdfs-put ~/file Fileonhdfs, appears error:warn org.apache.hadoop.hdfs.server.datanode.DataNode:Invalid directory in DF S.data.dir reasons are:
- The file system set in Core-site.xml is full and needs to be reset and-format again.
- The HDFs file system that is set in core-site.xml needs to be in the same folder as chmod 777
Two, as in Hadoop fs-ls. Command appears: ls: '. ': No such file or directory '
- Please perform:
hadoop fs -mkdir -p /user/[current login user]
configuration file Demo:
Configuring Core-site.xml, Hdfs-site.xml, Mapred-site.xml
* Core-site.xml:
XML code
- <configuration>
- <property>
- <name>hadoop.tmp.dir</name>
- <value>/usr/local/tmp/hadoop/hadoop-${user.name}</value>
- <description>a base for other temporary directories.</description>
- </property>
- <property>
- <name>fs.default.name</name>
- <value>hdfs://localhost:8020</value>
- </property>
- </configuration>
* Hdfs-site.xml:
XML code
- <configuration>
- <property>
- <name>dfs.replication</name>
- <value>1</value>
- </property>
- </configuration>
* Mapred-site.xml:
XML code
- <configuration>
- <property>
- <name>mapred.job.tracker</name>
- <value>localhost:8021</value>
- </property>
- <property>
- </configuration>
In fact, these are the basic configuration, online a lot. You can refer to these 3 addresses for a description of the configured values:
Wrote http://hadoop.apache.org/common/docs/r0.20.2/core-default.html
Http://hadoop.apache.org/common/docs/r0.20.2/hdfs-default.html
Http://hadoop.apache.org/common/docs/r0.20.0/mapred-default.html
2.3) format Hadoop file system HDFs. Execute command Hadoop Namenode-format
Mac OSX System Brew install Hadoop Installation Guide