<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ZhongZiChang&#039;s Dao &#187; HBase</title>
	<atom:link href="http://www.zhongzichang.com/archives/category/hbase/feed" rel="self" type="application/rss+xml" />
	<link>http://www.zhongzichang.com</link>
	<description></description>
	<lastBuildDate>Fri, 16 Sep 2011 17:36:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>在 HBase 0.20.x 编程中，执行 new HBaseConfiguration() 是抛出XML分析异常</title>
		<link>http://www.zhongzichang.com/archives/144</link>
		<comments>http://www.zhongzichang.com/archives/144#comments</comments>
		<pubDate>Mon, 17 May 2010 08:00:56 +0000</pubDate>
		<dc:creator>zhongzichang</dc:creator>
				<category><![CDATA[HBase]]></category>

		<guid isPermaLink="false">http://www.zhongzichang.com/?p=144</guid>
		<description><![CDATA[原因是有多个XML分析器，需要通过JVM指定一个属性来解决问题。 -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.\ internal.jaxp.DocumentBuilderFactoryImpl 使 用上面指定的分析器就不再抛出异常]]></description>
			<content:encoded><![CDATA[<p>原因是有多个XML分析器，需要通过JVM指定一个属性来解决问题。</p>
<pre>
<code>-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.\
internal.jaxp.DocumentBuilderFactoryImpl</code>
</pre>
<p>使 用上面指定的分析器就不再抛出异常</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zhongzichang.com/archives/144/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>安装 HBase 0.20.x</title>
		<link>http://www.zhongzichang.com/archives/143</link>
		<comments>http://www.zhongzichang.com/archives/143#comments</comments>
		<pubDate>Mon, 17 May 2010 07:57:15 +0000</pubDate>
		<dc:creator>zhongzichang</dc:creator>
				<category><![CDATA[HBase]]></category>

		<guid isPermaLink="false">http://www.zhongzichang.com/?p=143</guid>
		<description><![CDATA[我把HBase官方的文档译了一下，没完成，方便对比着看。 Requirements Java 1.6.x, preferably from Sun. Use the latest version available. Java 1.6.x ,sun ，最好是最新版 This version of HBase will only run on Hadoop 0.20.x. 指定的Hadoop版 本 ssh must be installed and sshd must be running to use Hadoop&#8217;s &#8230; <a href="http://www.zhongzichang.com/archives/143">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>我把HBase官方的文档译了一下，没完成，方便对比着看。</p>
<h2><span style="font-family: Simsun;">Requirements</span></h2>
<ul>
<li><span style="font-family: Simsun;">Java 1.6.x, preferably from </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fwww.java.com%2Fdownload%2F" target="_blank">Sun</a><span style="font-family: Simsun;">.  Use the latest version available.</span></li>
<li><span style="font-family: Simsun;">Java 1.6.x ,sun ，最好是最新版</span></li>
<li><span style="font-family: Simsun;">This version of HBase will only run on </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhadoop.apache.org%2Fcommon%2Freleases.html" target="_blank">Hadoop 0.20.x</a><span style="font-family: Simsun;">.</span></li>
<li><span style="font-family: Simsun;">指定的Hadoop版 本</span></li>
<li><span style="font-style: italic; font-family: Simsun;">ssh</span><span style="font-family: Simsun;"> must be installed and </span><span style="font-style: italic; font-family: Simsun;">sshd</span><span style="font-family: Simsun;"> must be running to use Hadoop&#8217;s scripts to  manage remote Hadoop daemons. You must be able to ssh to all nodes,  including your local node, using passwordless login (Google &#8220;ssh  passwordless login&#8221;).</span></li>
<li><span style="font-family: Simsun;">ssh  和sshd 必须有，机器之间无须输入密码登录</span></li>
<li><span style="font-family: Simsun;">HBase depends on </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhadoop.apache.org%2Fzookeeper%2F" target="_blank">ZooKeeper</a><span style="font-family: Simsun;"> as of release 0.20.0. HBase keeps the location of its root  table, who the current master is, and what regions are currently  participating in the cluster in ZooKeeper. Clients and Servers now must  know their</span><span style="font-style: italic; font-family: Simsun;">ZooKeeper  Quorum locations</span><span style="font-family: Simsun;"> before they  can do anything else (Usually they pick up this information from  configuration supplied on their CLASSPATH). By default, HBase will  manage a single ZooKeeper instance for you. In </span><span style="font-style: italic; font-family: Simsun;">standalone</span><span style="font-family: Simsun;"> and</span><span style="font-style: italic; font-family: Simsun;">pseudo-distributed</span><span style="font-family: Simsun;"> modes this is usually enough, but for </span><span style="font-style: italic; font-family: Simsun;">fully-distributed</span><span style="font-family: Simsun;"> mode you should configure a ZooKeeper  quorum (more info below).</span></li>
<li><span style="font-family: Simsun;">需要指定版本的 ZooKeeper ，客户和服务在工作之前，需要在他们的CLASSPATH提供的配置中获得 他们的  ZookKeeper Quorum locations 信息。 缺省情况下，HBase管理一个Zookeeper实例。在standalone和  pseudo-distibuted 模式下是足够的，但是在 fully-distributed 模式，你需要配置一个 ZooKeeper  quorum。（下面有更详细的信息）</span></li>
<li><span style="font-family: Simsun;">Hosts  must be able to resolve the fully-qualified domain name of the master.</span></li>
<li><span style="font-family: Simsun;">所有主机必须能解释 master 的 fully-qualified domain  name 。</span></li>
<li><span style="font-family: Simsun;">HBase currently  is a file handle hog. The usual default of 1024 on *nix systems is  insufficient if you are loading any significant amount of data into  regionservers. See the </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fwiki.apache.org%2Fhadoop%2FHbase%2FFAQ%23A6" target="_blank">FAQ: Why do I see &#8220;</a><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fwiki.apache.org%2Fhadoop%2FHbase%2FFAQ%23A6" target="_blank">java.io</a><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fwiki.apache.org%2Fhadoop%2FHbase%2FFAQ%23A6" target="_blank">.IOException&#8230;(Too many open files)&#8221; in  my logs?</a><span style="font-family: Simsun;"> for how to up the limit.  Also, as of 0.18.x Hadoop DataNodes have an upper-bound on the number  of threads they will support (dfs.datanode.max.xcievers). The default is  256 threads. Up this limit on your hadoop cluster.</span></li>
<li><span style="font-family: Simsun;">需要调整系统相关的文件句柄上限和线程上限。/etc/security /limits.conf 和 dfs.datanode.max.xcievers。</span></li>
<li><span style="font-family: Simsun;">T</span><span style="font-family: Simsun;">he  clocks on cluster members should be in basic alignments. Some skew is  tolerable but wild skew could generate odd behaviors. Run </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FNetwork_Time_Protocol" target="_blank">NTP</a><span style="font-family: Simsun;"> on your cluster, or an equivalent.</span></li>
<li><span style="font-family: Simsun;">集群内所有节点时间同步，使用NTP。</span></li>
<li><span style="font-family: Simsun;">HBase servers put up 10 listeners for  incoming connections by default. Up this number if you have a dataset of  any substance by setting hbase.regionserver.handler.count in your  hbase-site.xml.</span></li>
<li><span style="font-family: Simsun;">缺省10个  listerners 处理进入到连接，可以通过配置 hbase-site.xml 的  hbase.regionserver.handler.count 来修改。</span></li>
<li><span style="font-family: Simsun;">This is the current list of patches we  recommend you apply to your running Hadoop cluster:</span></li>
<li><span style="font-family: Simsun;">下面是两个推荐使用的Hadoop集群的补丁：</span></li>
<li><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=" target="_blank">HADOOP-4681/HDFS-127 </a><a style="font-family: Simsun; font-style: italic;" href="http://www.google.com/url?sa=D&amp;q=" target="_blank">&#8220;DFSClient block read failures cause open  DFSInputStream to become unusable&#8221;</a><span style="font-family: Simsun;">.  This patch will help with the ever-popular, &#8220;No live nodes contain  current block&#8221;. The hadoop version bundled with hbase has this patch  applied. Its an HDFS client fix so this should do for usual usage but if  your cluster is missing the patch, and in particular if calling hbase  from a mapreduce job, you may run into this issue. If running with  hadoop 0.20.2, it has this patch in place already.</span></li>
<li><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FHDFS-630" target="_blank">HDFS-630: </a><a style="font-family: Simsun; font-style: italic;" href="http://www.google.com/url?sa=D&amp;q=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FHDFS-630" target="_blank">&#8220;In  DFSOutputStream.nextBlockOutputStream(), the client can exclude specific  datanodes when locating the next block&#8221;</a><span style="font-family: Simsun;">. Dead DataNodes take ten minutes to timeout at NameNode. In  the meantime the NameNode can still send DFSClients to the dead DataNode  as host for a replicated block. DFSClient can get stuck on trying to  get block from a dead node. This patch allows DFSClients pass NameNode  lists of known dead DataNodes.</span></li>
</ul>
<p><span style="font-family: Simsun;">Windows </span></p>
<p><span style="font-family: Simsun;">需要安装Cygwin</span></p>
<h2><span style="font-family: Simsun;">Getting Started</span></h2>
<p><span style="font-family: Simsun;">What follows presumes you have obtained a  copy of HBase, see </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhadoop.apache.org%2Fhbase%2Freleases.html" target="_blank">Releases</a><span style="font-family: Simsun;">, and are installing for the first time. If upgrading your  HBase instance, see </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhadoop.apache.org%2Fhbase%2Fdocs%2Fcurrent%2Fapi%2Foverview-summary.html%23upgrading" target="_blank">Upgrading</a></p>
<p><span style="font-family: Simsun;">假定已经获得Hbase的拷贝， 升级请看这里 </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhadoop.apache.org%2Fhbase%2Fdocs%2Fcurrent%2Fapi%2Foverview-summary.html%23upgrading" target="_blank">Upgrading</a></p>
<p><span style="font-family: Simsun;">Three modes are described: </span><span style="font-style: italic; font-family: Simsun;">standalone</span><span style="font-family: Simsun;">, </span><span style="font-style: italic; font-family: Simsun;">pseudo-distributed</span><span style="font-family: Simsun;"> (where all servers are run on a single host), and </span><span style="font-style: italic; font-family: Simsun;">fully-distributed</span><span style="font-family: Simsun;">. If new to HBase start by following the  standalone instructions.</span></p>
<p><span style="font-family: Simsun;">三 种模式：standalone , preudo-distributed, fully-distributed.</span></p>
<p><span style="font-family: Simsun;">Begin by reading </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhadoop.apache.org%2Fhbase%2Fdocs%2Fcurrent%2Fapi%2Foverview-summary.html%23requirements" target="_blank">Requirements</a><span style="font-family: Simsun;">.</span></p>
<p><span style="font-family: Simsun;">Whatever your  mode, define ${HBASE_HOME} to be the location of the root of your HBase  installation, e.g. /user/local/hbase. Edit  ${HBASE_HOME}/conf/hbase-env.sh. In this file you can set the heapsize  for HBase, etc. At a minimum, set JAVA_HOME to point at the root of your  Java installation.</span></p>
<p><span style="font-family: Simsun;">无论使用 什么模式，都要定义 ${HBASE_HOME}到安装目录，编辑 ${HBASE_HOME}/conf/hbase-env.sh ，设置  HBase的 heapsize 等等，至少要设置 JAVA_HOME.</span></p>
<h3><span style="font-family: Simsun;">Standalone mode</span></h3>
<p><span style="font-family: Simsun;">If you are running a standalone operation,  there should be nothing further to configure; proceed to </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhadoop.apache.org%2Fhbase%2Fdocs%2Fcurrent%2Fapi%2Foverview-summary.html%23runandconfirm" target="_blank">Running and Confirming Your Installation</a><span style="font-family: Simsun;">. If you are running a distributed  operation, continue reading.</span></p>
<p><span style="font-family: Simsun;">standalone模式不需要配置，直接运行就可以。</span></p>
<h3><span style="font-family: Simsun;">Distributed Operation: Pseudo- and  Fully-distributed modes</span></h3>
<p><span style="font-family: Simsun;">Distributed  modes require an instance of the </span><span style="font-style: italic; font-family: Simsun;">Hadoop Distributed File System</span><span style="font-family: Simsun;"> (DFS). See the Hadoop </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhadoop.apache.org%2Fcommon%2Fdocs%2Fr0.20.1%2Fapi%2Foverview-summary.html%23overview_description" target="_blank">requirements and instructions</a><span style="font-family: Simsun;"> for how to set up a DFS.</span></p>
<p><span style="font-family: Simsun;">分布式模式下需要一个HDFS实例。看这里Hadoop </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhadoop.apache.org%2Fcommon%2Fdocs%2Fr0.20.1%2Fapi%2Foverview-summary.html%23overview_description" target="_blank">requirements and instructions</a><span style="font-family: Simsun;">如何安装一个DFS</span></p>
<h4><span style="font-family: Simsun;">Pseudo-distributed mode</span></h4>
<p><span style="font-family: Simsun;">A pseudo-distributed mode is simply a  distributed mode run on a single host. Once you have confirmed your DFS  setup, configuring HBase for use on one host requires modification of  ${HBASE_HOME}/conf/hbase-site.xml, which needs to be pointed at the  running Hadoop DFS instance. Use hbase-site.xml to override the  properties defined in  ${HBASE_HOME}/conf/hbase-default.xml(hbase-default.xml itself should  never be modified). At a minimum the hbase.rootdir property should be  redefined in hbase-site.xml to point HBase at the Hadoop filesystem to  use. For example, adding the property below to your hbase-site.xml says  that HBase should use the /hbase directory in the HDFS whose namenode is  at port 9000 on your local machine:</span></p>
<p><span style="font-family: Simsun;">pseudo-distributed模式，仅仅在一台机器上运行一个 distributed模式。DFS setup 后，配置 HBase 在一台机器上运行需要修改  ${HBASE_HOOME}/conf/hbase-site.xml 文件， 至少要 重新定义 hbase.rootdir 属性，指向要使用的  HDFS 。例如增加下面的属性到 hbase-site.xml , 说明 HBase 应该使用HDFS的 /hbase  目录，HDFS的名字节点在 localhost ，端口号为 9000</span></p>
<p><span style="font-family: Simsun;">&lt;configuration&gt;</span></p>
<p><span style="font-family: Simsun;"> &#8230;</span></p>
<p><span style="font-family: Simsun;"> &lt;property&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;name&gt;hbase.rootdir&lt;/name&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;value&gt;hdfs://localhost:9000/hbase&lt;/value&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;description&gt;The directory  shared by region servers.</span></p>
<p><span style="font-family: Simsun;"> &lt;/description&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;/property&gt;</span></p>
<p><span style="font-family: Simsun;"> &#8230;</span></p>
<p><span style="font-family: Simsun;">&lt;/configuration&gt;</span></p>
<p><span style="font-family: Simsun;">Note: Let HBase create the directory. If  you don&#8217;t, you&#8217;ll get warning saying HBase needs a migration run because  the directory is missing files expected by HBase (it&#8217;ll create them if  you let it).</span></p>
<p><span style="font-family: Simsun;">Also Note:  Above we bind to localhost. This means that a remote client cannot  connect. Amend accordingly, if you want to connect from a remote  location.</span></p>
<p><span style="font-family: Simsun;">注意：要让 HBase自己创建这个目录。否则你会得到一个警告，HBase needs a migration run because the  directory is missing files expected by HBase (it&#8217;ll create them if you  let it).</span></p>
<p><span style="font-family: Simsun;">同时要注意：上面绑定的是  localhost . 这表示 远程的客户无法连接。如果需要远程了解需要做相应的修改。</span></p>
<h4><span style="font-family: Simsun;">Fully-Distributed Operation</span></h4>
<p><span style="font-family: Simsun;">For running a fully-distributed operation  on more than one host, the following configurations must be made </span><span style="font-style: italic; font-family: Simsun;">in addition</span><span style="font-family: Simsun;"> to those described in the </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhadoop.apache.org%2Fhbase%2Fdocs%2Fcurrent%2Fapi%2Foverview-summary.html%23pseudo-distrib" target="_blank">pseudo-distributed operation</a><span style="font-family: Simsun;"> section above.</span></p>
<p><span style="font-family: Simsun;">fully-distributed  模式比较复杂一点，下面的配置内容需要额外增加到上面描述的 pseudo-distributed 操作段落上面。</span></p>
<p><span style="font-family: Simsun;">In hbase-site.xml, set  hbase.cluster.distributed to true.</span></p>
<p><span style="font-family: Simsun;">在 hbase-site.xml ，设置  hbase.cluster.distributed 为true.</span></p>
<p><span style="font-family: Simsun;">&lt;configuration&gt;</span></p>
<p><span style="font-family: Simsun;"> &#8230;</span></p>
<p><span style="font-family: Simsun;"> &lt;property&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;name&gt;hbase.cluster.distributed&lt;/name&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;value&gt;true&lt;/value&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;description&gt;The mode the  cluster will be in. Possible values are</span></p>
<p><span style="font-family: Simsun;"> false: standalone and  pseudo-distributed setups with managed Zookeeper</span></p>
<p><span style="font-family: Simsun;"> true: fully-distributed with  unmanaged Zookeeper Quorum (see hbase-env.sh)</span></p>
<p><span style="font-family: Simsun;"> &lt;/description&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;/property&gt;</span></p>
<p><span style="font-family: Simsun;"> &#8230;</span></p>
<p><span style="font-family: Simsun;">&lt;/configuration&gt;</span></p>
<p><span style="font-family: Simsun;">In fully-distributed mode, you probably  want to change your hbase.rootdir from localhost to the name of the node  running the HDFS NameNode. In addition to hbase-site.xml changes, a  fully-distributed mode requires that you  modify${HBASE_HOME}/conf/regionservers. The regionserver file lists all  hosts running HRegionServers, one host per line (This file in HBase is  like the Hadoop slaves file at ${HADOOP_HOME}/conf/slaves).</span></p>
<p><span style="font-family: Simsun;">hbase.rootdir 改为 HDFS 的名字节点。修改  conf/regionservers 文件。一行一个HRegionServer 的主机。就如 Hadoop 的 slaves 文件一样。</span></p>
<p><span style="font-family: Simsun;">A distributed HBase depends on a running  ZooKeeper cluster. All participating nodes and clients need to be able  to get to the running ZooKeeper cluster. HBase by default manages a  ZooKeeper cluster for you, or you can manage it on your own and point  HBase to it. To toggle HBase management of ZooKeeper, use the  HBASE_MANAGES_ZK variable in ${HBASE_HOME}/conf/hbase-env.sh. This  variable, which defaults to true, tells HBase whether to start/stop the  ZooKeeper quorum servers alongside the rest of the servers.</span></p>
<p><span style="font-family: Simsun;">需要 Zookeeper 集群。 所有节点和客户都需要能够到达所有的  Zookeeper集群。 HBase缺省管理一个Zookeeper，或者你自己管理，然后让HBase指向它。让 HBase 管理的，修改  conf/hbase-env.sh 文件，让其中的 HBASE_MANAGERS_ZK 为 true ， 告诉 HBase 是否随  ZooKeeper quorum servers 的启动/关闭而进行启动/关闭。</span></p>
<p><span style="font-family: Simsun;">When HBase manages the ZooKeeper cluster,  you can specify ZooKeeper configuration using its canonical zoo.cfg file  (see below), or just specify ZookKeeper options directly in the  ${HBASE_HOME}/conf/hbase-site.xml (If new to ZooKeeper, go the path of  specifying your configuration in HBase&#8217;s hbase-site.xml). Every  ZooKeeper configuration option has a corresponding property in the HBase  hbase-site.xml XML configuration file named  hbase.zookeeper.property.OPTION. For example, the clientPortsetting in  ZooKeeper can be changed by setting the  hbase.zookeeper.property.clientPort property. For the full list of  available properties, see ZooKeeper&#8217;s zoo.cfg. For the default values  used by </span><span style="font-family: Simsun;">HBase</span><span style="font-family: Simsun;">, see ${</span><span style="font-family: Simsun;">HBASE_HOME</span><span style="font-family: Simsun;">}/conf/hbase-default.xml.</span></p>
<p><span style="font-family: Simsun;">当 HBase 管理 ZooKeeper 集群， 你可以用规定的 zoo.cfg  文件来描述 Zookeeper ， 或者直接在 hbase-site.xml 中描述 Zookeeper 的选项。如果是新手，直接在  hbase-site.xml 中配置比较好。每一个ZooKeeper 配置选项 在 HBase 的 hbase-site.xml 文件中都有  对应的属性，名字为 hbase.zookeeper.property.OPTION，其中 OPTION 是变化的参数，如  hbase.zookeeper.property.clientPort 属性。从 ZooKeeper 的 zoo.cfg 可以获得所有的属性。从  hbase-defalut.xml 可以获得缺省的属性。</span></p>
<p><span style="font-family: Simsun;">At minimum, you should set the list of  servers that you want ZooKeeper to run on using the  hbase.zookeeper.quorum property. This property defaults to localhost  which is not suitable for a fully distributed HBase (it binds to the  local machine only and remote clients will not be able to connect). It  is recommended to run a ZooKeeper quorum of 3, 5 or 7 machines, and give  each ZooKeeper server around 1GB of RAM, and if possible, its own  dedicated disk. For very heavily loaded clusters, run ZooKeeper servers  on separate machines from the Region Servers (DataNodes and </span><span style="font-family: Simsun;">TaskTrackers</span><span style="font-family: Simsun;">).</span></p>
<p><span style="font-family: Simsun;">至少，使用 hbase.zookeeper.quorum 属性设置 Zookeeper 运行的服务器。 缺省  为localhost，这和 fully distributed 模式不合，仅绑定本地机器，远程机器无法连接。建议运行 3,5或者7台机器的  Zookeeper quorum ， 给每个ZooKeeper服务器1G的内存, 如果可以的话，拥有专属的磁盘  。对于负载非常重的集群，在其他的机器上运行ZooKeeper服务，不要和 Region Servers（DataNodes 和  TaskTrackers） 放在一起。</span></p>
<p><span style="font-family: Simsun;">To point HBase at an existing ZooKeeper cluster, add a suitably  configured zoo.cfg to the CLASSPATH. HBase will see this file and use  it to figure out where ZooKeeper is. Additionally set HBASE_MANAGES_ZK  in ${HBASE_HOME}/conf/hbase-env.sh to false so that HBase doesn&#8217;t mess  with your ZooKeeper setup:</span></p>
<p><span style="font-family: Simsun;">要把HBase指向已经存在的 Zookeeper 集群，增加一个合适的配置文件 zoo.cfg 到 CLASSPATH .  HBase 将会使用这个文件来找到 ZooKeeper 的位置。 另外设置 hbase-env.sh 的 HBASE_MANAGERS_ZK 为  false ，以免HBase将 Zookeeper的设置搞乱。</span></p>
<p><span style="font-family: Simsun;"> &#8230;</span></p>
<p><span style="font-family: Simsun;"> # Tell HBase whether it should manage  it&#8217;s own instance of Zookeeper or not.</span></p>
<p><span style="font-family: Simsun;"> export HBASE_MANAGES_ZK=false</span></p>
<p><span style="font-family: Simsun;">As an example, to have HBase manage a  ZooKeeper quorum on nodes </span><span style="font-style: italic; font-family: Simsun;">rs{1,2,3,4,5}.example.com</span><span style="font-family: Simsun;">, bound to port 2222 (the default is 2181),  use:</span></p>
<p><span style="font-family: Simsun;">作为一个例子， HBase管理在节点  rs[1,2,3,4,5].example.com 上的 ZooKeeper quorum ，绑定 端口 2222 （缺省是2181）：</span></p>
<p><span style="font-family: Simsun;"> ${HBASE_HOME}/conf/hbase-env.sh:</span></p>
<p><span style="font-family: Simsun;"> &#8230;</span></p>
<p><span style="font-family: Simsun;"> # Tell HBase whether it should manage  it&#8217;s own instance of Zookeeper or not.</span></p>
<p><span style="font-family: Simsun;"> export HBASE_MANAGES_ZK=true</span></p>
<p><span style="font-family: Simsun;"> ${HBASE_HOME}/conf/hbase-site.xml:</span></p>
<p><span style="font-family: Simsun;"> &lt;configuration&gt;</span></p>
<p><span style="font-family: Simsun;"> &#8230;</span></p>
<p><span style="font-family: Simsun;"> &lt;property&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;name&gt;hbase.zookeeper.property.clientPort&lt;/name&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;value&gt;2222&lt;/value&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;description&gt;Property from  ZooKeeper&#8217;s config zoo.cfg.</span></p>
<p><span style="font-family: Simsun;"> The port at which the clients will connect.</span></p>
<p><span style="font-family: Simsun;"> &lt;/description&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;/property&gt;</span></p>
<p><span style="font-family: Simsun;"> &#8230;</span></p>
<p><span style="font-family: Simsun;"> &lt;property&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;name&gt;hbase.zookeeper.quorum&lt;/name&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;value&gt;rs1.example.com,</span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Frs2.example.com" target="_blank">rs2.example.com</a><span style="font-family: Simsun;">,</span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Frs3.example.com" target="_blank">rs3.example.com</a><span style="font-family: Simsun;">,</span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Frs4.example.com" target="_blank">rs4.example.com</a><span style="font-family: Simsun;">,</span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Frs5.example.com" target="_blank">rs5.example.com</a><span style="font-family: Simsun;">&lt;/value&gt;</span></p>
<p><span style="font-family: Simsun;"> &lt;description&gt;Comma separated  list of servers in the ZooKeeper Quorum.</span></p>
<p><span style="font-family: Simsun;"> For example, &#8220;</span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhost1.mydomain.com" target="_blank">host1.mydomain.com</a><span style="font-family: Simsun;">,</span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhost2.mydomain.com" target="_blank">host2.mydomain.com</a><span style="font-family: Simsun;">,</span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhost3.mydomain.com" target="_blank">host3.mydomain.com</a><span style="font-family: Simsun;">&#8220;.</span></p>
<p><span style="font-family: Simsun;"> By default this is set to localhost for local and  pseudo-distributed modes</span></p>
<p><span style="font-family: Simsun;"> of operation. For a fully-distributed setup, this should be set to  a full</span></p>
<p><span style="font-family: Simsun;"> list of  ZooKeeper quorum servers. If HBASE_MANAGES_ZK is set in hbase-env.sh</span></p>
<p><span style="font-family: Simsun;"> this is the list of servers which we  will start/stop ZooKeeper on.</span></p>
<p><span style="font-family: Simsun;"> &lt;/description&gt;</span></p>
<p><span style="font-family: Simsun;"> </span><span style="font-family: Simsun;"> &lt;/property&gt;</span></p>
<p><span style="font-family: Simsun;"> &#8230;</span></p>
<p><span style="font-family: Simsun;"> &lt;/configuration&gt;</span></p>
<p><span style="font-family: Simsun;">When HBase manages ZooKeeper, it will start/stop the ZooKeeper  servers as a part of the regular start/stop scripts. If you would like  to run it yourself, you can do:</span></p>
<p><span style="font-family: Simsun;">当 HBase来管理Zookeeper，它会将启动/关闭Zookeeper  servers作为正常启动/关闭脚本的一部分。如果你想自己来运行，可以：</span></p>
<p><span style="font-family: Simsun;">${HBASE_HOME}/bin/hbase-daemons.sh  {start,stop} zookeeper</span></p>
<p><span style="font-family: Simsun;">Note that you can use HBase in this manner to spin up a  ZooKeeper cluster, unrelated to HBase. Just make sure to set  HBASE_MANAGES_ZK to false if you want it to stay up so that when HBase  shuts down it doesn&#8217;t take ZooKeeper with it.</span></p>
<p><span style="font-family: Simsun;">For more information about setting up a  ZooKeeper cluster on your own, see the ZooKeeper </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhadoop.apache.org%2Fzookeeper%2Fdocs%2Fcurrent%2FzookeeperStarted.html" target="_blank">Getting Started Guide</a><span style="font-family: Simsun;">. HBase currently uses ZooKeeper version  3.2.0, so any cluster setup with a 3.x.x version of ZooKeeper should  work.</span></p>
<p><span style="font-family: Simsun;">要得到更多的 ZooKeeper  集群的配置信息，请看 </span><a style="font-family: Simsun;" href="http://www.google.com/url?sa=D&amp;q=http%3A%2F%2Fhadoop.apache.org%2Fzookeeper%2Fdocs%2Fcurrent%2FzookeeperStarted.html" target="_blank">Getting Started Guide </a><span style="font-family: Simsun;">。 HBase 当前使用 3.2.0 的版本，因此 3.x.x 版本的资料可以参考。</span></p>
<p><span style="font-family: Simsun;">Of note, if you have made </span><span style="font-style: italic; font-family: Simsun;">HDFS client  configuration</span><span style="font-family: Simsun;"> on your Hadoop  cluster, HBase will not see this configuration unless you do one of the  following:</span></p>
<p><span style="font-family: Simsun;">注意，如果你 在 Hadoop集群中进行 HDFS client 的配置，HBase无法看到这些配置，除非你做下面的任何一项工作：</span></p>
<ul>
<li><span style="font-family: Simsun;">Add a pointer to your HADOOP_CONF_DIR to  CLASSPATH in hbase-env.sh.</span></li>
<li><span style="font-family: Simsun;">在 hbase-env.sh 中增加一个路径指向 HADOOP_CONF_DIR</span></li>
<li><span style="font-family: Simsun;">Add a copy of hdfs-site.xml (or  hadoop-site.xml) to ${</span><span style="font-family: Simsun;">HBASE_HOME</span><span style="font-family: Simsun;">}/conf, or</span></li>
<li><span style="font-family: Simsun;">增加一个 hdfs-site.xml 或者 hadoop-site.xml 的拷贝到  ${HBASE_HOME}/conf 目录下，或者</span></li>
<li><span style="font-family: Simsun;">if only a small set of HDFS client configurations, add them to  hbase-site.xml.</span></li>
<li><span style="font-family: Simsun;">如果 HBase的有关配置很少，增加配置内容到 hbase-site.xml 中。</span></li>
</ul>
<p><span style="font-family: Simsun;">An example of such an HDFS client  configuration is dfs.replication. If for example, you want to run with a  replication factor of 5, hbase will create files with the default of 3  unless you do the above to make the configuration available to HBase.</span></p>
<p><span style="font-family: Simsun;">例如，需要调整 dfs 的复制因子。 dfs.replication  ,hbase缺省是 3 ,你想修改的话就在 HBase的配置文件中修改。</span></p>
<h2><span style="font-family: Simsun;">Running and Confirming Your Installation</span></h2>
<p><span style="font-family: Simsun;">If you are running in standalone,  non-distributed mode, HBase by default uses the local filesystem.</span></p>
<p><span style="font-family: Simsun;">非分布式，将使用本地文件系统</span></p>
<p><span style="font-family: Simsun;">If you are running a distributed cluster  you will need to start the Hadoop DFS daemons and ZooKeeper Quorum  before starting HBase and stop the daemons after HBase has shut down.</span></p>
<p><span style="font-family: Simsun;">分布式需要 先启动/后关闭 HDFS daemons 和 ZooKeeper  Quorum 。</span></p>
<p><span style="font-family: Simsun;">Start  and stop the Hadoop DFS daemons by running  ${HADOOP_HOME}/bin/start-dfs.sh. You can ensure it started properly by  testing the put and get of files into the Hadoop filesystem. HBase does  not normally use the mapreduce daemons. These do not need to be started.</span></p>
<p><span style="font-family: Simsun;">启动 HDFS。</span></p>
<p><span style="font-family: Simsun;">关闭 HDFS 之前必须先确保 HBase已经关闭成功。</span></p>
<p><span style="font-family: Simsun;">Start up your ZooKeeper cluster.</span></p>
<p><span style="font-family: Simsun;">启动 ZooKeeper 集群。</span></p>
<p><span style="font-family: Simsun;">Start HBase with the following command:</span></p>
<p><span style="font-family: Simsun;">使用下面的命令：</span></p>
<p><span style="font-family: Simsun;">${HBASE_HOME}/bin/start-hbase.sh</span></p>
<p><span style="font-family: Simsun;">Once HBase has started, enter  ${HBASE_HOME}/bin/hbase shell to obtain a shell against HBase from which  you can execute commands. Type &#8216;help&#8217; at the shells&#8217; prompt to get a  list of commands. Test your running install by creating tables,  inserting content, viewing content, and then dropping your tables. For  example:</span></p>
<p><span style="font-family: Simsun;">使用 HBase shell  来测试。</span></p>
<p><span style="font-family: Simsun;">hbase&gt; #  Type &#8220;help&#8221; to see shell help screen</span></p>
<p><span style="font-family: Simsun;">hbase&gt; help</span></p>
<p><span style="font-family: Simsun;">hbase&gt; # To create a table named  &#8220;mylittletable&#8221; with a column family of &#8220;mylittlecolumnfamily&#8221;, type</span></p>
<p><span style="font-family: Simsun;">hbase&gt; create &#8220;mylittletable&#8221;,  &#8220;mylittlecolumnfamily&#8221;</span></p>
<p><span style="font-family: Simsun;">hbase&gt;  # To see the schema for you just created &#8220;mylittletable&#8221; table and its  single &#8220;mylittlecolumnfamily&#8221;, type</span></p>
<p><span style="font-family: Simsun;">hbase&gt; describe &#8220;mylittletable&#8221;</span></p>
<p><span style="font-family: Simsun;">hbase&gt; # To add a row whose id is  &#8220;myrow&#8221;, to the column &#8220;mylittlecolumnfamily:x&#8221; with a value of &#8216;v&#8217;, do</span></p>
<p><span style="font-family: Simsun;">hbase&gt; put &#8220;mylittletable&#8221;, &#8220;myrow&#8221;,  &#8220;mylittlecolumnfamily:x&#8221;, &#8220;v&#8221;</span></p>
<p><span style="font-family: Simsun;">hbase&gt; # To get the cell just added, do</span></p>
<p><span style="font-family: Simsun;">hbase&gt; get &#8220;mylittletable&#8221;, &#8220;myrow&#8221;</span></p>
<p><span style="font-family: Simsun;">hbase&gt; # To scan you new table, do</span></p>
<p><span style="font-family: Simsun;">hbase&gt; scan &#8220;mylittletable&#8221;</span></p>
<p><span style="font-family: Simsun;">To stop HBase, exit the HBase shell and  enter:</span></p>
<p><span style="font-family: Simsun;">下面的命令关闭 HBase .</span></p>
<p><span style="font-family: Simsun;">${HBASE_HOME}/bin/stop-hbase.sh</span></p>
<p><span style="font-family: Simsun;">If you are running a distributed  operation, be sure to wait until HBase has shut down completely before  stopping the Hadoop daemons.</span></p>
<p><span style="font-family: Simsun;">The default location for logs is ${</span><span style="font-family: Simsun;">HBASE_HOME</span><span style="font-family: Simsun;">}/logs.</span></p>
<p><span style="font-family: Simsun;">HBase  also puts up a UI listing vital attributes. By default its deployed on  the master host at port 60010 (HBase RegionServers listen on port 60020  by default and put up an informational http server at 60030).</span></p>
<p><span style="font-family: Simsun;">端口 : 60010(master) 60020(region servers)</span><span><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zhongzichang.com/archives/143/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hbase 数据模型</title>
		<link>http://www.zhongzichang.com/archives/139</link>
		<comments>http://www.zhongzichang.com/archives/139#comments</comments>
		<pubDate>Fri, 24 Apr 2009 07:09:11 +0000</pubDate>
		<dc:creator>zhongzichang</dc:creator>
				<category><![CDATA[HBase]]></category>

		<guid isPermaLink="false">http://www.zhongzichang.com/?p=138</guid>
		<description><![CDATA[*  介绍 *  概览 *  行 *  列簇 *  时间戳 *  簇属性 *  实例 o  源ERD o  HBase目标模型 介绍 HBase 的数据模型是继 Bigtable 数据模型的之后的克隆版，特别适用于密集的数据系统。由于关系型数据库的架构是基于单台机器的，无法获得高的伸缩性。例如，连接两个表的JOIN操作，在内存中完成，这就无法跨越网络。关系分布式数据库的公司，需要做很多重新设计的工作，这就是他们的许可证这个贵的原因。其他的可选方法是复制，而当从机写超载时，最后的选择是分表。在这个时候，数据的正则化是你在类中唯一记住要看的，这也是为什么数据模型要在纸上写得明明白白，还不是仅仅给你看的。 概览 看简单点，HBase可以概括成一个 Map&#60;byte[], Map&#60;byte[], Map&#60;byte[], Map&#60;Long, byte[]&#62;&#62;&#62;。第一个Map是映射从 row keys 到 column families。第二个Map是映射从 column families 到他们的 column keys。第三个Map是映射从 &#8230; <a href="http://www.zhongzichang.com/archives/139">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>*      介绍<br />
*      概览<br />
*      行<br />
*      列簇<br />
*      时间戳<br />
*      簇属性<br />
*      实例<br />
o            源ERD<br />
o            HBase目标模型</p>
<p><strong>介绍</strong></p>
<p>HBase 的数据模型是继 Bigtable 数据模型的之后的克隆版，特别适用于密集的数据系统。由于关系型数据库的架构是基于单台机器的，无法获得高的伸缩性。例如，连接两个表的JOIN操作，在内存中完成，这就无法跨越网络。关系分布式数据库的公司，需要做很多重新设计的工作，这就是他们的许可证这个贵的原因。其他的可选方法是复制，而当从机写超载时，最后的选择是分表。在这个时候，数据的正则化是你在类中唯一记住要看的，这也是为什么数据模型要在纸上写得明明白白，还不是仅仅给你看的。</p>
<p><strong>概览</strong></p>
<p>看简单点，HBase可以概括成一个 Map&lt;byte[], Map&lt;byte[], Map&lt;byte[], Map&lt;Long, byte[]&gt;&gt;&gt;。第一个Map是映射从 row keys 到 column families。第二个Map是映射从 column families 到他们的 column keys。第三个Map是映射从 column keys 到他们的 timestamps 。 最后，最后的Map映射 timestamps 到一个单一的值。keys 一般为 字符串 strings， timestamps 是一个长整型 longs。而值则为一个不解释的字节数组。 列的 keys 总在其 families 后面，表现如：family:key。因为一个 family 映射到另一个其他的map，这在理论上允许一个 family 包含无限个 column keys。因此，为了获取一个值，用户需要使用三个 keys 来 get ：</p>
<p>row key+column key+timestamp -&gt; value</p>
<p>行键+列键+时间戳 -&gt; 值</p>
<p><strong>行</strong></p>
<p>HBase 以数组格式来处理 row key，但 row key 本身是有字符串的形式表现。row key Map 一个特性就是以一个词典顺序来保存。例如，从1到100的数字，就是按照 1,10,100,11,12,13,14,15,16,17,18,19,2,20,21,&#8230;,9,91,92,93,94,95,96,97,98,99 这样的方式来保存。</p>
<p>要想以自然顺序来保存整型数，row keys 必须在左边以0填充。利用这一点，row key Map 的功能可以通过提供一个 scaner 来增强， scaner 带有一个 start row key 和 一个 stop row key。例如，如果 row keys 是日期格式 YYYYMMDD，获取 2008年7月整个月的内容，就是打开一个 scaner （20080700到20080800）。它并不关心指定的 row keys 存在与否，唯一要关心的，就是这个调用不会返回 stop row key，因此，stop row key 必须给 scaner 指定好。</p>
<p><strong>列簇</strong></p>
<p>在 Hbase中，列成员重组具有同一性质的数据，并不限制数据类型。簇是表模式的一部分，为每行保存同种数据。与 froms rows to forws 不同的是 column keys 可以是稀少的。例如，row  “20080702” 可以拥有自己的“info:”成员，该成员下有如下几个 column keys：<br />
info:aaa<br />
info:bbb<br />
info:ccc</p>
<p>同样，row “20080703”仅有：<br />
info:12342<br />
在使用 column keys 的时候，开发者必须要非常小心。因为长度为0 的 key是允许的，这说明，在前面的例子中，数据可以被插入到 column key “info:” 中。我们强烈推荐，仅仅在没有其他的 keys 指定时使用空的 key。同样，由于一个成员中的数据是同一种类的，参考性能与时间戳 ，很多属性可以指定。</p>
<p>时间戳</p>
<p>根据成员的配置情况，HBase的值可以是以多版本的方式保存。缺省情况下，HBase将每个新值的时间戳设置为当前时间 milliseconds，并且当一个 cell 被请求时，返回最新的版本。开发者可以在插入数据时自定义时间戳，然后再通过指定这个时间戳来重新获取该值。</p>
<p>Family Attributes成员属性</p>
<p>可以为每一个簇指定下面的属性：</p>
<p>已实现的</p>
<p>*压缩<br />
o record：准确到由rowkey+columnkey+timestamp 获得的每一个值都会在单独压缩。</p>
<p>o block：HDFS中的 block 被压缩。一个block可能包含多条record（block size &gt; record size），或者一条记录的一部分（block size &lt; record size）。<br />
*时间戳<br />
o 最大编号：一个值拥有不同版本的最大编号。<br />
o           生存期： 比指定版本旧的内容将被当做垃圾被收集。</p>
<p>* 块缓存：在HDFS中，通过LRU排序算法获得缓存块。当等待全内存的存储时，改良随机读的性能，是一个很好的特性。</p>
<p>还没有实现的</p>
<p>* 内存保存：成员的所有值都保存在内存中。<br />
* 长度：写入的值的长度不能超过指定的字节数。参考 [WWW] HBASE-742</p>
<p><strong>实例</strong></p>
<p>一个好的例子，演示Hbase的数据模型，就是 一个 blog。因为它具有简单和范围小的特点。</p>
<p>* blog条目，由标题，副标题，日期，作者，类型（或者标签），文本和评论组成，可以被登录后的用户进行创建和更新。<br />
* 用户，由用户名，密码，和一个名称，可以登录或者登出。<br />
* 评论，由标题，作者，文本组成，可以被游客匿名写入。</p>
<p>原ERD</p>
<p><a href="http://www.zhongzichang.com/wp-content/uploads/2009/04/db_blog-300x240.jpg"><img class="alignnone size-full wp-image-148" title="db_blog-300x240" src="http://www.zhongzichang.com/wp-content/uploads/2009/04/db_blog-300x240.jpg" alt="" width="300" height="240" /></a></p>
<p>HBase 目标模式</p>
<p>优先的解决方案 :</p>
<table border="0">
<tbody>
<tr>
<td>Table</td>
<td>Row Key</td>
<td>Family</td>
<td>Attributs</td>
</tr>
<tr>
<td>blogtable</td>
<td>TTYYYYMMDDHHmmss</td>
<td>info:</td>
<td>Always contains the column keys author,title,under_title. Should be IN-MEMORY and have a 1 version</td>
</tr>
<tr>
<td></td>
<td></td>
<td>text:</td>
<td>No column key. 3 versions</td>
</tr>
<tr>
<td></td>
<td></td>
<td>comment_title:</td>
<td>Column keys are written like YYYMMDDHHmmss. Should be IN-MEMORY and have a 1 version</td>
</tr>
<tr>
<td></td>
<td></td>
<td>comment_author:</td>
<td>Same keys. 1 version</td>
</tr>
<tr>
<td></td>
<td></td>
<td>comment_text:</td>
<td>Same keys. 1 version</td>
</tr>
<tr>
<td>usertable</td>
<td>login_name</td>
<td>info:</td>
<td>Always contains the column keys password and name. 1 version</td>
</tr>
</tbody>
</table>
<p>blogtable 的 row key 是连续的，由type(两个缩写字母)和时间戳组成。按照这样的方式，行首先是根据 type 来集成，然后时间日期。这表示能有更多的机会在同一个 region 内获得所需的数据。如你所见，在BLOGENTITY和COMMENT之间的1:*的关系，将 comments 的每一个属性放在 blogentery 中，作为的一个 family 。用日期作为column key，所有的 comments 已经被排序过。</p>
<p>这样设计的好处就是当你显示blog的“首页”，你仅仅需要获取从 blogtable 中 family &#8220;info:&#8221; 。当你展示一个实际的blog条目，你可以获取整行。另外一个好处就是用时间戳作为 row key，需要显示时，scanner可以获取连续的 rows ，例如， 最近你一个月的 条目。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zhongzichang.com/archives/139/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

