diff options
author | Bryan Newbold <bnewbold@archive.org> | 2018-08-24 18:09:30 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2018-08-24 18:09:30 -0700 |
commit | 1f989c851247115784d5bc877341f1e8d7ff5f98 (patch) | |
tree | 128cb837ba3ee4a400070225553495fda201e37c | |
parent | b4c7b7fdc2537f4defb742e2b7b9de4524adf174 (diff) | |
download | sandcrawler-1f989c851247115784d5bc877341f1e8d7ff5f98.tar.gz sandcrawler-1f989c851247115784d5bc877341f1e8d7ff5f98.zip |
HOWTO some common hbase shell queries
-rw-r--r-- | hbase/howto.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hbase/howto.md b/hbase/howto.md index fcf561f..26d33f4 100644 --- a/hbase/howto.md +++ b/hbase/howto.md @@ -26,3 +26,17 @@ To interact with this config, use happybase (python) config: # Test connection conn.tables() +## Queries From Shell + +Fetch all columns for a single row: + + hbase> get 'wbgrp-journal-extract-0-qa', 'sha1:3I42H3S6NNFQ2MSVX7XZKYAYSCX5QBYJ' + +Fetch multiple columns for a single row, using column families: + + hbase> get 'wbgrp-journal-extract-0-qa', 'sha1:3I42H3S6NNFQ2MSVX7XZKYAYSCX5QBYJ', 'f', 'file' + +Scan a fixed number of rows (here 5) starting at a specific key prefix, all +columns: + + hbase> scan 'wbgrp-journal-extract-0-qa',{LIMIT=>5,STARTROW=>'sha1:A'} |