ZooKeeper Installation
来源:互联网 发布:rfid读卡器软件 编辑:程序博客网 时间:2024/05/29 07:58
来源:https://ccp.cloudera.com/display/CDHDOC/ZooKeeper+Installation#ZooKeeperInstallation-InstallingtheZooKeeperServerPackage
Contents
- Upgrading ZooKeeper to the Latest CDH3 Release
- Performing a ZooKeeper Rolling Upgrade
- Installing the ZooKeeper Packages
- Installing the ZooKeeper Base Package
- Installing the ZooKeeper Server Package and Starting ZooKeeper on a Single Server
- Installing ZooKeeper in a Production Environment
- Setting up Supervisory Process for the ZooKeeper Server
- Maintaining a ZooKeeper Server
- Viewing the ZooKeeper Documentation
Apache ZooKeeper is a highly reliable and available service that provides coordination between distributed processes.
Upgrading ZooKeeper to the Latest CDH3 Release
Cloudera recommends that you use a rolling upgrade process to upgrade ZooKeeper: that is, upgrade one server in the ZooKeeper ensemble at a time. This means bringing down each server in turn, upgrading the software, then restarting the server. The server will automatically rejoin the quorum, update its internal state with the current ZooKeeper leader, and begin serving client sessions.
This method allows you to upgrade ZooKeeper without any interruption in the service, and also lets you monitor the ensemble as the upgrade progresses, and roll back if necessary if you run into problems.
The instructions that follow assume that you are upgrading ZooKeeper as part of an upgrade to the latest CDH3 release, and have already performed the steps under Upgrading CDH3.
Performing a ZooKeeper Rolling Upgrade
Follow these steps to perform a rolling upgrade.
Step 1: Stop the ZooKeeper Server on the First Node
To stop the ZooKeeper server:
or
depending on the platform and release.
Step 2: Install the ZooKeeper Base Package on the First Node
See Installing the ZooKeeper Base Package.
Step 3: Install the ZooKeeper Server Package on the First Node
See Installing the ZooKeeper Server Package.
Step 4: Re-enable the Server
Because of a packaging problem in earlier releases, you need to re-enable the server manually after upgrading ZooKeeper from CDH3 Update 1 or earlier to the latest CDH3 release:
Step 5: Restart the Server
See Installing the ZooKeeper Server Package for instructions on starting the server.
The upgrade is now complete on this server and you can proceed to the next.
Step 6: Upgrade the Remaining Nodes
Repeat Steps 1-5 above on each of the remaining nodes.
The ZooKeeper upgrade is now complete.
Installing the ZooKeeper Packages
There are two ZooKeeper server packages:
- The hadoop-zookeeper base package provides the basic libraries and scripts that are necessary to run ZooKeeper servers and clients. The documentation is also included in this package.
- The hadoop-zookeeper-server package contains the init.d scripts necessary to run ZooKeeper as a daemon process. Because hadoop-zookeeper-server depends on hadoop-zookeeper, installing the server package automatically installs the base package.
Installing the ZooKeeper Base Package
To install ZooKeeper on Ubuntu and other Debian systems:
To install ZooKeeper On Red Hat-compatible systems:
To install ZooKeeper on SUSE systems:
Installing the ZooKeeper Server Package and Starting ZooKeeper on a Single Server
The instructions provided here deploy a single ZooKeeper server in "standalone" mode. This is appropriate for evaluation, testing and development purposes, but may not provide sufficient reliability for a production application. SeeInstalling ZooKeeper in a Production Environment for more information.
To install a ZooKeeper server on Ubuntu and other Debian systems:
To install ZooKeeper On Red Hat-compatible systems:
To install ZooKeeper on SUSE systems:
To start ZooKeeper
Use the following command to start ZooKeeper:
Installing ZooKeeper in a Production Environment
For use in a production environment, you should deploy ZooKeeper as an ensemble with an odd number of nodes. As long as a majority of the servers in the ensemble are available, the ZooKeeper service will be available. The minimum recommended ensemble size is three ZooKeeper servers, and it is recommended that each server run on a separate machine.
ZooKeeper deployment on multiple servers requires a bit of additional configuration. The configuration file (zoo.cfg) on each server must include a list of all servers in the ensemble, and each server must also have a myid file in its data directory (by default /var/zookeeper) that identifies it as one of the servers in the ensemble.
For instructions describing how to set up a multi-server deployment, see Installing a Multi-Server Setup.
Setting up Supervisory Process for the ZooKeeper Server
The ZooKeeper server is designed to be both highly reliable and highly available. This means that:
- If a ZooKeeper server encounters an error it cannot recover from, it will "fail fast" (the process will exit immediately)
- When the server shuts down, the ensemble remains active, and continues serving requests
- Once restarted, the server rejoins the ensemble without any further manual intervention.
Cloudera recommends that you fully automate this process by configuring a supervisory service to manage each server, and restart the ZooKeeper server process automatically if it fails. See the ZooKeeper Administrator's Guide for more information.
Maintaining a ZooKeeper Server
The ZooKeeper server continually saves znode snapshot files and, optionally, transactional logs in a Data Directory to enable you to recover data. It's a good idea to back up the ZooKeeper Data Directory periodically. Although ZooKeeper is highly reliable because a persistent copy is replicated on each server, recovering from backups may be necessary if a catastrophic failure or user error occurs.
The ZooKeeper server does not remove the snapshots and log files, so they will accumulate over time. You will need to cleanup this directory occasionally, based on your backup schedules and processes. To automate the cleanup, azkCleanup.sh script is provided in the bin directory of the hadoop-zookeeper base package. Modify this script as necessary for your situation. In general, you want to run this as a cron task based on your backup schedule.
The data directory is specified by the dataDir parameter in the ZooKeeper configuration file, and the data log directory is specified by the dataLogDir parameter.
For more information, see Ongoing Data Directory Cleanup.
Viewing the ZooKeeper Documentation
For additional ZooKeeper documentation, see http://archive.cloudera.com/cdh/3/zookeeper/.
- ZooKeeper Installation
- Apache Zookeeper installation
- zookeeper
- zookeeper
- zookeeper
- zookeeper
- zookeeper
- zookeeper
- zookeeper
- zookeeper
- ZooKeeper
- zookeeper
- zookeeper
- zookeeper
- zookeeper
- zookeeper
- ZooKeeper
- zookeeper
- 汇编指令集
- VS2010下如何调试Framework源代码(即FCL)
- 学习笔记(二十九)
- 中科院上海分院 ftp
- 嵌入式linux和uboot中关于读写寄存器的函数(__raw_writel, writel等)
- ZooKeeper Installation
- GLSL 高级教程 – Fragment Shader
- edittext特效之圆角
- Linux中的ps命令(进程管理)
- DestroyWindow 窗口创建和销毁要在同一个线程里
- 用户权限系统的设计
- 51CTO下载-教你如何侵入别人的电脑
- ubuntu下安装飞鸽传书
- sencha 2.0 的tabpanel中使用formpanel,carousel 等的用法