Mac OSX System Brew install Hadoop Installation Guide

Source: Internet
Author: User
Tags hadoop fs

Mac OSX System Brew install Hadoop Installation Guide
    1. Brew Install Hadoop
    2. 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
    3. Configuring the map reduce communication port in Mapred-site.xml
    4. Configures the number of Datanode replicas in Hdfs-site.xml.
    5. Format HDFs File system
    6. Start Hadoop and yarn Namenode datanode mapred, which is: Run start_all.sh
    7. (optional) Create the address of the current user in HDFs: Hadoop fs-mkdir-p/user/fan
    8. 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:
    1. The file system set in Core-site.xml is full and needs to be reset and-format again.
    2. 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 '
    1. 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
    1. <configuration>
    2. <property>
    3. <name>hadoop.tmp.dir</name>
    4. <value>/usr/local/tmp/hadoop/hadoop-${user.name}</value>
    5. <description>a base for other temporary directories.</description>
    6. </property>
    7. <property>
    8. <name>fs.default.name</name>
    9. <value>hdfs://localhost:8020</value>
    10. </property>
    11. </configuration>

* Hdfs-site.xml:

XML code
    1. <configuration>
    2. <property>
    3. <name>dfs.replication</name>
    4. <value>1</value>
    5. </property>
    6. </configuration>

* Mapred-site.xml:

XML code
    1. <configuration>
    2. <property>
    3. <name>mapred.job.tracker</name>
    4. <value>localhost:8021</value>
    5. </property>
    6. <property>
    7. </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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.