Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hadoop Essentials

You're reading from  Hadoop Essentials

Product type Book
Published in Apr 2015
Publisher Packt
ISBN-13 9781784396688
Pages 194 pages
Edition 1st Edition
Languages
Author (1):
Shiva Achari Shiva Achari
Profile icon Shiva Achari

Table of Contents (15) Chapters

Hadoop Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
1. Introduction to Big Data and Hadoop 2. Hadoop Ecosystem 3. Pillars of Hadoop – HDFS, MapReduce, and YARN 4. Data Access Components – Hive and Pig 5. Storage Component – HBase 6. Data Ingestion in Hadoop – Sqoop and Flume 7. Streaming and Real-time Analysis – Storm and Spark Index

Commands


To enter in HBase shell mode, use the following:

$ ${HBASE_HOME}/bin/hbase shell
.
.
HBase Shell; 
hbase>

You can use help to get a list of all commands.

help

hbase> help
HBASE SHELL COMMANDS:

Create

Used for creating a new table in HBase. For now we will stick to the simplest version which is as follows:

hbase> create 'test', 'cf'
0 row(s) in 1.2200 seconds

List

Use the list command to display the list of tables created, which is as follows:

hbase> list 'test'
TABLE
test
1 row(s) in 0.0350 seconds

=> ["test"]

Put

To put data into your table, use the put command:

hbase> put 'test', 'row1', 'cf:a', 'value1'
0 row(s) in 0.1770 seconds

hbase> put 'test', 'row2', 'cf:b', 'value2'
0 row(s) in 0.0160 seconds
hbase> put 'test', 'row3', 'cf:c', 'value3'
0 row(s) in 0.0260 seconds

Scan

The Scan command is used to scan the table for data. You can limit your scan, but for now, all data is fetched:

hbase> scan 'test'
ROW       COLUMN+CELL
 row1     column=cf:a, timestamp...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}