Skip to content

Instantly share code, notes, and snippets.

@terrancesnyder
Created May 12, 2013 21:52
Show Gist options
  • Save terrancesnyder/5565050 to your computer and use it in GitHub Desktop.
Save terrancesnyder/5565050 to your computer and use it in GitHub Desktop.
hbase shell commands
# create our table
create 'impressions', { NAME => 'event', COMPRESSION => 'LZO' }
# see what's inside it
describe 'impressions'
# add some data
put 'impressions', '20130512', 'event:type', 'click'
put 'impressions', '20130512', 'event:ad', '1234'
put 'impressions', '20130512', 'event:campaign', '9283372'
# get all rows
scan 'impressions'
# get command
get 'impressions', '20130512'
get 'impressions', '20130512', { COLUMN => 'event:campaign' }
# remove an entire row
deleteall 'impressions', '20130512'
@terrancesnyder
Copy link
Author

@terrancesnyder
Copy link
Author

@terrancesnyder
Copy link
Author

@terrancesnyder
Copy link
Author

Probably just want to create a UDF(..) for HLL/BF logic.

http://phoenix-hbase.blogspot.com/2013/04/how-to-add-your-own-built-in-function.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment