<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> <title>File: README.rdoc [HBaseRb - Ruby HBase interface that uses thrift]</title> <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" /> <script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script> <script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script> <script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script> <script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script> </head> <body class="file"> <div id="metadata"> <div id="home-metadata"> <div id="home-section" class="section"> <h3 class="section-header"> <a href="./index.html">Home</a> <a href="./index.html#classes">Classes</a> <a href="./index.html#methods">Methods</a> </h3> </div> </div> <div id="project-metadata"> <div id="fileindex-section" class="section project-section"> <h3 class="section-header">Files</h3> <ul> <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li> </ul> </div> <div id="classindex-section" class="section project-section"> <h3 class="section-header">Class Index <span class="search-toggle"><img src="./images/find.png" height="16" width="16" alt="[+]" title="show/hide quicksearch" /></span></h3> <form action="#" method="get" accept-charset="utf-8" class="initially-hidden"> <fieldset> <legend>Quicksearch</legend> <input type="text" name="quicksearch" value="" class="quicksearch-field" /> </fieldset> </form> <ul class="link-list"> <li><a href="./Apache.html">Apache</a></li> <li><a href="./Apache/Hadoop.html">Apache::Hadoop</a></li> <li><a href="./Apache/Hadoop/Hbase.html">Apache::Hadoop::Hbase</a></li> <li><a href="./Apache/Hadoop/Hbase/Thrift.html">Apache::Hadoop::Hbase::Thrift</a></li> <li><a href="./Apache/Hadoop/Hbase/Thrift/TCell.html">Apache::Hadoop::Hbase::Thrift::TCell</a></li> <li><a href="./HBaseRb.html">HBaseRb</a></li> <li><a href="./HBaseRb/Client.html">HBaseRb::Client</a></li> <li><a href="./HBaseRb/NoSuchTable.html">HBaseRb::NoSuchTable</a></li> <li><a href="./HBaseRb/Scanner.html">HBaseRb::Scanner</a></li> <li><a href="./HBaseRb/Table.html">HBaseRb::Table</a></li> <li><a href="./HBaseRB.html">HBaseRB</a></li> </ul> <div id="no-class-search-results" style="display: none;">No matching classes.</div> </div> </div> </div> <div id="documentation"> <h1>hbaserb – HBase Thrift interface for Ruby</h1> <p>A Ruby thrift lib for interfacing with Hadoop’s HBase</p> <p>To install:</p> <pre>gem install hbaserb</pre> <h2>Basic Usage</h2> <pre>require 'rubygems' require 'hbaserb' client = HBaseRb::Client.new 'localhost' # create table with two column families table = client.create_table "test_table", "colfamone", "colfamtwo" # insert some data table.mutate_row 'myrow', {'colfamone:myvalue' => 'awesome value'} # get it puts t.get('myrow', 'colfamone:myvalue').first.value # get timestamp puts t.get('myrow', 'colfamone:myvalue').first.timestamp # convert binary value to 64 bit integer t.atomic_increment('myrow', 'colfamtwo:counter') puts t.get('myrow', 'colfamtwo:counter').first.to_i64 # make a scanner s = t.create_scanner('myrow', 'colfamnone') { |row| puts "Columns: #{row.columns.keys}" }</pre> </div> <div id="validator-badges"> <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 2</small>.</p> </div> </body> </html>