Book Image

Hadoop Essentials

By : Shiva Achari
Book Image

Hadoop Essentials

By: Shiva Achari

Overview of this book

This book jumps into the world of Hadoop and its tools, to help you learn how to use them effectively to optimize and improve the way you handle Big Data. Starting with the fundamentals Hadoop YARN, MapReduce, HDFS, and other vital elements in the Hadoop ecosystem, you will soon learn many exciting topics such as MapReduce patterns, data management, and real-time data analysis using Hadoop. You will also explore a number of the leading data processing tools including Hive and Pig, and learn how to use Sqoop and Flume, two of the most powerful technologies used for data ingestion. With further guidance on data streaming and real-time analytics with Storm and Spark, Hadoop Essentials is a reliable and relevant resource for anyone who understands the difficulties - and opportunities - presented by Big Data today. With this guide, you'll develop your confidence with Hadoop, and be able to use the knowledge and skills you learn to successfully harness its unparalleled capabilities.
Table of Contents (15 chapters)
Hadoop Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
3
Pillars of Hadoop – HDFS, MapReduce, and YARN
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...