Ruby Client To Run SQL Of Apache Phoenix.
Gemfile
gem 'ruby-phoenix', require: 'phoenix'
1, Install Java jar file
rake phoenix:install
2, config Hbase host and port
vi config/phoenix.yml
1, define Model
class StYunosAppCenterCntNew < Phoenix::Base
end
2.1, Run SQL
sql = "select * from ST_YUNOS_APP_CENTER_CNT_NEW limit 10"
results = Phoenix::Rjb.execute(sql)
2.2, OR Use Model Like ActiveRecord
StYunosAppCenterCntNew.all
That's ALL, Enjoy It!!!