HBase Thrift interface for Ruby
Latest commit cc8a323 Jul 20, 2012 @bmuller fixed Gemfile
Failed to load latest commit information.
lib Reverting back to HBase 0.20 Feb 28, 2012
.gitignore now using gemspec file Aug 1, 2011
Gemfile.lock fixed Gemfile Jul 20, 2012
README.rdoc Backing out regionserver-based filter support Feb 28, 2012
Rakefile Moving the require of rake into the rakefile Feb 29, 2012


hbaserb – HBase Thrift interface for Ruby

A Ruby thrift lib for interfacing with Hadoop's HBase 0.92.0

To install:

gem install hbaserb

Basic Usage

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'}

# delete some data
table.mutate_row 'myrow', {'colfamone:myvalue' => nil}

# 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('my-start-row', 'my-end-row', 'colfamnone') { |row|
  puts "Columns: #{row.columns.keys}"