You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2014/08/26 20:49:10 UTC
svn commit: r1620690 [16/40] - in /hbase/hbase.apache.org/trunk: ./
apidocs/org/apache/hadoop/hbase/client/
apidocs/org/apache/hadoop/hbase/client/class-use/
apidocs/org/apache/hadoop/hbase/coprocessor/
apidocs/org/apache/hadoop/hbase/coprocessor/class...
Added: hbase/hbase.apache.org/trunk/book/appendix_hfile_format.html
URL: http://svn.apache.org/viewvc/hbase/hbase.apache.org/trunk/book/appendix_hfile_format.html?rev=1620690&view=auto
==============================================================================
--- hbase/hbase.apache.org/trunk/book/appendix_hfile_format.html (added)
+++ hbase/hbase.apache.org/trunk/book/appendix_hfile_format.html Tue Aug 26 18:49:07 2014
@@ -0,0 +1,27 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Appendix A. HFile format</title><link rel="stylesheet" type="text/css" href="${baserdir}/src/main/site/resources/css/freebsd_docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="appendix_hfile_format.html" title="Appendix A. HFile format"><link rel="next" href="hfilev2.html" title="A.2. HBase file format with inline blocks (version 2)"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix A. HFile format</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="hfilev2.html">Next</a></td></tr></table><hr></div><script type="text/javascript">
+ var disqus_shortname = 'hbase'; // required: replace example with your forum shortname
+ var disqus_url = 'http://hbase.apache.org/book/hfile_format.html';
+ </script><div class="appendix"><div class="titlepage"><div><div><h2 class="title"><a name="hfile_format"></a>Appendix A. HFile format</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="appendix_hfile_format.html#hfilev1">A.1. HBase File Format (version 1)</a></span></dt><dd><dl><dt><span class="section"><a href="appendix_hfile_format.html#hfilev1.overview">A.1.1. Overview of Version 1</a></span></dt><dt><span class="section"><a href="appendix_hfile_format.html#d9858e31">A.1.2. Block index format in version 1 </a></span></dt></dl></dd><dt><span class="section"><a href="hfilev2.html">A.2.
+ HBase file format with inline blocks (version 2)
+ </a></span></dt><dd><dl><dt><span class="section"><a href="hfilev2.html#d9858e60">A.2.1. Motivation </a></span></dt><dt><span class="section"><a href="hfilev2.html#hfilev2.overview">A.2.2. Overview of Version 2</a></span></dt><dt><span class="section"><a href="hfilev2.html#d9858e83">A.2.3. Unified version 2 block format</a></span></dt><dt><span class="section"><a href="hfilev2.html#d9858e152">A.2.4. Block index in version 2</a></span></dt><dt><span class="section"><a href="hfilev2.html#d9858e177">A.2.5.
+ Root block index format in version 2</a></span></dt><dt><span class="section"><a href="hfilev2.html#d9858e230">A.2.6.
+ Non-root block index format in version 2</a></span></dt><dt><span class="section"><a href="hfilev2.html#d9858e255">A.2.7.
+ Bloom filters in version 2</a></span></dt><dt><span class="section"><a href="hfilev2.html#d9858e292">A.2.8. File Info format in versions 1 and 2</a></span></dt><dt><span class="section"><a href="hfilev2.html#d9858e338">A.2.9.
+ Fixed file trailer format differences between versions 1 and 2</a></span></dt><dt><span class="section"><a href="hfilev2.html#d9858e481">A.2.10. getShortMidpointKey(an optimization for data index block)</a></span></dt></dl></dd><dt><span class="section"><a href="hfilev3.html">A.3. HBase File Format with Security Enhancements (version 3)</a></span></dt><dd><dl><dt><span class="section"><a href="hfilev3.html#hfilev3.motivation">A.3.1. Motivation </a></span></dt><dt><span class="section"><a href="hfilev3.html#hfilev3.overview">A.3.2. Overview</a></span></dt><dt><span class="section"><a href="hfilev3.html#hvilev3.infoblock">A.3.3. File Info Block in Version 3</a></span></dt><dt><span class="section"><a href="hfilev3.html#hfilev3.datablock">A.3.4. Data Blocks in Version 3</a></span></dt><dt><span class="section"><a href="hfilev3.html#hfilev3.fixedtrailer">A.3.5. Fixed File Trailer in Version 3</a></span></dt></dl></dd></dl></div><p>This appendix describes the evolution of the HFile
format.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="hfilev1"></a>A.1. HBase File Format (version 1)</h2></div></div></div><p>As we will be discussing changes to the HFile format, it is useful to give a short overview of the original (HFile version 1) format.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="hfilev1.overview"></a>A.1.1. Overview of Version 1</h3></div></div></div><p>An HFile in version 1 format is structured as follows:
+ <span class="inlinemediaobject"><img src="images/hfile.png" align="middle" alt="HFile Version 1"></span>
+ <a href="#ftn.d9858e24" class="footnote" name="d9858e24"><sup class="footnote">[1]</sup></a>
+ </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d9858e31"></a>A.1.2. Block index format in version 1 </h3></div></div></div><p>The block index in version 1 is very straightforward. For each entry, it contains: </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Offset (long)</p></li><li class="listitem"><p>Uncompressed size (int)</p></li><li class="listitem"><p>Key (a serialized byte array written using Bytes.writeByteArray) </p><div class="orderedlist"><ol class="orderedlist" type="a"><li class="listitem"><p>Key length as a variable-length integer (VInt)
+ </p></li><li class="listitem"><p>
+ Key bytes
+ </p></li></ol></div></li></ol></div><p>The number of entries in the block index is stored in the fixed file trailer, and has to be passed in to the method that reads the block index. One of the limitations of the block index in version 1 is that it does not provide the compressed size of a block, which turns out to be necessary for decompression. Therefore, the HFile reader has to infer this compressed size from the offset difference between blocks. We fix this limitation in version 2, where we store on-disk block size instead of uncompressed size, and get uncompressed size from the block header.</p></div></div><div class="footnotes"><br><hr style="width:100; text-align:left;margin-left: 0"><div id="ftn.d9858e24" class="footnote"><p><a href="#d9858e24" class="para"><sup class="para">[1] </sup></a>Image courtesy of Lars George, <a class="link" href="http://www.larsgeorge.com/2009/10/hbase-architecture-101-storage.html" target="_top">hbase-architecture-101-storage.htm
l</a>.</p></div></div></div><div id="disqus_thread"></div><script type="text/javascript">
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="hfilev2.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> A.2.
+ HBase file format with inline blocks (version 2)
+ </td></tr></table></div></body></html>
\ No newline at end of file
Added: hbase/hbase.apache.org/trunk/book/ch01s15.html
URL: http://svn.apache.org/viewvc/hbase/hbase.apache.org/trunk/book/ch01s15.html?rev=1620690&view=auto
==============================================================================
--- hbase/hbase.apache.org/trunk/book/ch01s15.html (added)
+++ hbase/hbase.apache.org/trunk/book/ch01s15.html Tue Aug 26 18:49:07 2014
@@ -0,0 +1,85 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>1.15. HBase and HDFS</title><link rel="stylesheet" type="text/css" href="${baserdir}/src/main/site/resources/css/freebsd_docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="troubleshooting.html" title="Chapter 1. Troubleshooting and Debugging Apache HBase"><link rel="up" href="troubleshooting.html" title="Chapter 1. Troubleshooting and Debugging Apache HBase"><link rel="prev" href="ch01s14.html" title="1.14. IPC Configuration Conflicts with Hadoop"><link rel="next" href="trouble.tests.html" title="1.16. Running unit or integration tests"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">1.15. HBase and HDFS</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s14.html">Prev</a> </td><th width="60%" align="center"> </t
h><td width="20%" align="right"> <a accesskey="n" href="trouble.tests.html">Next</a></td></tr></table><hr></div><script type="text/javascript">
+ var disqus_shortname = 'hbase'; // required: replace example with your forum shortname
+ var disqus_url = 'http://hbase.apache.org/book/.html';
+ </script><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d273e1207"></a>1.15. HBase and HDFS</h2></div></div></div><p>General configuration guidance for Apache HDFS is out of the scope of this guide. Refer to
+ the documentation available at <a class="link" href="http://hadoop.apache.org/" target="_top">http://hadoop.apache.org/</a> for extensive
+ information about configuring HDFS. This section deals with HDFS in terms of HBase. </p><p>In most cases, HBase stores its data in Apache HDFS. This includes the HFiles containing
+ the data, as well as the write-ahead logs (WALs) which store data before it is written to the
+ HFiles and protect against RegionServer crashes. HDFS provides reliability and protection to
+ data in HBase because it is distributed. To operate with the most efficiency, HBase needs data
+ to be available locally. Therefore, it is a good practice to run an HDFS datanode on each
+ RegionServer.</p><div class="variablelist"><p class="title"><b>Important Information and Guidelines for HBase and HDFS</b></p><dl class="variablelist"><dt><span class="term">HBase is a client of HDFS.</span></dt><dd><p>HBase is an HDFS client, using the HDFS <code class="code">DFSClient</code> class, and references
+ to this class appear in HBase logs with other HDFS client log messages.</p></dd><dt><span class="term">Configuration is necessary in multiple places.</span></dt><dd><p>Some HDFS configurations relating to HBase need to be done at the HDFS (server) side.
+ Others must be done within HBase (at the client side). Other settings need
+ to be set at both the server and client side.
+ </p></dd><dt><span class="term">Write errors which affect HBase may be logged in the HDFS logs rather than HBase logs.</span></dt><dd><p>When writing, HDFS pipelines communications from one datanode to another. HBase
+ communicates to both the HDFS namenode and datanode, using the HDFS client classes.
+ Communication problems between datanodes are logged in the HDFS logs, not the HBase
+ logs.</p><p>HDFS writes are always local when possible. HBase RegionServers should not
+ experience many write errors, because they write the local datanode. If the datanode
+ cannot replicate the blocks, the errors are logged in HDFS, not in the HBase
+ RegionServer logs.</p></dd><dt><span class="term">HBase communicates with HDFS using two different ports.</span></dt><dd><p>HBase communicates with datanodes using the <code class="code">ipc.Client</code> interface and
+ the <code class="code">DataNode</code> class. References to these will appear in HBase logs. Each of
+ these communication channels use a different port (50010 and 50020 by default). The
+ ports are configured in the HDFS configuration, via the
+ <code class="code">dfs.datanode.address</code> and <code class="code">dfs.datanode.ipc.address</code>
+ parameters.</p></dd><dt><span class="term">Errors may be logged in HBase, HDFS, or both.</span></dt><dd><p>When troubleshooting HDFS issues in HBase, check logs in both places for errors.</p></dd><dt><span class="term">HDFS takes a while to mark a node as dead. You can configure HDFS to avoid using stale
+ datanodes.</span></dt><dd><p>By default, HDFS does not mark a node as dead until it is unreachable for 630
+ seconds. In Hadoop 1.1 and Hadoop 2.x, this can be alleviated by enabling checks for
+ stale datanodes, though this check is disabled by default. You can enable the check for
+ reads and writes separately, via <code class="code">dfs.namenode.avoid.read.stale.datanode</code> and
+ <code class="code">dfs.namenode.avoid.write.stale.datanode settings</code>. A stale datanode is one
+ that has not been reachable for <code class="code">dfs.namenode.stale.datanode.interval</code>
+ (default is 30 seconds). Stale datanodes are avoided, and marked as the last possible
+ target for a read or write operation. For configuration details, see the HDFS
+ documentation.</p></dd><dt><span class="term">Settings for HDFS retries and timeouts are important to HBase.</span></dt><dd><p>You can configure settings for various retries and timeouts. Always refer to the
+ HDFS documentation for current recommendations and defaults. Some of the settings
+ important to HBase are listed here. Defaults are current as of Hadoop 2.3. Check the
+ Hadoop documentation for the most current values and recommendations.</p><div class="variablelist"><p class="title"><b>Retries</b></p><dl class="variablelist"><dt><span class="term"><code class="code">ipc.client.connect.max.retries</code> (default: 10)</span></dt><dd><p>The number of times a client will attempt to establish a connection with the
+ server. This value sometimes needs to be increased. You can specify different
+ setting for the maximum number of retries if a timeout occurs. For SASL
+ connections, the number of retries is hard-coded at 15 and cannot be
+ configured.</p></dd><dt><span class="term"><code class="code">ipc.client.connect.max.retries.on.timeouts</code> (default: 45)</span></dt><dd><p>The number of times a client will attempt to establish a connection
+ with the server in the event of a timeout. If some retries are due to timeouts and
+ some are due to other reasons, this counter is added to
+ <code class="code">ipc.client.connect.max.retries</code>, so the maximum number of retries for
+ all reasons could be the combined value.</p></dd><dt><span class="term"><code class="code">dfs.client.block.write.retries</code> (default: 3)</span></dt><dd><p>How many times the client attempts to write to the datanode. After the
+ number of retries is reached, the client reconnects to the namenode to get a new
+ location of a datanode. You can try increasing this value.</p></dd></dl></div><div class="variablelist"><p class="title"><b>HDFS Heartbeats</b></p><p>HDFS heartbeats are entirely on the HDFS side, between the namenode and datanodes.</p><dl class="variablelist"><dt><span class="term"><code class="code">dfs.heartbeat.interval</code> (default: 3)</span></dt><dd><p>The interval at which a node heartbeats.</p></dd><dt><span class="term"><code class="code">dfs.namenode.heartbeat.recheck-interval</code> (default: 300000)</span></dt><dd><p>The interval of time between heartbeat checks. The total time before a node is
+ marked as stale is determined by the following formula, which works out to 10
+ minutes and 30 seconds:</p><pre class="screen"> 2 * (dfs.namenode.heartbeat.recheck-interval) + 10 * 1000 * (dfs.heartbeat.interval)</pre></dd><dt><span class="term"><code class="code">dfs.namenode.stale.datanode.interval</code> (default: 3000)</span></dt><dd><p>How long (in milliseconds) a node can go without a heartbeat before it is
+ determined to be stale, if the other options to do with stale datanodes are
+ configured (off by default).</p></dd></dl></div></dd></dl></div><div class="variablelist"><p class="title"><b>Connection Timeouts</b></p><p>Connection timeouts occur between the client (HBASE) and the HDFS datanode. They may
+ occur when establishing a connection, attempting to read, or attempting to write. The two
+ settings below are used in combination, and affect connections between the DFSClient and the
+ datanode, the ipc.cClient and the datanode, and communication between two datanodes. </p><dl class="variablelist"><dt><span class="term"><code class="code">dfs.client.socket-timeout</code> (default: 60000)</span></dt><dd><p>The amount of time before a client connection times out when establishing a
+ connection or reading. The value is expressed in milliseconds, so the default is 60
+ seconds.</p></dd><dt><span class="term"><code class="code">dfs.datanode.socket.write.timeout</code> (default: 480000)</span></dt><dd><p>The amount of time before a write operation times out. The default is 8
+ minutes, expressed as milliseconds.</p></dd></dl></div><div class="variablelist"><p class="title"><b>Typical Error Logs</b></p><p>The following types of errors are often seen in the logs.</p><dl class="variablelist"><dt><span class="term"><code class="code">INFO HDFS.DFSClient: Failed to connect to /xxx50010, add to deadNodes and
+ continue java.net.SocketTimeoutException: 60000 millis timeout while waiting for channel
+ to be ready for connect. ch : java.nio.channels.SocketChannel[connection-pending
+ remote=/region-server-1:50010]</code></span></dt><dd><p>All datanodes for a block are dead, and recovery is not possible. Here is the
+ sequence of events that leads to this error:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>The client attempts to connect to a dead datanode.</p></li><li class="listitem"><p>The connection fails, so the client moves down the list of datanodes and tries
+ the next one. It also fails.</p></li><li class="listitem"><p>When the client exhausts its entire list, it sleeps for 3 seconds and requests a
+ new list. It is very likely to receive the exact same list as before, in which case
+ the error occurs again.</p></li></ul></div></dd><dt><span class="term"><code class="code">INFO org.apache.hadoop.HDFS.DFSClient: Exception in createBlockOutputStream
+ java.net.SocketTimeoutException: 69000 millis timeout while waiting for channel to be
+ ready for connect. ch : java.nio.channels.SocketChannel[connection-pending remote=/
+ xxx:50010]</code></span></dt><dd><p>This type of error indicates a write issue. In this case, the master wants to split
+ the log. It does not have a local datanode so it tries to connect to a remote datanode,
+ but the datanode is dead.</p><p>In this situation, there will be three retries (by default). If all retries fail, a
+ message like the following is logged:</p><pre class="screen">
+WARN HDFS.DFSClient: DataStreamer Exception: java.io.IOException: Unable to create new block
+ </pre><p>If the operation was an attempt to split the log, the following type of message may
+ also appear:</p><pre class="screen">
+FATAL wal.HLogSplitter: WriterThread-xxx Got while writing log entry to log
+ </pre></dd></dl></div></div><div id="disqus_thread"></div><script type="text/javascript">
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s14.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="trouble.tests.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">1.14. IPC Configuration Conflicts with Hadoop </td><td width="20%" align="center"><a accesskey="h" href="troubleshooting.html">Home</a></td><td width="40%" align="right" valign="top"> 1.16. Running unit or integration tests</td></tr></table></div></body></html>
\ No newline at end of file
Added: hbase/hbase.apache.org/trunk/book/ch01s19.html
URL: http://svn.apache.org/viewvc/hbase/hbase.apache.org/trunk/book/ch01s19.html?rev=1620690&view=auto
==============================================================================
--- hbase/hbase.apache.org/trunk/book/ch01s19.html (added)
+++ hbase/hbase.apache.org/trunk/book/ch01s19.html Tue Aug 26 18:49:07 2014
@@ -0,0 +1,19 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>1.19. Operating System Specific Issues</title><link rel="stylesheet" type="text/css" href="${baserdir}/src/main/site/resources/css/freebsd_docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="troubleshooting.html" title="Chapter 1. Troubleshooting and Debugging Apache HBase"><link rel="up" href="troubleshooting.html" title="Chapter 1. Troubleshooting and Debugging Apache HBase"><link rel="prev" href="trouble.crypto.html" title="1.18. Cryptographic Features"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">1.19. Operating System Specific Issues</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="trouble.crypto.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></d
iv><script type="text/javascript">
+ var disqus_shortname = 'hbase'; // required: replace example with your forum shortname
+ var disqus_url = 'http://hbase.apache.org/book/.html';
+ </script><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d273e1457"></a>1.19. Operating System Specific Issues</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d273e1460"></a>1.19.1. Page Allocation Failure</h3></div></div></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This issue is known to affect CentOS 6.2 and possibly CentOS 6.5. It may also affect
+ some versions of Red Hat Enterprise Linux, according to <a class="link" href="https://bugzilla.redhat.com/show_bug.cgi?id=770545" target="_top">https://bugzilla.redhat.com/show_bug.cgi?id=770545</a>.</p></div><p>Some users have reported seeing the following error:</p><pre class="screen">kernel: java: page allocation failure. order:4, mode:0x20</pre><p>Raising the value of <code class="code">min_free_kbytes</code> was reported to fix this problem. This
+ parameter is set to a percentage of the amount of RAM on your system, and is described in more
+ detail at <a class="link" href="http://www.centos.org/docs/5/html/5.1/Deployment_Guide/s3-proc-sys-vm.html" target="_top">http://www.centos.org/docs/5/html/5.1/Deployment_Guide/s3-proc-sys-vm.html</a>. </p><p>To find the current value on your system, run the following command:</p><pre class="screen">[user@host]<em class="hl-comment" style="color: silver"># </em><strong class="userinput"><code>cat /proc/sys/vm/min_free_kbytes</code></strong></pre><p>Next, raise the value. Try doubling, then quadrupling the value. Note that setting the
+ value too low or too high could have detrimental effects on your system. Consult your
+ operating system vendor for specific recommendations.</p><p>Use the following command to modify the value of <code class="code">min_free_kbytes</code>,
+ substituting <em class="replaceable"><code><value></code></em> with your intended value:</p><pre class="screen">[user@host]<em class="hl-comment" style="color: silver"># </em><strong class="userinput"><code>echo <value> > /proc/sys/vm/min_free_kbytes</code></strong></pre></div></div><div id="disqus_thread"></div><script type="text/javascript">
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="trouble.crypto.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">1.18. Cryptographic Features </td><td width="20%" align="center"><a accesskey="h" href="troubleshooting.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
\ No newline at end of file
Added: hbase/hbase.apache.org/trunk/book/ch04s02.html
URL: http://svn.apache.org/viewvc/hbase/hbase.apache.org/trunk/book/ch04s02.html?rev=1620690&view=auto
==============================================================================
--- hbase/hbase.apache.org/trunk/book/ch04s02.html (added)
+++ hbase/hbase.apache.org/trunk/book/ch04s02.html Tue Aug 26 18:49:07 2014
@@ -0,0 +1,18 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>4.2. Running the Shell in Non-Interactive Mode</title><link rel="stylesheet" type="text/css" href="${baserdir}/src/main/site/resources/css/freebsd_docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="book.html" title="The Apache HBase™ Reference Guide"><link rel="up" href="shell.html" title="Chapter 4. The Apache HBase Shell"><link rel="prev" href="shell.html" title="Chapter 4. The Apache HBase Shell"><link rel="next" href="hbase.shell.noninteractive.html" title="4.3. HBase Shell in OS Scripts"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.2. Running the Shell in Non-Interactive Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="shell.html">Prev</a> </td><th width="60%" align="center">Chapter 4. The Apach
e HBase Shell</th><td width="20%" align="right"> <a accesskey="n" href="hbase.shell.noninteractive.html">Next</a></td></tr></table><hr></div><script type="text/javascript">
+ var disqus_shortname = 'hbase'; // required: replace example with your forum shortname
+ var disqus_url = 'http://hbase.apache.org/book/.html';
+ </script><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d4143e5243"></a>4.2. Running the Shell in Non-Interactive Mode</h2></div></div></div><p>A new non-interactive mode has been added to the HBase Shell (<a class="link" href="https://issues.apache.org/jira/browse/HBASE-11658" target="_top">HBASE-11658)</a>.
+ Non-interactive mode captures the exit status (success or failure) of HBase Shell
+ commands and passes that status back to the command interpreter. If you use the normal
+ interactive mode, the HBase Shell will only ever return its own exit status, which will
+ nearly always be <code class="literal">0</code> for success.</p><p>To invoke non-interactive mode, pass the <code class="option">-n</code> or
+ <code class="option">--non-interactive</code> option to HBase Shell.</p></div><div id="disqus_thread"></div><script type="text/javascript">
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="shell.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="shell.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="hbase.shell.noninteractive.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. The Apache HBase Shell </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> 4.3. HBase Shell in OS Scripts</td></tr></table></div></body></html>
\ No newline at end of file
Added: hbase/hbase.apache.org/trunk/book/ch04s04.html
URL: http://svn.apache.org/viewvc/hbase/hbase.apache.org/trunk/book/ch04s04.html?rev=1620690&view=auto
==============================================================================
--- hbase/hbase.apache.org/trunk/book/ch04s04.html (added)
+++ hbase/hbase.apache.org/trunk/book/ch04s04.html Tue Aug 26 18:49:07 2014
@@ -0,0 +1,61 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>4.4. Read HBase Shell Commands from a Command File</title><link rel="stylesheet" type="text/css" href="${baserdir}/src/main/site/resources/css/freebsd_docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="book.html" title="The Apache HBase™ Reference Guide"><link rel="up" href="shell.html" title="Chapter 4. The Apache HBase Shell"><link rel="prev" href="hbase.shell.noninteractive.html" title="4.3. HBase Shell in OS Scripts"><link rel="next" href="ch04s05.html" title="4.5. Passing VM Options to the Shell"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.4. Read HBase Shell Commands from a Command File</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="hbase.shell.noninteractive.html">Prev</a> </td><th width="60%" align="center">C
hapter 4. The Apache HBase Shell</th><td width="20%" align="right"> <a accesskey="n" href="ch04s05.html">Next</a></td></tr></table><hr></div><script type="text/javascript">
+ var disqus_shortname = 'hbase'; // required: replace example with your forum shortname
+ var disqus_url = 'http://hbase.apache.org/book/.html';
+ </script><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d4143e5319"></a>4.4. Read HBase Shell Commands from a Command File</h2></div></div></div><p>You can enter HBase Shell commands into a text file, one command per line, and pass
+ that file to the HBase Shell.</p><div class="example"><a name="d4143e5324"></a><p class="title"><b>Example 4.3. Example Command File</b></p><div class="example-contents"><pre class="screen">
+create 'test', 'cf'
+list 'test'
+put 'test', 'row1', 'cf:a', 'value1'
+put 'test', 'row2', 'cf:b', 'value2'
+put 'test', 'row3', 'cf:c', 'value3'
+put 'test', 'row4', 'cf:d', 'value4'
+scan 'test'
+get 'test', 'row1'
+disable 'test'
+enable 'test'
+ </pre></div></div><br class="example-break"><div class="example"><a name="d4143e5329"></a><p class="title"><b>Example 4.4. Directing HBase Shell to Execute the Commands</b></p><div class="example-contents"><p>Pass the path to the command file as the only argument to the <span class="command"><strong>hbase
+ shell</strong></span> command. Each command is executed and its output is shown. If
+ you do not include the <span class="command"><strong>exit</strong></span> command in your script, you are
+ returned to the HBase shell prompt. There is no way to programmatically check each
+ individual command for success or failure. Also, though you see the output for each
+ command, the commands themselves are not echoed to the screen so it can be difficult
+ to line up the command with its output.</p><pre class="screen">
+$ <strong class="userinput"><code>./hbase shell ./sample_commands.txt</code></strong>
+<code class="computeroutput">0 row(s) in 3.4170 seconds
+
+TABLE
+test
+1 row(s) in 0.0590 seconds
+
+0 row(s) in 0.1540 seconds
+
+0 row(s) in 0.0080 seconds
+
+0 row(s) in 0.0060 seconds
+
+0 row(s) in 0.0060 seconds
+
+ROW COLUMN+CELL
+ row1 column=cf:a, timestamp=1407130286968, value=value1
+ row2 column=cf:b, timestamp=1407130286997, value=value2
+ row3 column=cf:c, timestamp=1407130287007, value=value3
+ row4 column=cf:d, timestamp=1407130287015, value=value4
+4 row(s) in 0.0420 seconds
+
+COLUMN CELL
+ cf:a timestamp=1407130286968, value=value1
+1 row(s) in 0.0110 seconds
+
+0 row(s) in 1.5630 seconds
+
+0 row(s) in 0.4360 seconds</code>
+ </pre></div></div><br class="example-break"></div><div id="disqus_thread"></div><script type="text/javascript">
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="hbase.shell.noninteractive.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="shell.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch04s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.3. HBase Shell in OS Scripts </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> 4.5. Passing VM Options to the Shell</td></tr></table></div></body></html>
\ No newline at end of file
Added: hbase/hbase.apache.org/trunk/book/ch04s05.html
URL: http://svn.apache.org/viewvc/hbase/hbase.apache.org/trunk/book/ch04s05.html?rev=1620690&view=auto
==============================================================================
--- hbase/hbase.apache.org/trunk/book/ch04s05.html (added)
+++ hbase/hbase.apache.org/trunk/book/ch04s05.html Tue Aug 26 18:49:07 2014
@@ -0,0 +1,22 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>4.5. Passing VM Options to the Shell</title><link rel="stylesheet" type="text/css" href="${baserdir}/src/main/site/resources/css/freebsd_docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="book.html" title="The Apache HBase™ Reference Guide"><link rel="up" href="shell.html" title="Chapter 4. The Apache HBase Shell"><link rel="prev" href="ch04s04.html" title="4.4. Read HBase Shell Commands from a Command File"><link rel="next" href="shell_tricks.html" title="4.6. Shell Tricks"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.5. Passing VM Options to the Shell</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s04.html">Prev</a> </td><th width="60%" align="center">Chapter 4. The Apache HBase Shell</th><td width="20
%" align="right"> <a accesskey="n" href="shell_tricks.html">Next</a></td></tr></table><hr></div><script type="text/javascript">
+ var disqus_shortname = 'hbase'; // required: replace example with your forum shortname
+ var disqus_url = 'http://hbase.apache.org/book/.html';
+ </script><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d4143e5348"></a>4.5. Passing VM Options to the Shell</h2></div></div></div><p>You can pass VM options to the HBase Shell using the <code class="code">HBASE_SHELL_OPTS</code>
+ environment variable. You can set this in your environment, for instance by editing
+ <code class="filename">~/.bashrc</code>, or set it as part of the command to launch HBase
+ Shell. The following example sets several garbage-collection-related variables, just for
+ the lifetime of the VM running the HBase Shell. The command should be run all on a
+ single line, but is broken by the <code class="literal">\</code> character, for
+ readability.</p><pre class="screen">
+$ <strong class="userinput"><code>HBASE_SHELL_OPTS="-verbose:gc -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDateStamps \
+ -XX:+PrintGCDetails -Xloggc:$HBASE_HOME/logs/gc-hbase.log" ./bin/hbase shell</code></strong>
+ </pre></div><div id="disqus_thread"></div><script type="text/javascript">
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="shell.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="shell_tricks.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.4. Read HBase Shell Commands from a Command File </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> 4.6. Shell Tricks</td></tr></table></div></body></html>
\ No newline at end of file
Added: hbase/hbase.apache.org/trunk/book/ch15s15.html
URL: http://svn.apache.org/viewvc/hbase/hbase.apache.org/trunk/book/ch15s15.html?rev=1620690&view=auto
==============================================================================
--- hbase/hbase.apache.org/trunk/book/ch15s15.html (added)
+++ hbase/hbase.apache.org/trunk/book/ch15s15.html Tue Aug 26 18:49:07 2014
@@ -0,0 +1,85 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>15.15. HBase and HDFS</title><link rel="stylesheet" type="text/css" href="${baserdir}/src/main/site/resources/css/freebsd_docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="book.html" title="The Apache HBase™ Reference Guide"><link rel="up" href="trouble.html" title="Chapter 15. Troubleshooting and Debugging Apache HBase"><link rel="prev" href="ch15s14.html" title="15.14. IPC Configuration Conflicts with Hadoop"><link rel="next" href="trouble.tests.html" title="15.16. Running unit or integration tests"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">15.15. HBase and HDFS</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch15s14.html">Prev</a> </td><th width="60%" align="center">Chapter 15. Troubleshooting and Debugg
ing Apache HBase</th><td width="20%" align="right"> <a accesskey="n" href="trouble.tests.html">Next</a></td></tr></table><hr></div><script type="text/javascript">
+ var disqus_shortname = 'hbase'; // required: replace example with your forum shortname
+ var disqus_url = 'http://hbase.apache.org/book/.html';
+ </script><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d4143e16471"></a>15.15. HBase and HDFS</h2></div></div></div><p>General configuration guidance for Apache HDFS is out of the scope of this guide. Refer to
+ the documentation available at <a class="link" href="http://hadoop.apache.org/" target="_top">http://hadoop.apache.org/</a> for extensive
+ information about configuring HDFS. This section deals with HDFS in terms of HBase. </p><p>In most cases, HBase stores its data in Apache HDFS. This includes the HFiles containing
+ the data, as well as the write-ahead logs (WALs) which store data before it is written to the
+ HFiles and protect against RegionServer crashes. HDFS provides reliability and protection to
+ data in HBase because it is distributed. To operate with the most efficiency, HBase needs data
+ to be available locally. Therefore, it is a good practice to run an HDFS datanode on each
+ RegionServer.</p><div class="variablelist"><p class="title"><b>Important Information and Guidelines for HBase and HDFS</b></p><dl class="variablelist"><dt><span class="term">HBase is a client of HDFS.</span></dt><dd><p>HBase is an HDFS client, using the HDFS <code class="code">DFSClient</code> class, and references
+ to this class appear in HBase logs with other HDFS client log messages.</p></dd><dt><span class="term">Configuration is necessary in multiple places.</span></dt><dd><p>Some HDFS configurations relating to HBase need to be done at the HDFS (server) side.
+ Others must be done within HBase (at the client side). Other settings need
+ to be set at both the server and client side.
+ </p></dd><dt><span class="term">Write errors which affect HBase may be logged in the HDFS logs rather than HBase logs.</span></dt><dd><p>When writing, HDFS pipelines communications from one datanode to another. HBase
+ communicates to both the HDFS namenode and datanode, using the HDFS client classes.
+ Communication problems between datanodes are logged in the HDFS logs, not the HBase
+ logs.</p><p>HDFS writes are always local when possible. HBase RegionServers should not
+ experience many write errors, because they write the local datanode. If the datanode
+ cannot replicate the blocks, the errors are logged in HDFS, not in the HBase
+ RegionServer logs.</p></dd><dt><span class="term">HBase communicates with HDFS using two different ports.</span></dt><dd><p>HBase communicates with datanodes using the <code class="code">ipc.Client</code> interface and
+ the <code class="code">DataNode</code> class. References to these will appear in HBase logs. Each of
+ these communication channels use a different port (50010 and 50020 by default). The
+ ports are configured in the HDFS configuration, via the
+ <code class="code">dfs.datanode.address</code> and <code class="code">dfs.datanode.ipc.address</code>
+ parameters.</p></dd><dt><span class="term">Errors may be logged in HBase, HDFS, or both.</span></dt><dd><p>When troubleshooting HDFS issues in HBase, check logs in both places for errors.</p></dd><dt><span class="term">HDFS takes a while to mark a node as dead. You can configure HDFS to avoid using stale
+ datanodes.</span></dt><dd><p>By default, HDFS does not mark a node as dead until it is unreachable for 630
+ seconds. In Hadoop 1.1 and Hadoop 2.x, this can be alleviated by enabling checks for
+ stale datanodes, though this check is disabled by default. You can enable the check for
+ reads and writes separately, via <code class="code">dfs.namenode.avoid.read.stale.datanode</code> and
+ <code class="code">dfs.namenode.avoid.write.stale.datanode settings</code>. A stale datanode is one
+ that has not been reachable for <code class="code">dfs.namenode.stale.datanode.interval</code>
+ (default is 30 seconds). Stale datanodes are avoided, and marked as the last possible
+ target for a read or write operation. For configuration details, see the HDFS
+ documentation.</p></dd><dt><span class="term">Settings for HDFS retries and timeouts are important to HBase.</span></dt><dd><p>You can configure settings for various retries and timeouts. Always refer to the
+ HDFS documentation for current recommendations and defaults. Some of the settings
+ important to HBase are listed here. Defaults are current as of Hadoop 2.3. Check the
+ Hadoop documentation for the most current values and recommendations.</p><div class="variablelist"><p class="title"><b>Retries</b></p><dl class="variablelist"><dt><span class="term"><code class="code">ipc.client.connect.max.retries</code> (default: 10)</span></dt><dd><p>The number of times a client will attempt to establish a connection with the
+ server. This value sometimes needs to be increased. You can specify different
+ setting for the maximum number of retries if a timeout occurs. For SASL
+ connections, the number of retries is hard-coded at 15 and cannot be
+ configured.</p></dd><dt><span class="term"><code class="code">ipc.client.connect.max.retries.on.timeouts</code> (default: 45)</span></dt><dd><p>The number of times a client will attempt to establish a connection
+ with the server in the event of a timeout. If some retries are due to timeouts and
+ some are due to other reasons, this counter is added to
+ <code class="code">ipc.client.connect.max.retries</code>, so the maximum number of retries for
+ all reasons could be the combined value.</p></dd><dt><span class="term"><code class="code">dfs.client.block.write.retries</code> (default: 3)</span></dt><dd><p>How many times the client attempts to write to the datanode. After the
+ number of retries is reached, the client reconnects to the namenode to get a new
+ location of a datanode. You can try increasing this value.</p></dd></dl></div><div class="variablelist"><p class="title"><b>HDFS Heartbeats</b></p><p>HDFS heartbeats are entirely on the HDFS side, between the namenode and datanodes.</p><dl class="variablelist"><dt><span class="term"><code class="code">dfs.heartbeat.interval</code> (default: 3)</span></dt><dd><p>The interval at which a node heartbeats.</p></dd><dt><span class="term"><code class="code">dfs.namenode.heartbeat.recheck-interval</code> (default: 300000)</span></dt><dd><p>The interval of time between heartbeat checks. The total time before a node is
+ marked as stale is determined by the following formula, which works out to 10
+ minutes and 30 seconds:</p><pre class="screen"> 2 * (dfs.namenode.heartbeat.recheck-interval) + 10 * 1000 * (dfs.heartbeat.interval)</pre></dd><dt><span class="term"><code class="code">dfs.namenode.stale.datanode.interval</code> (default: 3000)</span></dt><dd><p>How long (in milliseconds) a node can go without a heartbeat before it is
+ determined to be stale, if the other options to do with stale datanodes are
+ configured (off by default).</p></dd></dl></div></dd></dl></div><div class="variablelist"><p class="title"><b>Connection Timeouts</b></p><p>Connection timeouts occur between the client (HBASE) and the HDFS datanode. They may
+ occur when establishing a connection, attempting to read, or attempting to write. The two
+ settings below are used in combination, and affect connections between the DFSClient and the
+ datanode, the ipc.cClient and the datanode, and communication between two datanodes. </p><dl class="variablelist"><dt><span class="term"><code class="code">dfs.client.socket-timeout</code> (default: 60000)</span></dt><dd><p>The amount of time before a client connection times out when establishing a
+ connection or reading. The value is expressed in milliseconds, so the default is 60
+ seconds.</p></dd><dt><span class="term"><code class="code">dfs.datanode.socket.write.timeout</code> (default: 480000)</span></dt><dd><p>The amount of time before a write operation times out. The default is 8
+ minutes, expressed as milliseconds.</p></dd></dl></div><div class="variablelist"><p class="title"><b>Typical Error Logs</b></p><p>The following types of errors are often seen in the logs.</p><dl class="variablelist"><dt><span class="term"><code class="code">INFO HDFS.DFSClient: Failed to connect to /xxx50010, add to deadNodes and
+ continue java.net.SocketTimeoutException: 60000 millis timeout while waiting for channel
+ to be ready for connect. ch : java.nio.channels.SocketChannel[connection-pending
+ remote=/region-server-1:50010]</code></span></dt><dd><p>All datanodes for a block are dead, and recovery is not possible. Here is the
+ sequence of events that leads to this error:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>The client attempts to connect to a dead datanode.</p></li><li class="listitem"><p>The connection fails, so the client moves down the list of datanodes and tries
+ the next one. It also fails.</p></li><li class="listitem"><p>When the client exhausts its entire list, it sleeps for 3 seconds and requests a
+ new list. It is very likely to receive the exact same list as before, in which case
+ the error occurs again.</p></li></ul></div></dd><dt><span class="term"><code class="code">INFO org.apache.hadoop.HDFS.DFSClient: Exception in createBlockOutputStream
+ java.net.SocketTimeoutException: 69000 millis timeout while waiting for channel to be
+ ready for connect. ch : java.nio.channels.SocketChannel[connection-pending remote=/
+ xxx:50010]</code></span></dt><dd><p>This type of error indicates a write issue. In this case, the master wants to split
+ the log. It does not have a local datanode so it tries to connect to a remote datanode,
+ but the datanode is dead.</p><p>In this situation, there will be three retries (by default). If all retries fail, a
+ message like the following is logged:</p><pre class="screen">
+WARN HDFS.DFSClient: DataStreamer Exception: java.io.IOException: Unable to create new block
+ </pre><p>If the operation was an attempt to split the log, the following type of message may
+ also appear:</p><pre class="screen">
+FATAL wal.HLogSplitter: WriterThread-xxx Got while writing log entry to log
+ </pre></dd></dl></div></div><div id="disqus_thread"></div><script type="text/javascript">
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch15s14.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="trouble.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="trouble.tests.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">15.14. IPC Configuration Conflicts with Hadoop </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> 15.16. Running unit or integration tests</td></tr></table></div></body></html>
\ No newline at end of file
Added: hbase/hbase.apache.org/trunk/book/ch15s19.html
URL: http://svn.apache.org/viewvc/hbase/hbase.apache.org/trunk/book/ch15s19.html?rev=1620690&view=auto
==============================================================================
--- hbase/hbase.apache.org/trunk/book/ch15s19.html (added)
+++ hbase/hbase.apache.org/trunk/book/ch15s19.html Tue Aug 26 18:49:07 2014
@@ -0,0 +1,19 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>15.19. Operating System Specific Issues</title><link rel="stylesheet" type="text/css" href="${baserdir}/src/main/site/resources/css/freebsd_docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="book.html" title="The Apache HBase™ Reference Guide"><link rel="up" href="trouble.html" title="Chapter 15. Troubleshooting and Debugging Apache HBase"><link rel="prev" href="trouble.crypto.html" title="15.18. Cryptographic Features"><link rel="next" href="casestudies.html" title="Chapter 16. Apache HBase Case Studies"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">15.19. Operating System Specific Issues</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="trouble.crypto.html">Prev</a> </td><th width="60%" align="center">Chapter 15
. Troubleshooting and Debugging Apache HBase</th><td width="20%" align="right"> <a accesskey="n" href="casestudies.html">Next</a></td></tr></table><hr></div><script type="text/javascript">
+ var disqus_shortname = 'hbase'; // required: replace example with your forum shortname
+ var disqus_url = 'http://hbase.apache.org/book/.html';
+ </script><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d4143e16721"></a>15.19. Operating System Specific Issues</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d4143e16724"></a>15.19.1. Page Allocation Failure</h3></div></div></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This issue is known to affect CentOS 6.2 and possibly CentOS 6.5. It may also affect
+ some versions of Red Hat Enterprise Linux, according to <a class="link" href="https://bugzilla.redhat.com/show_bug.cgi?id=770545" target="_top">https://bugzilla.redhat.com/show_bug.cgi?id=770545</a>.</p></div><p>Some users have reported seeing the following error:</p><pre class="screen">kernel: java: page allocation failure. order:4, mode:0x20</pre><p>Raising the value of <code class="code">min_free_kbytes</code> was reported to fix this problem. This
+ parameter is set to a percentage of the amount of RAM on your system, and is described in more
+ detail at <a class="link" href="http://www.centos.org/docs/5/html/5.1/Deployment_Guide/s3-proc-sys-vm.html" target="_top">http://www.centos.org/docs/5/html/5.1/Deployment_Guide/s3-proc-sys-vm.html</a>. </p><p>To find the current value on your system, run the following command:</p><pre class="screen">[user@host]<em class="hl-comment" style="color: silver"># </em><strong class="userinput"><code>cat /proc/sys/vm/min_free_kbytes</code></strong></pre><p>Next, raise the value. Try doubling, then quadrupling the value. Note that setting the
+ value too low or too high could have detrimental effects on your system. Consult your
+ operating system vendor for specific recommendations.</p><p>Use the following command to modify the value of <code class="code">min_free_kbytes</code>,
+ substituting <em class="replaceable"><code><value></code></em> with your intended value:</p><pre class="screen">[user@host]<em class="hl-comment" style="color: silver"># </em><strong class="userinput"><code>echo <value> > /proc/sys/vm/min_free_kbytes</code></strong></pre></div></div><div id="disqus_thread"></div><script type="text/javascript">
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="trouble.crypto.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="trouble.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="casestudies.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">15.18. Cryptographic Features </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 16. Apache HBase Case Studies</td></tr></table></div></body></html>
\ No newline at end of file
Added: hbase/hbase.apache.org/trunk/book/ch19s03.html
URL: http://svn.apache.org/viewvc/hbase/hbase.apache.org/trunk/book/ch19s03.html?rev=1620690&view=auto
==============================================================================
--- hbase/hbase.apache.org/trunk/book/ch19s03.html (added)
+++ hbase/hbase.apache.org/trunk/book/ch19s03.html Tue Aug 26 18:49:07 2014
@@ -0,0 +1,86 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>19.3. MRUnit</title><link rel="stylesheet" type="text/css" href="${baserdir}/src/main/site/resources/css/freebsd_docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="book.html" title="The Apache HBase™ Reference Guide"><link rel="up" href="unit.tests.html" title="Chapter 19. Unit Testing HBase Applications"><link rel="prev" href="mockito.html" title="19.2. Mockito"><link rel="next" href="ch19s04.html" title="19.4. Integration Testing with a HBase Mini-Cluster"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">19.3. MRUnit</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mockito.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Unit Testing HBase Applications</th><td width="20%" align="right"> <a acces
skey="n" href="ch19s04.html">Next</a></td></tr></table><hr></div><script type="text/javascript">
+ var disqus_shortname = 'hbase'; // required: replace example with your forum shortname
+ var disqus_url = 'http://hbase.apache.org/book/.html';
+ </script><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d4143e21438"></a>19.3. MRUnit</h2></div></div></div><p><a class="link" href="http://mrunit.apache.org/" target="_top">Apache MRUnit</a> is a library that
+ allows you to unit-test MapReduce jobs. You can use it to test HBase jobs in the same
+ way as other MapReduce jobs.</p><p>Given a MapReduce job that writes to an HBase table called <code class="literal">MyTest</code>,
+ which has one column family called <code class="literal">CF</code>, the reducer of such a job
+ could look like the following:</p><pre class="programlisting">
+<strong class="hl-keyword">public</strong> <strong class="hl-keyword">class</strong> MyReducer <strong class="hl-keyword">extends</strong> TableReducer<Text, Text, ImmutableBytesWritable> {
+ <strong class="hl-keyword">public</strong> <strong class="hl-keyword">static</strong> <strong class="hl-keyword">final</strong> <strong class="hl-keyword">byte</strong>[] CF = <strong class="hl-string"><em style="color:red">"CF"</em></strong>.getBytes();
+ <strong class="hl-keyword">public</strong> <strong class="hl-keyword">static</strong> <strong class="hl-keyword">final</strong> <strong class="hl-keyword">byte</strong>[] QUALIFIER = <strong class="hl-string"><em style="color:red">"CQ-1"</em></strong>.getBytes();
+ <strong class="hl-keyword">public</strong> <strong class="hl-keyword">void</strong> reduce(Text key, Iterable<Text> values, Context context) <strong class="hl-keyword">throws</strong> IOException, InterruptedException {
+ <em class="hl-comment" style="color: silver">//bunch of processing to extract data to be inserted, in our case, lets say we are simply</em>
+ <em class="hl-comment" style="color: silver">//appending all the records we receive from the mapper for this particular</em>
+ <em class="hl-comment" style="color: silver">//key and insert one record into HBase</em>
+ StringBuffer data = <strong class="hl-keyword">new</strong> StringBuffer();
+ Put put = <strong class="hl-keyword">new</strong> Put(Bytes.toBytes(key.toString()));
+ <strong class="hl-keyword">for</strong> (Text val : values) {
+ data = data.append(val);
+ }
+ put.add(CF, QUALIFIER, Bytes.toBytes(data.toString()));
+ <em class="hl-comment" style="color: silver">//write to HBase</em>
+ context.write(<strong class="hl-keyword">new</strong> ImmutableBytesWritable(Bytes.toBytes(key.toString())), put);
+ }
+ }
+ </pre><p>To test this code, the first step is to add a dependency to MRUnit to your Maven POM
+ file. </p><pre class="programlisting">
+<strong class="hl-tag" style="color: #000096"><dependency></strong>
+ <strong class="hl-tag" style="color: #000096"><groupId></strong>org.apache.mrunit<strong class="hl-tag" style="color: #000096"></groupId></strong>
+ <strong class="hl-tag" style="color: #000096"><artifactId></strong>mrunit<strong class="hl-tag" style="color: #000096"></artifactId></strong>
+ <strong class="hl-tag" style="color: #000096"><version></strong>1.0.0 <strong class="hl-tag" style="color: #000096"></version></strong>
+ <strong class="hl-tag" style="color: #000096"><scope></strong>test<strong class="hl-tag" style="color: #000096"></scope></strong>
+<strong class="hl-tag" style="color: #000096"></dependency></strong>
+ </pre><p>Next, use the ReducerDriver provided by MRUnit, in your Reducer job.</p><pre class="programlisting">
+<strong class="hl-keyword">public</strong> <strong class="hl-keyword">class</strong> MyReducerTest {
+ ReduceDriver<Text, Text, ImmutableBytesWritable, Writable> reduceDriver;
+ <strong class="hl-keyword">byte</strong>[] CF = <strong class="hl-string"><em style="color:red">"CF"</em></strong>.getBytes();
+ <strong class="hl-keyword">byte</strong>[] QUALIFIER = <strong class="hl-string"><em style="color:red">"CQ-1"</em></strong>.getBytes();
+
+ <em><span class="hl-annotation" style="color: gray">@Before</span></em>
+ <strong class="hl-keyword">public</strong> <strong class="hl-keyword">void</strong> setUp() {
+ MyReducer reducer = <strong class="hl-keyword">new</strong> MyReducer();
+ reduceDriver = ReduceDriver.newReduceDriver(reducer);
+ }
+
+ <em><span class="hl-annotation" style="color: gray">@Test</span></em>
+ <strong class="hl-keyword">public</strong> <strong class="hl-keyword">void</strong> testHBaseInsert() <strong class="hl-keyword">throws</strong> IOException {
+ String strKey = <strong class="hl-string"><em style="color:red">"RowKey-1"</em></strong>, strValue = <strong class="hl-string"><em style="color:red">"DATA"</em></strong>, strValue1 = <strong class="hl-string"><em style="color:red">"DATA1"</em></strong>,
+strValue2 = <strong class="hl-string"><em style="color:red">"DATA2"</em></strong>;
+ List<Text> list = <strong class="hl-keyword">new</strong> ArrayList<Text>();
+ list.add(<strong class="hl-keyword">new</strong> Text(strValue));
+ list.add(<strong class="hl-keyword">new</strong> Text(strValue1));
+ list.add(<strong class="hl-keyword">new</strong> Text(strValue2));
+ <em class="hl-comment" style="color: silver">//since in our case all that the reducer is doing is appending the records that the mapper </em>
+ <em class="hl-comment" style="color: silver">//sends it, we should get the following back</em>
+ String expectedOutput = strValue + strValue1 + strValue2;
+ <em class="hl-comment" style="color: silver">//Setup Input, mimic what mapper would have passed</em>
+ <em class="hl-comment" style="color: silver">//to the reducer and run test</em>
+ reduceDriver.withInput(<strong class="hl-keyword">new</strong> Text(strKey), list);
+ <em class="hl-comment" style="color: silver">//run the reducer and get its output</em>
+ List<Pair<ImmutableBytesWritable, Writable>> result = reduceDriver.run();
+
+ <em class="hl-comment" style="color: silver">//extract key from result and verify</em>
+ assertEquals(Bytes.toString(result.get(<span class="hl-number">0</span>).getFirst().get()), strKey);
+
+ <em class="hl-comment" style="color: silver">//extract value for CF/QUALIFIER and verify</em>
+ Put a = (Put)result.get(<span class="hl-number">0</span>).getSecond();
+ String c = Bytes.toString(a.get(CF, QUALIFIER).get(<span class="hl-number">0</span>).getValue());
+ assertEquals(expectedOutput,c );
+ }
+
+}
+ </pre><p>Your MRUnit test verifies that the output is as expected, the Put that is inserted
+ into HBase has the correct value, and the ColumnFamily and ColumnQualifier have the
+ correct values.</p><p>MRUnit includes a MapperDriver to test mapping jobs, and you can use MRUnit to test
+ other operations, including reading from HBase, processing data, or writing to
+ HDFS,</p></div><div id="disqus_thread"></div><script type="text/javascript">
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mockito.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="unit.tests.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch19s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">19.2. Mockito </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> 19.4. Integration Testing with a HBase Mini-Cluster</td></tr></table></div></body></html>
\ No newline at end of file
Added: hbase/hbase.apache.org/trunk/book/ch19s04.html
URL: http://svn.apache.org/viewvc/hbase/hbase.apache.org/trunk/book/ch19s04.html?rev=1620690&view=auto
==============================================================================
--- hbase/hbase.apache.org/trunk/book/ch19s04.html (added)
+++ hbase/hbase.apache.org/trunk/book/ch19s04.html Tue Aug 26 18:49:07 2014
@@ -0,0 +1,84 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>19.4. Integration Testing with a HBase Mini-Cluster</title><link rel="stylesheet" type="text/css" href="${baserdir}/src/main/site/resources/css/freebsd_docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="book.html" title="The Apache HBase™ Reference Guide"><link rel="up" href="unit.tests.html" title="Chapter 19. Unit Testing HBase Applications"><link rel="prev" href="ch19s03.html" title="19.3. MRUnit"><link rel="next" href="zookeeper.html" title="Chapter 20. ZooKeeper"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">19.4. Integration Testing with a HBase Mini-Cluster</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch19s03.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Unit Testing HBase Applica
tions</th><td width="20%" align="right"> <a accesskey="n" href="zookeeper.html">Next</a></td></tr></table><hr></div><script type="text/javascript">
+ var disqus_shortname = 'hbase'; // required: replace example with your forum shortname
+ var disqus_url = 'http://hbase.apache.org/book/.html';
+ </script><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d4143e21467"></a>19.4. Integration Testing with a HBase Mini-Cluster</h2></div></div></div><p>HBase ships with HBaseTestingUtility, which makes it easy to write integration tests
+ using a <em class="firstterm">mini-cluster</em>. The first step is to add some dependencies
+ to your Maven POM file. Check the versions to be sure they are appropriate.</p><pre class="programlisting">
+<strong class="hl-tag" style="color: #000096"><dependency></strong>
+ <strong class="hl-tag" style="color: #000096"><groupId></strong>org.apache.hadoop<strong class="hl-tag" style="color: #000096"></groupId></strong>
+ <strong class="hl-tag" style="color: #000096"><artifactId></strong>hadoop-common<strong class="hl-tag" style="color: #000096"></artifactId></strong>
+ <strong class="hl-tag" style="color: #000096"><version></strong>2.0.0<strong class="hl-tag" style="color: #000096"></version></strong>
+ <strong class="hl-tag" style="color: #000096"><type></strong>test-jar<strong class="hl-tag" style="color: #000096"></type></strong>
+ <strong class="hl-tag" style="color: #000096"><scope></strong>test<strong class="hl-tag" style="color: #000096"></scope></strong>
+<strong class="hl-tag" style="color: #000096"></dependency></strong>
+
+<strong class="hl-tag" style="color: #000096"><dependency></strong>
+ <strong class="hl-tag" style="color: #000096"><groupId></strong>org.apache.hbase<strong class="hl-tag" style="color: #000096"></groupId></strong>
+ <strong class="hl-tag" style="color: #000096"><artifactId></strong>hbase<strong class="hl-tag" style="color: #000096"></artifactId></strong>
+ <strong class="hl-tag" style="color: #000096"><version></strong>0.98.3<strong class="hl-tag" style="color: #000096"></version></strong>
+ <strong class="hl-tag" style="color: #000096"><type></strong>test-jar<strong class="hl-tag" style="color: #000096"></type></strong>
+ <strong class="hl-tag" style="color: #000096"><scope></strong>test<strong class="hl-tag" style="color: #000096"></scope></strong>
+<strong class="hl-tag" style="color: #000096"></dependency></strong>
+
+<strong class="hl-tag" style="color: #000096"><dependency></strong>
+ <strong class="hl-tag" style="color: #000096"><groupId></strong>org.apache.hadoop<strong class="hl-tag" style="color: #000096"></groupId></strong>
+ <strong class="hl-tag" style="color: #000096"><artifactId></strong>hadoop-hdfs<strong class="hl-tag" style="color: #000096"></artifactId></strong>
+ <strong class="hl-tag" style="color: #000096"><version></strong>2.0.0<strong class="hl-tag" style="color: #000096"></version></strong>
+ <strong class="hl-tag" style="color: #000096"><type></strong>test-jar<strong class="hl-tag" style="color: #000096"></type></strong>
+ <strong class="hl-tag" style="color: #000096"><scope></strong>test<strong class="hl-tag" style="color: #000096"></scope></strong>
+<strong class="hl-tag" style="color: #000096"></dependency></strong>
+
+<strong class="hl-tag" style="color: #000096"><dependency></strong>
+ <strong class="hl-tag" style="color: #000096"><groupId></strong>org.apache.hadoop<strong class="hl-tag" style="color: #000096"></groupId></strong>
+ <strong class="hl-tag" style="color: #000096"><artifactId></strong>hadoop-hdfs<strong class="hl-tag" style="color: #000096"></artifactId></strong>
+ <strong class="hl-tag" style="color: #000096"><version></strong>2.0.0<strong class="hl-tag" style="color: #000096"></version></strong>
+ <strong class="hl-tag" style="color: #000096"><scope></strong>test<strong class="hl-tag" style="color: #000096"></scope></strong>
+<strong class="hl-tag" style="color: #000096"></dependency></strong>
+ </pre><p>This code represents an integration test for the MyDAO insert shown in <a class="xref" href="unit.tests.html" title="Chapter 19. Unit Testing HBase Applications">Chapter 19, <i>Unit Testing HBase Applications</i></a>.</p><pre class="programlisting">
+<strong class="hl-keyword">public</strong> <strong class="hl-keyword">class</strong> MyHBaseIntegrationTest {
+ <strong class="hl-keyword">private</strong> <strong class="hl-keyword">static</strong> HBaseTestingUtility utility;
+ <strong class="hl-keyword">byte</strong>[] CF = <strong class="hl-string"><em style="color:red">"CF"</em></strong>.getBytes();
+ <strong class="hl-keyword">byte</strong>[] QUALIFIER = <strong class="hl-string"><em style="color:red">"CQ-1"</em></strong>.getBytes();
+
+ <em><span class="hl-annotation" style="color: gray">@Before</span></em>
+ <strong class="hl-keyword">public</strong> <strong class="hl-keyword">void</strong> setup() <strong class="hl-keyword">throws</strong> Exception {
+ utility = <strong class="hl-keyword">new</strong> HBaseTestingUtility();
+ utility.startMiniCluster();
+ }
+
+ <em><span class="hl-annotation" style="color: gray">@Test</span></em>
+ <strong class="hl-keyword">public</strong> <strong class="hl-keyword">void</strong> testInsert() <strong class="hl-keyword">throws</strong> Exception {
+ HTableInterface table = utility.createTable(Bytes.toBytes(<strong class="hl-string"><em style="color:red">"MyTest"</em></strong>),
+ Bytes.toBytes(<strong class="hl-string"><em style="color:red">"CF"</em></strong>));
+ HBaseTestObj obj = <strong class="hl-keyword">new</strong> HBaseTestObj();
+ obj.setRowKey(<strong class="hl-string"><em style="color:red">"ROWKEY-1"</em></strong>);
+ obj.setData1(<strong class="hl-string"><em style="color:red">"DATA-1"</em></strong>);
+ obj.setData2(<strong class="hl-string"><em style="color:red">"DATA-2"</em></strong>);
+ MyHBaseDAO.insertRecord(table, obj);
+ Get get1 = <strong class="hl-keyword">new</strong> Get(Bytes.toBytes(obj.getRowKey()));
+ get1.addColumn(CF, CQ1);
+ Result result1 = table.get(get1);
+ assertEquals(Bytes.toString(result1.getRow()), obj.getRowKey());
+ assertEquals(Bytes.toString(result1.value()), obj.getData1());
+ Get get2 = <strong class="hl-keyword">new</strong> Get(Bytes.toBytes(obj.getRowKey()));
+ get2.addColumn(CF, CQ2);
+ Result result2 = table.get(get2);
+ assertEquals(Bytes.toString(result2.getRow()), obj.getRowKey());
+ assertEquals(Bytes.toString(result2.value()), obj.getData2());
+ }
+}
+ </pre><p>This code creates an HBase mini-cluster and starts it. Next, it creates a table called
+ <code class="literal">MyTest</code> with one column family, <code class="literal">CF</code>. A record is
+ inserted, a Get is performed from the same table, and the insertion is verified.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Starting the mini-cluster takes about 20-30 seconds, but that should be
+ appropriate for integration testing. </p></div><p>To use an HBase mini-cluster on Microsoft Windows, you need to use a Cygwin
+ environment.</p><p>See the paper at <a class="link" href="http://blog.sematext.com/2010/08/30/hbase-case-study-using-hbasetestingutility-for-local-testing-development/" target="_top">HBase Case-Study: Using HBaseTestingUtility for Local Testing and
+ Development</a> (2010) for more information about HBaseTestingUtility.</p></div><div id="disqus_thread"></div><script type="text/javascript">
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch19s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="unit.tests.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="zookeeper.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">19.3. MRUnit </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 20. ZooKeeper</td></tr></table></div></body></html>
\ No newline at end of file
Added: hbase/hbase.apache.org/trunk/book/hbase.rc.voting.html
URL: http://svn.apache.org/viewvc/hbase/hbase.apache.org/trunk/book/hbase.rc.voting.html?rev=1620690&view=auto
==============================================================================
--- hbase/hbase.apache.org/trunk/book/hbase.rc.voting.html (added)
+++ hbase/hbase.apache.org/trunk/book/hbase.rc.voting.html Tue Aug 26 18:49:07 2014
@@ -0,0 +1,24 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>18.6. Voting on Release Candidates</title><link rel="stylesheet" type="text/css" href="${baserdir}/src/main/site/resources/css/freebsd_docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="book.html" title="The Apache HBase™ Reference Guide"><link rel="up" href="developer.html" title="Chapter 18. Building and Developing Apache HBase"><link rel="prev" href="releasing.html" title="18.5. Releasing Apache HBase"><link rel="next" href="documentation.html" title="18.7. Generating the HBase Reference Guide"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">18.6. Voting on Release Candidates</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="releasing.html">Prev</a> </td><th width="60%" align="center">Chapter 18. Building and Dev
eloping Apache HBase</th><td width="20%" align="right"> <a accesskey="n" href="documentation.html">Next</a></td></tr></table><hr></div><script type="text/javascript">
+ var disqus_shortname = 'hbase'; // required: replace example with your forum shortname
+ var disqus_url = 'http://hbase.apache.org/book/hbase.rc.voting.html';
+ </script><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="hbase.rc.voting"></a>18.6. Voting on Release Candidates</h2></div></div></div><p> Everyone is encouraged to try and vote on HBase release candidates. Only the votes of
+ PMC members are binding. PMC members, please read this WIP doc on policy voting for a
+ release candidate, <a class="link" href="https://github.com/rectang/asfrelease/blob/master/release.md" target="_top">Release
+ Policy</a>. <span class="quote">“<span class="quote">Before casting +1 binding votes, individuals are required to
+ download the signed source code package onto their own hardware, compile it as
+ provided, and test the resulting executable on their own platform, along with also
+ validating cryptographic signatures and verifying that the package meets the
+ requirements of the ASF policy on releases.</span>”</span> Regards the latter, run
+ <span class="command"><strong>mvn apache-rat:check</strong></span> to verify all files are suitably licensed.
+ See <a class="link" href="http://search-hadoop.com/m/DHED4dhFaU" target="_top">HBase, mail # dev - On
+ recent discussion clarifying ASF release policy</a>. for how we arrived at this
+ process. </p></div><div id="disqus_thread"></div><script type="text/javascript">
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="releasing.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="developer.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="documentation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">18.5. Releasing Apache HBase </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> 18.7. Generating the HBase Reference Guide</td></tr></table></div></body></html>
\ No newline at end of file