cdh搭建hadoop集群_Hadoop宿醉:使用Apache Whirr启动hadoop集群CDH4
生活随笔
收集整理的這篇文章主要介紹了
cdh搭建hadoop集群_Hadoop宿醉:使用Apache Whirr启动hadoop集群CDH4
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
cdh搭建hadoop集群
這篇文章是關于如何在EC2實例上啟動CDH4 MRv1或CDH4 Yarn集群的。 據說您可以在Whirr的幫助下在5分鐘內啟動一個集群! 當且僅當一切工作正常時,這才是正確的!
希望本文在這方面對您有所幫助。
所以,讓我們劃船...
- 下載Apache Whirr的穩定版本,即。 來自以下鏈接的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
- 創建一個屬性文件以使用該配置啟動集群。
- # 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
- 現在,讓我告訴您如何避免頭痛!
- 群集名稱:使群集名稱保持簡單。 避免使用testCluster,testCluster1等。 沒有大寫數字。
- 明智地確定所需的數據節點數。
- 如果未安裝java,則啟動可能不會成功。 確保圖像具有Java。 但是,此屬性文件可以解決此問題。
- 現在最好繼續使用MRv1,等到生產穩定版本發布后再切換到MRv2。
- 這是用于啟動Hadoop集群的最小配置集。 但是,您可以對此進行很多性能調整。
- 我是從ec2實例啟動此集群的,最初我遇到關于用戶的錯誤。 在下面設置配置即可解決問題。
- 在啟動之前,為?/ .ssh和whirr-0.8.1文件夾設置適當的權限。
- 好了,我們已經準備好啟動集群。 將屬性文件命名為“ whirr_cdh.properties”。
在控制臺中,您可以看到指向Namenode和JobTracker Web UI的鏈接。 最后,它還會顯示如何ssh到實例。
- 現在,您應該已經生成了文件。 您將能夠看到以下文件:實例,hadoop-proxy.sh和hadoop-site.xml
- 啟動代理
- 打開另一個終端,然后鍵入
- 您應該能夠訪問HDFS。
- $ export HADOOP_CONF_DIR=~/.whirr/testcluster/hadoop-site.xml $ hadoop fs -ls /
- 您也可以下載hadoop tarball并使用
- $ bin/hadoop --config ~/.whirr/testcluster fs -ls /
- 好的! 因此,我知道除非您擁有網絡用戶界面,否則您將不滿意
- 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 “localhost” 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,請使用它。
和相同的過程!
學習愉快!
參考: 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
cdh搭建hadoop集群
總結
以上是生活随笔為你收集整理的cdh搭建hadoop集群_Hadoop宿醉:使用Apache Whirr启动hadoop集群CDH4的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 备案认证是什么意思(备案认证)
- 下一篇: DDOS违法吗(ddos服务器违法么)