楼主: jieforest

分布式数据库Hypertable 0.9.7.6发布

[复制链接]
论坛徽章:
277
马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11版主9段
日期:2012-11-25 02:21:03ITPUB年度最佳版主
日期:2014-02-19 10:05:27现任管理团队成员
日期:2011-05-07 01:45:08
41#
 楼主| 发表于 2013-6-8 12:58 | 只看该作者
STEP 4 - INSTALL HYPERTABLE BINARIESTOP

The Hypertable binaries can either be downloaded prepackaged, or you can compile them from source code. To install the prepackaged version, download the Hypertable package (.dmg, .rpm, or .tar.bz2) that you want to install and put it somewhere accessible on the source machine (admin1 in this example). Modify the hypertable_version and default_pkg variables at the top of the Capfile to contain the version of Hypertable you are installing and the absolute path to the package file on the source machine, respectively.  For example, if you're upgrading to version 0.9.7.0 and using the RPM package, set the variables as follows.
  1. set :hypertable_version, "0.9.7.0"
  2. set :default_pkg,        "/tmp/hypertable-0.9.7.0-linux-x86_64.rpm"
复制代码

使用道具 举报

回复
论坛徽章:
277
马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11版主9段
日期:2012-11-25 02:21:03ITPUB年度最佳版主
日期:2014-02-19 10:05:27现任管理团队成员
日期:2011-05-07 01:45:08
42#
 楼主| 发表于 2013-6-8 12:58 | 只看该作者
To distribute and install the binary package on all necessary machines, issue the following command.  This command will cause the package to get rsync'ed to all participating machines and installed with the appropriate package manager (rpm, dpkg, or tar) depending on the package type.
  1. $ cap install_package
复制代码
If you prefer compiling the binaries from source, you can use Capistrano to distribute the binaries with rsync. On admin1 be sure Hypertable is installed in the location specified by the install_dir variable at the top of the Capfile and that the hypertable_version variable at the top of the Capfile matches the version you are installing (/opt/hypertable and 0.9.7.0 in this example). Then distribute the binaries with the following command.
  1. $ cap dist
复制代码

使用道具 举报

回复
论坛徽章:
277
马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11版主9段
日期:2012-11-25 02:21:03ITPUB年度最佳版主
日期:2014-02-19 10:05:27现任管理团队成员
日期:2011-05-07 01:45:08
43#
 楼主| 发表于 2013-6-10 15:35 | 只看该作者
STEP 5 - FHS-IZE INSTALLATION

See Filesystem Hierarchy Standard for an introduction to FHS. If you're running as a user other than root, first create the directories /etc/opt/hypertable and /var/opt/hypertable on all machines in the cluster and change ownership to the user account under which the binaries will be run. For example:
  1. $ sudo cap shell
  2. cap> mkdir /etc/opt/hypertable /var/opt/hypertable
  3. cap> chown chris:staff /etc/opt/hypertable /var/opt/hypertable
复制代码
Then FHS-ize the installation with the following command:
  1. $ cap fhsize
复制代码

使用道具 举报

回复
论坛徽章:
277
马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11版主9段
日期:2012-11-25 02:21:03ITPUB年度最佳版主
日期:2014-02-19 10:05:27现任管理团队成员
日期:2011-05-07 01:45:08
44#
 楼主| 发表于 2013-6-10 15:37 | 只看该作者
STEP 6 - CREATE AND DISTRIBUTE HYPERTABLE.CFG

The next step is to create a hypertable.cfg file that is specific to your deployment.  A basic hypertable.cfg file can be found in the conf/ subdirectory of your hypertable installation which can be copied and modified as needed.  The following table shows the minimum set of required and recommended properties that you need to modify.

Table 1. Recommended and Required Properties

使用道具 举报

回复
论坛徽章:
277
马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11版主9段
日期:2012-11-25 02:21:03ITPUB年度最佳版主
日期:2014-02-19 10:05:27现任管理团队成员
日期:2011-05-07 01:45:08
45#
 楼主| 发表于 2013-6-10 15:37 | 只看该作者
You can leave all other properties at their default values.  Hypertable is designed to adapt to the hardware on which it runs and to dynamically adapt to changes in workload, so no special configuration is needed beyond the basic properties listed in the above table.  For example, the following shows the changes we made to the hypertable.cfg file for our test cluster.
  1. HdfsBroker.fs.default.name=hdfs://master:9000

  2. Hyperspace.Replica.Host=hyperspace001
  3. Hyperspace.Replica.Host=hyperspace002
  4. Hyperspace.Replica.Host=hyperspace003

  5. Hypertable.RangeServer.Monitoring.DataDirectories="/data/1,/data/2,/data/3,/data/4"
复制代码

使用道具 举报

