Mac Local Installation standalone hadoop--learning notes

Source: Internet
Author: User

Mac Configuration Hadoop
1. Modify/etc/hosts
127.0.0.1 localhost
2. Download the hadoop2.9.0 and JDK and install the appropriate environment
Vim/etc/profile
Export hadoop_home=/users/yg/app/cluster/hadoop-2.9.0
Export hadoop_conf_dir= $HADOOP _home/etc/hadoop
Export path= $PATH: $HADOOP _home/bin
Export Java_home=/library/java/javavirtualmachines/jdk1.8.0_144.jdk/contents/home
Export path= $PATH: $JAVA _home/bin
3. Configure SSH (password-free login)
SSH-KEYGEN-T RSA generates public and private keys
Cat Xxx.pub >> Authorized_keys write the public key file into the Authorized_keys
chmod 644 Authorized_keys
SSH ip/hostname Test password-free login,
4. Installing Hadoop
Tar zxf hadoop-2.9.0.tar.gz Decompression
And then into the/etc/hadoop directory under the hadoop-2.9.0 directory.
To modify a configuration file:
1.--core-site.xml

<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>

<property>
<name>hadoop.tmp.dir</name>
<value>/opt/hadoop-2.9.0/current/tmp</value>
</property>
<property>
<name>fs.trash.interval</name>
<value>4320</value>
</property>


2.--hdfs-site.xml
<property>
<name>dfs.namenode.name.dir</name>
<value>/Users/yg/app/cluster/hadoop-2.9.0/current/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/Users/yg/app/cluster/hadoop-2.9.0/current/dfs/data</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
<property>
<name>dfs.permissions.superusergroup</name>
<value>staff</value>
</property>
<property>
<name>dfs.permissions.enabled</name>
<value>false</value>
</property>

3.--yarn-site.xml
<property>
<name>yarn.resourcemanager.hostname</name>
<value>localhost</value>
</property>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<name>yarn.resourcemanager.address</name>
<value>localhost:18040</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>localhost:18030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>localhost:18025</value>
</property> <property>
<name>yarn.resourcemanager.admin.address</name>
<value>localhost:18141</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>localhost:18088</value>
</property>
<property>
<name>yarn.log-aggregation-enable</name>
<value>true</value>
</property>
<property>
<name>yarn.log-aggregation.retain-seconds</name>
<value>86400</value>
</property>
<property>
<name>yarn.log-aggregation.retain-check-interval-seconds</name>
<value>86400</value>
</property>
<property>
<name>yarn.nodemanager.remote-app-log-dir</name>
<value>/tmp/logs</value>
</property>
<property>
<name>yarn.nodemanager.remote-app-log-dir-suffix</name>
<value>logs</value>
</property>
4.--mapred-site.xml
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>mapreduce.jobtracker.http.address</name>
<value>localhost:50030</value>
</property>
<property>
<name>mapreduce.jobhisotry.address</name>
<value>localhost:10020</value>
</property>
<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>localhost:19888</value>
</property>
<property>
<name>mapreduce.jobhistory.done-dir</name>
<value>/jobhistory/done</value>
</property>
<property>
<name>mapreduce.intermediate-done-dir</name>
<value>/jobhisotry/done_intermediate</value>
</property>
<property>
<name>mapreduce.job.ubertask.enable</name>
<value>true</value>
</property>

5.--slaves
localhost
6.--hadoop-env.sh
Modify
Export Java_home=/library/java/javavirtualmachines/jdk1.8.0_144.jdk/contents/home
Export Hadoop_conf_dir=/users/yg/app/cluster/hadoop-2.9.0/etc/hadoop

5. Format HDFs
HDFs Namenode-format
6. Start
$HADOOP _home/sbin/start-all.sh
7. Verifying the Cluster
JPs

Mac Local Installation standalone hadoop--learning notes

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.