Hadoop宿醉:使用Apache Whirr启动hadoop集群CDH4
生活随笔
收集整理的這篇文章主要介紹了
Hadoop宿醉:使用Apache Whirr启动hadoop集群CDH4
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
這篇文章是關(guān)于如何在EC2實例上啟動CDH4 MRv1或CDH4 Yarn集群的。 據(jù)說您可以在Whirr的幫助下在5分鐘內(nèi)啟動一個集群! 當(dāng)且僅當(dāng)一切正常時,這才是正確的!
希望本文在這方面對您有所幫助。
所以,讓我們劃船...
- 下載Apache Whirr的穩(wěn)定版本,即。 來自以下鏈接whirr-0.8.1.tar.gz的whirr-0.8.1.tar.gz
- 從壓縮包中提取并生成密鑰
- 生成密鑰
- $ ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa_whirr $ cd whirr-0.8.1
- 創(chuàng)建一個屬性文件以使用該配置啟動集群。
- # Cluster name goes here whirr.cluster-name=testcluster# Change the number of machines in the cluster here # Using 3 DN and TT and 1JT and NN# Ganglia is configured whirr.instance-templates=1 hadoop-jobtracker+hadoop-namenode+ganglia-monitor+ganglia-metad,3 hadoop-datanode+hadoop-tasktracker+ganglia-monitor# Install JAVA whirr.java.install-function=install_openjdk whirr.java.install-function=install_oab_java## Install CDH4 MRV1 whirr.hadoop.install-function=install_cdh_hadoop whirr.hadoop.configure-function=configure_cdh_hadoop whirr.env.REPO=cdh4# For EC2 set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. whirr.provider=aws-ec2 whirr.hardware-id=c1.xlarge# Credentials should go here whirr.identity=XXXXXXXXXXXXXXXXX whirr.credential=XXXXXXXXXXXXXXXXXXXX whirr.cluster-user=whirr whirr.private-key-file=/home/ubuntu/.ssh/yourKey whirr.public-key-file=/home/ubuntu/.ssh/yourKey.pub
- 現(xiàn)在,讓我告訴您如何避免頭痛!
- 群集名稱:使群集名稱保持簡單。 避免使用testCluster,testCluster1等。 沒有大寫數(shù)字。
- 明智地確定所需的數(shù)據(jù)節(jié)點數(shù)。
- 如果未安裝java,則啟動可能不會成功。 確保圖像具有Java。 但是,此屬性文件可以解決此問題。
- 現(xiàn)在最好繼續(xù)使用MRv1,等到產(chǎn)品穩(wěn)定發(fā)布后再切換到MRv2。
- 這是用于啟動Hadoop集群的最小配置集。 但是,您可以對此進(jìn)行很多性能調(diào)整。
- 我是從ec2實例啟動此集群的,最初我遇到關(guān)于用戶的錯誤。 在下面設(shè)置配置即可解決問題。
- 在啟動之前,為?/ .ssh和whirr-0.8.1文件夾設(shè)置適當(dāng)?shù)臋?quán)限。
- 好了,我們已經(jīng)準(zhǔn)備好啟動集群。 將屬性文件命名為“ whirr_cdh.properties”。
在控制臺中,您可以看到指向Namenode和JobTracker Web UI的鏈接。 最后,它還會顯示如何ssh到實例。
- 現(xiàn)在,您應(yīng)該已經(jīng)生成了文件。 您將能夠看到以下文件:實例,hadoop-proxy.sh和hadoop-site.xml
- 啟動代理
- 打開另一個終端,然后鍵入
- 您應(yīng)該能夠訪問HDFS。
- $ export HADOOP_CONF_DIR=~/.whirr/testcluster/hadoop-site.xml $ hadoop fs -ls /
- 您也可以下載hadoop tarball并使用
- $ bin/hadoop --config ~/.whirr/testcluster fs -ls /
- 好的! 因此,我知道除非您擁有網(wǎng)絡(luò)用戶界面,否則您將不滿意
- Now, Launch Firefox (3.0v+)
Download the FoxyProxy extension by clicking this link:https://addons.mozilla.org/en-US/firefox/addon/2464.
Steps to configure and access the UI
Select Tools > FoxyProxy > Options
Click the “Add New Proxy” button.
Select “Manual Proxy Configuration”
Enter “l(fā)ocalhost” for the “Host or IP Address” field.
Enter “6666″ for the “Port” field.
Click on the “General” tab at the top of the dialog box.
Enter “EC2″ for the “Proxy Name” field.
Click on the “URL Patterns” tab at the top of the dialog box.
Click the “Add New Pattern” button.
Enter “EC2″ for the “Pattern Name” field.
Enter “*compute-1.amazonaws.com*, *.ec2.internal*, *.compute-1.internal*” for the “URL pattern” field (not case sensitive)
Select the “Whitelist” and “Wildcards” radio buttons.
Click the “OK” button to dismiss the new URL pattern dialog box.
Click the “OK” button to dismiss the new proxy dialog box.
Completely disable the Foxyproxy for now.
You should be able to see 2 proxy names after closing, default and EC2.
Click on “Use proxy EC2 for all URLs” from the pop-up menu of FoxyProxy
Copy the URL of JobTracker (can be seen while running proxy, ec2-***-**-***-**.********.amazonaws.com) and paste it in the browser.
所以,我們很好!
- 如果要啟動MRv2,請使用它。
和相同的過程!
學(xué)習(xí)愉快!
參考: Hadoop宿醉:在Techie(S)pArK *博客上, 使用我們JCG合作伙伴 Swathi V的Apache Whirr使用hadoop集群CDH4 。
翻譯自: https://www.javacodegeeks.com/2013/02/hadoop-hangover-launch-a-hadoop-cluster-cdh4-using-apache-whirr.html
總結(jié)
以上是生活随笔為你收集整理的Hadoop宿醉:使用Apache Whirr启动hadoop集群CDH4的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 怎样设置路由器才能把网速提高如何设置路由
- 下一篇: 电脑如何和PLC建立连接plc如何与电脑