回复
论坛徽章:
277
马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11版主9段
日期:2012-11-25 02:21:03ITPUB年度最佳版主
日期:2014-02-19 10:05:27现任管理团队成员
日期:2011-05-07 01:45:08
46#
 楼主| 发表于 2013-6-10 15:38 | 只看该作者
See hypertable-example.cfg

Once you've created the hypertable.cfg file for your cluster, put it on the source machine (admin1) and set the absolute pathname referenced in the default_config Capfile variable to point to this file (e.g. /etc/opt/hypertable/hypertable.cfg). Then distribute the custom config files with the following command.

$ cap push_config

If you ever need to make changes to the config file, make the changes, re-run cap push_config, and then restart Hypertable (see sections 9 and 11, below).

使用道具 举报

回复
论坛徽章:
277
马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11版主9段
日期:2012-11-25 02:21:03ITPUB年度最佳版主
日期:2014-02-19 10:05:27现任管理团队成员
日期:2011-05-07 01:45:08
47#
 楼主| 发表于 2013-6-10 15:38 | 只看该作者
STEP 7 - SET "CURRENT" LINKTOP

To make the latest version of Hypertable referenceable from a well-known location, create a "current" link to point to the latest installation.  This can be accomplished with the following command.

$ cap set_current

使用道具 举报

回复
论坛徽章:
277
马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11版主9段
日期:2012-11-25 02:21:03ITPUB年度最佳版主
日期:2014-02-19 10:05:27现任管理团队成员
日期:2011-05-07 01:45:08
48#
 楼主| 发表于 2013-6-11 09:14 | 只看该作者
STEP 8 - INSTALL NOTIFICATION SCRIPTTOP

The Hypertable Master will invoke a notification script (conf/notification-hook.sh) to inform the Hypertable administrator of certain events such as machine failure or any problems that may have been encountered during machine failure recovery.  The script accepts two arguments, a subject string and a message body string.  The prefix of the subject line string can be examined to determine the type of notification, "NOTICE" indicating a notification of abnormal condition, and "ERROR" indicating a hard error that requires intervention.  The following is an example notification script (/opt/hypertable/current/conf/notification-hook.sh) that can be used to email notificaiton to a list of administrators:
  1. #!/usr/bin/env bash

  2. recipients="root"
  3. subject=$1
  4. message=$2
  5. echo -e $message | mail -s "$subject" ${recipients}
复制代码

使用道具 举报

回复
论坛徽章:
277
马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11版主9段
日期:2012-11-25 02:21:03ITPUB年度最佳版主
日期:2014-02-19 10:05:27现任管理团队成员
日期:2011-05-07 01:45:08
49#
 楼主| 发表于 2013-6-11 09:14 | 只看该作者
Modify the recipients variable to contain the the list of recipients to whom notificaiton messages are to be sent.  Verify that the script works properly by testing it manually:
  1. /opt/hypertable/current/conf/notification-hook.sh "Test Message" "This is a test."
复制代码
Once the script is working properly, you can distribute it to all appropriate machines with:
  1. cap dist
复制代码

使用道具 举报

回复
论坛徽章:
277
马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11版主9段
日期:2012-11-25 02:21:03ITPUB年度最佳版主
日期:2014-02-19 10:05:27现任管理团队成员
日期:2011-05-07 01:45:08
50#
 楼主| 发表于 2013-6-11 09:15 | 只看该作者
STEP 9 - SYNCHRONIZE CLOCKSTOP

The system cannot operate correctly unless the clocks on all machines are synchronized. Use the Network Time Protocol (ntp) to ensure that the clocks get synchronized and remain in sync. Run the 'date' command on all machines to make sure they are in sync. The following Capistrano shell session show the output of a cluster with properly synchronized clocks.
  1. cap> date
  2. [establishing connection(s) to master, hyperspace001, hyperspace002, hyperspace003, slave001, slave002, slave003, slave004, slave005, slave006, slave007, slave008]
  3. ** [out :: master] Sat Jan  3 18:05:33 PST 2009
  4. ** [out :: hyperspace001] Sat Jan  3 18:05:33 PST 2009
  5. ** [out :: hyperspace002] Sat Jan  3 18:05:33 PST 2009
  6. ** [out :: hyperspace003] Sat Jan  3 18:05:33 PST 2009
  7. ** [out :: slave001] Sat Jan  3 18:05:33 PST 2009
  8. ** [out :: slave002] Sat Jan  3 18:05:33 PST 2009
  9. ** [out :: slave003] Sat Jan  3 18:05:33 PST 2009
  10. ** [out :: slave004] Sat Jan  3 18:05:33 PST 2009
  11. ** [out :: slave005] Sat Jan  3 18:05:33 PST 2009
  12. ** [out :: slave007] Sat Jan  3 18:05:33 PST 2009
  13. ** [out :: slave008] Sat Jan  3 18:05:33 PST 2009
复制代码

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表