greglu/hbase-stargate — Issue #11: bug of create_row?
Author: creatstar
Created: 2011-11-16 07:20:09+00:00
State: open

Here is a simple test code,

require 'rubygems'
require 'stargate'

# Direct connection
client = Stargate::Client.new("http://localhost:8080") # this url is the default for stargate.

# Table Operation
client.delete_table('users') # delete 'users' table
table = client.create_table('users', 'habbit') # create a table whose column_family is habbit
#table = client.show_table('users') # show the meta info of table users

# Row Operation
row = client.create_row('users', 'sishen', 2, {:name => 'habbit:football', :value => 'i like football'}) # create the row 'sishen' with the data in the table 'users'
row = client.create_row('users', 'sishen', 1, {:name => 'habbit:football', :value => 'i like basketball'}) # create the row 'sishen' with the data in the table 'users'

there should be two record with the same row key and different timestamp, right? But i only get one,
hbase(main):030:0> scan 'users'
ROW COLUMN+CELL
sishen column=habbit:football, timestamp=2, value=i like football
1 row(s) in 1.0410 seconds

Is it a bug?