Welcome to our HBase tutorial! In this lesson, we'll dive into the world of NoSQL databases, focusing on HBase – a powerful, open-source, non-relational database modeled after Google's Bigtable. Let's get started!
HBase is a column-oriented, distributed database that runs on top of Apache Hadoop HDFS (Hadoop Distributed File System). It is designed to handle structured and semi-structured data, offering high scalability, high availability, and high performance.
Why HBase?
Table, Row, and Column Family
Cell
Region Server
Master Node
Follow our comprehensive guide on Installing HBase.
The HBase Shell is a command-line interface for interacting with HBase. Let's create a simple table:
hbase(main):001:0> create 'Students', 'info'What happened?
We created a new table named Students with a column family called info.
Now, let's add some data:
hbase(main):002:0> put 'Students', 'Alice', 'name', 'Alice Smith'
hbase(main):003:0> put 'Students', 'Alice', 'age', '25'
hbase(main):004:0> put 'Students', 'Bob', 'name', 'Bob Johnson'
hbase(main):005:0> put 'Students', 'Bob', 'age', '30'Now, let's retrieve data:
hbase(main):006:0> get 'Students', 'Alice'
TIMESTAMP 1642208800000 1642208800000 1642208800000 hadoop wc -l /user/hadoop/input/
ROW Alice rowkey=Alice Alice Smith
ROW Alice rowkey=Alice 25
hbase(main):007:0> get 'Students', 'Bob'
TIMESTAMP 1642208800000 1642208800000 1642208800000 hadoop wc -l /user/hadoop/input/
ROW Bob rowkey=Bob Bob Johnson
ROW Bob rowkey=Bob 30We've covered the basics of HBase, including its purpose, key concepts, and a simple example of data manipulation. In the next tutorial, we'll dive deeper into HBase's data model and more advanced features.
Stay tuned and keep learning! 🎉