From 1f989c851247115784d5bc877341f1e8d7ff5f98 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 24 Aug 2018 18:09:30 -0700 Subject: HOWTO some common hbase shell queries --- hbase/howto.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'hbase') 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'} -- cgit v1.2.3