HBASE-2889 Tool to look at HLogs -- parse and tail -f; added part 1, some fixup of hlog main; added a bit of documentation on hlog tool

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@995233 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-09-08 19:57:16 +00:00
parent 74066765bb
commit bd7e091b2d
1 changed files with 17 additions and 0 deletions

View File

@ -661,5 +661,22 @@
</footnote></para>
</section>
</section>
<section>
<title>WAL Tools</title>
<section>
<title><classname>HLog</classname> main</title>
<para>The main method on <classname>HLog</classname> offers manual split and dump facilities.
</para>
<para>
You can get a textual dump of a WAL file content by doing the following:
<code>bin/hbase org.apache.hadoop.hbase.regionserver.wal.HLog --dump hdfs://example.org:9000/hbase/.logs/example.org,60020,1283516293161/10.10.21.10%3A60020.1283973724012</code>
The return code will be non-zero if issues with the file so you can test wholesomeness of file by
redirecting <varname>STDOUT</varname> to <code>/dev/null</code> and testing the program return.
</para>
<para>Similarily you can force a split of a log file directory by doing
<code>bin/hbase org.apache.hadoop.hbase.regionserver.wal.HLog --split hdfs://example.org:9000/hbase/.logs/example.org,60020,1283516293161/</code>
</para>
</section>
</section>
</chapter>
</book>