cdh搭建hadoop集群

这篇文章是关于如何在EC2实例上启动CDH4 MRv1或CDH4 Yarn集群的。 据说您可以在Whirr的帮助下在5分钟内启动一个集群! 当且仅当一切工作正常时,这才是正确的!

希望本文在这方面对您有所帮助。

所以,让我们划船...

  • 下载Apache Whirr的稳定版本,即。 来自以下链接的whirr-0.8.1.tar.gz:whirr-0.8.1.tar.gz
  • 从压缩包中提取并生成密钥
$ tar -xzvf whirr-0.8.1.tar.gz
$ cd whirr-0.8.1
  • 生成密钥
  • $ 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实例启动此集群的,最初我遇到关于用户的错误。 在下面设置配置即可解决问题。
    whirr.cluster-user=whirr
  • 在启动之前,为〜/ .ssh和whirr-0.8.1文件夹设置适当的权限。
    • 好了,我们已经准备好启动集群。 将属性文件命名为“ whirr_cdh.properties”。
    $ cd whirr-0.8.1
    $ bin/whirr launch-cluster --config whirr_cdh.properties

    在控制台中,您可以看到指向Namenode和JobTracker Web UI的链接。 最后,它还会显示如何ssh到实例。

    • 现在,您应该已经生成了文件。 您将能够看到以下文件:实例,hadoop-proxy.sh和hadoop-site.xml
    • 启动代理
    $ sh hadoop-proxy.sh
  • 打开另一个终端,然后键入
  • 您应该能够访问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,请使用它。
    ## Cluster name goes here.
    whirr.cluster-name=yarncluster# Change the number of machines in the cluster here
    whirr.instance-templates=1 hadoop-namenode+yarn-resourcemanager+mapreduce-historyserver,2 hadoop-datanode+yarn-nodemanager# Install JAVA
    whirr.java.install-function=install_openjdk
    whirr.java.install-function=install_oab_java## Install CDH4 Yarn
    whirr.hadoop.install-function=install_cdh_hadoop
    whirr.hadoop.configure-function=configure_cdh_hadoop
    whirr.yarn.configure-function=configure_cdh_yarn
    whirr.yarn.start-function=start_cdh_yarn
    whirr.mr_jobhistory.start-function=start_cdh_mr_jobhistory
    whirr.env.REPO=cdh4
    whirr.env.MAPREDUCE_VERSION=2# 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=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    whirr.cluster-user=whirr
    whirr.private-key-file=/home/ubuntu/.ssh/yourKey
    whirr.public-key-file=/home/ubuntu/.ssh/yourKey.pub

    和相同的过程!

    学习愉快!

    参考: 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相关推荐

  1. Hadoop宿醉:使用Apache Whirr启动hadoop集群CDH4

    这篇文章是关于如何在EC2实例上启动CDH4 MRv1或CDH4 Yarn集群的. 据说您可以在Whirr的帮助下在5分钟内启动一个集群! 当且仅当一切正常时,这才是正确的! 希望本文在这方面对您有所 ...

  2. 3台机器配置hadoop集群_Hadoop学习之路(三)Hadoop集群搭建和简单应用

    概念了解 主从结构:在一个集群中,会有部分节点充当主服务器的角色,其他服务器都是从服务器的角色,当前这种架构模式叫做主从结构. 主从结构分类: 1.一主多从 2.多主多从 Hadoop中的HDFS和Y ...

  3. xampp php搭建失败,ThinkPHP框架搭建及常见问题(XAMPP安装失败、Apache/MySQL启动失败),thinkphpxampp...

    ThinkPHP框架搭建及常见问题(XAMPP安装失败.Apache/MySQL启动失败),thinkphpxampp 本文为大家详细分享了搭建ThinkPHP框架时遇到的问题,为大家提供了解决方法, ...

  4. Hadoop的HA机制原理解析,与HA高可用集群环境搭建

    2019独角兽企业重金招聘Python工程师标准>>> Hadoop的HA工作机制示意图 下面我们开始搭建这一套高可用集群环境 hadoop2.0已经发布了稳定版本了,增加了很多特性 ...

  5. hadoop 开启防火墙_Hadoop部署一Hadoop安装

    哈喽,同学们好,继上篇文章<Hadoop部署一jdk与MySQL>,我们安装好了jdk以及MySQL.我们现在开始安装部署Hadoop,开启Hadoop之旅. 一.下载Hadoop安装包 ...

  6. Hadoop集群_Hadoop安装配置

    1.集群部署介绍 1.1 Hadoop简介 Hadoop是Apache软件基金会旗下的一个开源分布式计算平台.以Hadoop分布式文件系统(HDFS,Hadoop Distributed Filesy ...

  7. hadoop hive集群_失眠大数据专家,基于Hadoop不同版本搭建hive集群(附配置文件)

    前言 本教程采用了两种方案 一种是hive-1.21版本,hadoop版本为hadoop2.6.5 还有一种是主要讲基于hadoop3.x hive的搭建 先来第一种 一.本地方式(内嵌derby) ...

  8. java 配置hdfs集群_Hadoop集群搭建-04安装配置HDFS

    HDFS是配合Hadoop使用的分布式文件系统,分为 namenode: nn1.hadoop nn2.hadoop datanode: s1.hadoop s2.hadoop s3.hadoop ( ...

  9. 学习笔记Hadoop(五)—— Hadoop集群的安装与部署(2)—— Hadoop集群部署模式、配置固定IP

    一.Hadoop集群部署模式 Hadoop的安装部署的模式一共有三种: 独立模式(本地模式) standalone 默认的模式,无需运行任何守护进程(daemon),所有程序都在单个JVM上执行.由于 ...

最新文章

  1. 《BI那点儿事》数据流转换——排序
  2. java标识符的规则等
  3. JPA_@Table 注解详解
  4. 小b和回文数(51Nod-2483)
  5. load()是python文件操作的函数_python基础总结(函数,文件操作)
  6. 史上最全的MSSQL复习笔记
  7. 转载:c#的逆向工程-IL指令集
  8. css 列表属性详细总结
  9. SecureCRT连接Linux显示Mysql记录中文乱码
  10. Linux目录结构示意详解图
  11. 取经队伍要裁员,第一个就是唐僧
  12. 《信息物理融合系统(CPS)设计、建模与仿真——基于 Ptolemy II 平台》——第1章 异构建模 1.1语法、语义、语用...
  13. 领导人要读的10本管理学书籍
  14. oracle 电子书大全
  15. openstreetmap-server-ubuntu-16-04+GraphHopper搭建离线地图服务器和离线路径规划
  16. html显示隐藏表格内外边框
  17. 添加航班信息c语言,c语言编写航班查询代码
  18. 线上bug检测工具 android,Android 测试中对于偶现且难以重现的 bug 的处理
  19. test_and_set_bit
  20. 联想TD350显卡驱动

热门文章

  1. 服务器性能指标(二)——CPU利用率分析及问题排查
  2. 自然语言处理中的Attention Model:是什么以及为什么[一]
  3. JavaScript学习总结(一)——JavaScript基础
  4. 【深入理解JVM】:类加载器与双亲委派模型
  5. Java 8新特性——default方法(defender方法)介绍
  6. 【Mysql】win10上Mysq的l安装
  7. 《四世同堂》金句摘抄(七)
  8. java中,在一个有序数组中插入元素,使得数组保持有序排列
  9. ssh(Spring+Spring mvc+hibernate)——applicationContext.xml
  10. 2016蓝桥杯省赛---java---A---10(压缩转换)