楼主: jieforest

Hypertable的MapR详解

[复制链接]
论坛徽章:
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
11#
 楼主| 发表于 2013-6-18 22:16 | 只看该作者
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.5.5 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
12#
 楼主| 发表于 2013-6-19 20:22 | 只看该作者
STEP 5 - FHS-IZE INSTALLATIONTOP

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
13#
 楼主| 发表于 2013-6-19 20:22 | 只看该作者
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
  1. Property        Description
  2. Hyperspace.Replica.Host         Hostname of Hyperspace replica
  3. Hypertable.RangeServer.Monitoring.DataDirectories         This property is optional, but recommended.  It contains a list of directories that are the mount points of the HDFS data node storage volumes.  By setting this property appropriately, the Hypertable monitoring system will be able to provide accurate disk usage information.
复制代码

使用道具 举报

回复
论坛徽章:
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
14#
 楼主| 发表于 2013-6-19 20:23 | 只看该作者
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. Hyperspace.Replica.Host=hyperspace001
  2. Hyperspace.Replica.Host=hyperspace002
  3. Hyperspace.Replica.Host=hyperspace003

  4. 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
15#
 楼主| 发表于 2013-6-19 20:23 | 只看该作者
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. /root/hypertable.cfg). Then distribute the custom config files with the following command.
  1. $ 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
16#
 楼主| 发表于 2013-6-19 20:23 | 只看该作者
STEP 7 - SET "CURRENT" LINK

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.
  1. $ 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
17#
 楼主| 发表于 2013-6-20 23:24 | 只看该作者
TEP 8 - INSTALL NOTIFICATION SCRIPT

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
18#
 楼主| 发表于 2013-6-20 23:24 | 只看该作者
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:

/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:

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
19#
 楼主| 发表于 2013-6-20 23:25 | 只看该作者
STEP 9 - SYNCHRONIZE CLOCKS

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
复制代码

使用道具 举报

回复
论坛徽章:
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
20#
 楼主| 发表于 2013-6-20 23:25 | 只看该作者
STEP 10 - START HYPERTABLE

The following commands should be run from the directory containing the Capfile. To start all of the Hypertable servers:

$ cap start

If you want to launch the service using a different config file than the default (e.g. /home/chris/alternate.cfg):

$ cap -S config=/home/chris/alternate.cfg start

You'll need to specify the same config file when running Hypertable commands such as the command shell, for example:

$ /opt/hypertable/current/bin/ht shell --config=/home/chris/alternate.cfg

使用道具 举报

回复

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

本版积分规则 发表回复

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