Book Image

Learning HBase

By : Shashwat Shriparv
Book Image

Learning HBase

By: Shashwat Shriparv

Overview of this book

Table of Contents (18 chapters)
Learning HBase
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up the environment for development


Start your IDE. From here, we will consider Eclipse as a development IDE. So, start Eclipse and create a new Java project. Once the project is created, add JAR files to the project needed for development. We will go through this process step by step.

Building a Java client to code in HBase

HBase provides HTable as a client that is responsible for finding RegionServers where a particular data is present. It is done by reading the HBase metadata, hbase:meta (called .META. in the older versions of HBase), which includes a key-value pair.

Let's discuss the format in short here:

  • Key: It contains region key information about the table, region, and region ID in the following format:

    [table], [region start key], [region id]
  • Value: This contains info:regioninfo (org.apache.hadoop.hbase.HRegionInfo with fields such as table name, start key, regionID, replicaID, encoded name, end key, split, and offline), info:server (the server port for RegionServer), and info...