-
Notifications
You must be signed in to change notification settings - Fork 39
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
What's the correct way to create/migrate hbase tables using this gem? #95
Comments
Even using the raw adapter throws exception require 'massive_record'
conn = MassiveRecord::Wrapper::Connection.new(:host => '127.0.0.1', :port => 9090)
# => #<MassiveRecord::Adapters::Thrift::Connection:0x007fedbc5f0d50 @timeout=4000, @host="127.0.0.1", @port=9090, @instru..
conn.open
# => true
table = MassiveRecord::Wrapper::Table.new(conn, :people)
# => #<MassiveRecord::Adapters::Thrift::Table:0x007fedbc4f2b38 @connec....
column = MassiveRecord::Wrapper::ColumnFamily.new(:info)
# => #<MassiveRecord::Adapters::Thrift::ColumnFamily:0x007fedbc4e19c8 @name=:info, @max_versions=10, @columns=[]>
table.column_families.push(column)
# => [#<MassiveRecord::Adapters::Thrift::ColumnFamily:0x007fedbc4e19c8 @name=:info, @max_versions=10, @columns=[]>]
table.save
# Abort trap: 6 !! If I skip the |
I am on ruby 2.1.5. Could that be a pain? I tried downgrading and using 1.9.3 (since rvm couldn't find anything for 1.9.2) and most of my app is designed for ruby > 2.1. So downgrading doesn't look like an option here. |
Sorry we haven't tested with ruby > 1.9.3. It might not work there. Using the ORM, tables are created (with column families) whenever you perform an action toward the database. It will look up for the table name in the list of existing tables, and create it if missing. |
In the meanwhile, I have this gist which provides a work around this problem. |
So, I have been struggling to create a new hbase table using the gem. My model schema and code goes like
I tried a bunch of other similar methods, but I am unable to create a table with appropriate column family. What am I missing here? I am using the cloudera version of hbase.
The text was updated successfully, but these errors were encountered: