CDH使用秘籍(一):Cloudera Manager和Managed Service的数据库

本文深入探讨了Cloudera Manager5.2.0版本与CDH5中数据库的使用与配置,包括服务主机监控和监控服务无法配置外部表的原因,以及提供三种不同的安装方式和搭建数据库的详细步骤。
文章来源:http://blog.youkuaiyun.com/shifenglov/article/details/41115001
 

CDH使用秘籍(一文章来源):Cloudera Manager和Managed Service的数据库

分类: Hadoop   1130人阅读  评论(0)  收藏  举报
背景

从业务发展需求,大数据平台需要使用spark作为机器学习、数据挖掘、实时计算等工作,所以决定使用Cloudera Manager5.2.0版本和CDH5。
以前搭建过Cloudera Manager4.8.2和CDH4,在搭建Cloudera Manager5.2.0版本的时候,发现相应的Service Host Monitor 和 Service Monitor不能配置外部表,刚开是还以为是配置出错,后来才发现应该是新版本的Cloudera的存储改变方式了。查了很多文档,果然发现,新版本中 Service Host Monitor 和 ServicMonitor e 不需要配置数据库,默认使用内置存储方式,并且不能修改

概述

Cloudera Manager uses databases to store information about the Cloudera Manager configuration, as well as information such as the health of the system or task progress. For quick, simple installations, Cloudera Manager can install and configure an embedded PostgreSQL database as part of the Cloudera Manager installation process. In addition, some CDH services use databases and are automatically configured to use a default database. If you plan to use the embedded and default databases provided during the Cloudera Manager installation, see Installation Path A - Automated Installation by Cloudera Manager.

Although the embedded database is useful for getting started quickly, you can also use your own  PostgreSQL, MySQL, or Oracle database for the Cloudera Manager Server and services that use databases.

需要的数据库
    
The  Cloudera Manager Server, Activity Monitor, Reports Manager, Hive Metastore, Sentry Server, Cloudera Navigator Audit Server , and  Cloudera Navigator Metadata Server  all require databases. The type of data contained in the databases and their estimated sizes are as follows:
  • Cloudera Manager - Contains all the information about services you have configured and their role assignments, all configuration history, commands, users, and running processes. This relatively small database (<100 MB) is the most important to back up.
  • Activity Monitor - Contains information about past activities. In large clusters, this database can grow large. Configuring an Activity Monitor database is only necessary if a MapReduce service is deployed.
  • Reports Manager - Tracks disk utilization and processing activities over time. Medium-sized.
  • Hive Metastore - Contains Hive metadata. Relatively small.
  • Sentry Server - Contains authorization metadata. Relatively small.
  • Cloudera Navigator Audit Server - Contains auditing information. In large clusters, this database can grow large.
  • Cloudera Navigator Metadata Server - Contains authorization, policies, and audit report metadata. Relatively small.

The Cloudera Manager Service Host Monitor and Service Monitor roles have an  internal datastore (注意,就是此处说明了, Host Monitor and Service Monitor在CM5版本中,不能配置外部表,只能使用内置表。与CM4版本有区别)

Cloudera Manager 提供三种不同的安装方式,方法A是自动化安装,方法B和C是使用rpm或tar手动安装:
  • Path A automatically installs an embedded PostgreSQL database to meet the requirements of the services. This path reduces the number of installation tasks to complete and choices to make. In Path A you can optionally choose to create external databases forActivity Monitor, Reports Manager, Hive Metastore, Sentry Server, Cloudera Navigator Audit Server, and Cloudera Navigator Metadata Server.
  • Path B and Path C require you to create databases for the Cloudera Manager Server, Activity Monitor, Reports Manager, Hive Metastore, Sentry Server, Cloudera Navigator Audit Server, and Cloudera Navigator Metadata Server.

使用外部数据库需要更多的输入以及相关工作,但是cloudera提供了更多的兼容性和扩展性,让你可以弹性的选择数据库和配置。
当然可以在一套系统中安装多种不同的数据库,但是这样会带来很多不确定的因素,所以cloudera建议始终使用同一种数据库。

在很多例子中,你需要将相应的service与database安装到同一台机器上,可以减小网络IO,提高整体效率。
当然,你也可以将service和database分开安装到不同的机器上,在大型部署中或者database管理员需要这样的配置,比如这样的场景,Oracle DBA需要独立的管理database。

搭建数据库的配置参考官网,有详细配置步骤:

下一篇文章中,我将详细介绍Cloudera Manager中database的存储机制,怎样配置,调优等。
### Cloudera CDH 集群部署与管理 #### 什么是CDHCloudera's Distribution Including Apache Hadoop(简称 CDH),是由 Cloudera 提供的套开源大数据解决方案,它包含了 Apache Hadoop 及其生态系统中的多个组件[^1]。 #### Cloudera Manager 的作用 Cloudera Manager款用于管理监控 CDH 集群的工具。通过该工具可以实现集群的自动化安装、集中化管理、实时监控以及报警等功能。它的引入显著减少了集群安装所需的时间人力成本,使运维团队能够更高效地维护大规模分布式环境[^2]。 #### 下载并安装CDH Parcels 为了获取最新的 CDH 版本文件,在官方仓库中可找到对应的 Parcel 文件及其校验码 SHA1 文件。例如,对于版本 `CDH-5.15.0`,需要下载两个文件: - **Parcel 文件**: `CDH-5.15.0-1.cdh5.15.0.p0.21-el7.parcel` - **SHA1 校验文件**: `CDH-5.15.0-1.cdh5.15.0.p0.21-el7.parcel.sha1` 这些文件可以从以下地址下载: https://archive.cloudera.com/cdh5/parcels/5.15.0/[^3] #### 准备本地存储库 在实际环境中,通常会创建个本地存储库来托管 Cloudera Manager 的 RPM 包及相关依赖项。以下是具体的操作步骤: 进入预先准备好的存放 Cloudera Manager RPM 包的目录: ```bash cd /data6/upload/cloudera-repos/ ``` 接着生成 RPM 元数据以便于后续使用 yum 或其他包管理器进行安装: ```bash createrepo . chmod 777 -R cloudera-repos ``` 上述命令分别完成了元数据的构建权限调整工作[^4]。 #### 登录与初始化配置 Cloudera Manager 的默认访问端口为 7180,默认用户名密码均为 admin。首次登录时需确认服务器上的防火墙未阻止此端口号。 登录成功后,用户可以根据需求选择不同类型的许可证版本——Express 版提供免费试用但功能受限;Enterprise Edition 则适用于生产环境且具备完整的特性集。完成基本设置之后,将跳转至服务配置界面,在这里定义集群名称及其他必要参数[^5]。 #### 主机管理与扩展 在 Currently Managed Hosts 页面上可以看到当前已加入集群的所有 Agent 节点列表。当计划新增成员设备时,则切换到 New Hosts Tab 执行相应操作。值得注意的是,这过程同样依赖有效的软件包管理系统支持。 最后按照向导指引逐步推进直至整个 CDH 平台顺利上线运行为止。 尽管搭建这样个框架相对简单快捷,但从长远来看更重要也更具挑战性的部分是如何挖掘出隐藏在其背后的数据洞察力从而创造真正的商业价值。 ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值