Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timestamps #1

Open
cambridgemike opened this issue Jan 5, 2010 · 1 comment
Open

timestamps #1

cambridgemike opened this issue Jan 5, 2010 · 1 comment

Comments

@cambridgemike
Copy link

Perhaps I'm misunderstanding something, but timestamps are not working the way I would expect them to

client.create_row("my_table","key1", Time.now.to_i, [{:name=>"name", :value=>"value"}])

row = client.show_row("my_table","key1")
=> #<HBase::Model::Row:0x105e2ce98 @name="key1", @columns=[#<HBase::Model::Column:0x105e2d028 @name="name", @timestamp=1262699564874, @value="value">], @timestamp=nil, @table_name="my_table", @total_count=0>

Time.at(row.columns.first.timestamp)
=> Wed May 11 02:07:54 -0500 41983

From the source I don't see where this column timestamp gets set, and I'm confused as to why the row timestamp is nil

@greglu
Copy link

greglu commented Jan 5, 2010

Hm, I didn't catch this in the Row model when I was updating the project. Either way, HBase::Model::Row should not have the attribute "timestamp" associated to it. Timestamps exist only at the column level (HBase::Model::Column), and this is from the design of BigTable. In the next update of hbase-ruby, I'll be removing the timestamp attribute from the Row model.

If you're curious as to where the timestamp is getting set on the Column objects, it's on line 28 of lib/hbase/response/row_response.rb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants