Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Prerequisite
3.
Steps
3.1.
Step-1 (Extraction of files)
3.2.
Step-2 (Creating Folder)
3.3.
Step-3 (Deleting line in HBase.cmd)
3.4.
Step-4 (Add lines in hbase-env.cmd)
3.5.
Step-5 (Add the line in Hbase-site.xml)
3.6.
Step-6 (Setting Environment Variables)
4.
FAQs
5.
Key Takeaways
Last Updated: Mar 27, 2024

Hbase-Installation on Windows

Master Python: Predicting weather forecasts
Speaker
Ashwin Goyal
Product Manager @

Introduction

In earlier decades, produced data was organized and far less in quantity than now. These types of data were stored using RDMS. However, we now process a vast volume of semi-structured data such as emails, JSONs, XML,.csv files, and so on. HBase was introduced when RDMS failed to store and handle this data.

HBase is a data format equivalent to Google's big table that allows for speedy random access to massive volumes of structured data. HBase is a Java-based open-source, multidimensional, distributed, and scalable NoSQL database that works on top of HDFS (Hadoop Distributed File System). It is intended to hold a massive number of sparse data sets. It enables users to obtain information in real-time.HBase is a column-oriented database that stores data in tables. Only column families are defined in the HBase table structure. The HBase database is divided into families, and each family can contain an infinite number of columns. The column values are successively saved on a disc. Each table cell has a timestamp.​​

In this blog, we will learn how to set up Hbase in the window operating system.

Also see, Multiple Granularity in DBMS

Prerequisite

  • Install Java JDK - You can download it from this link. (https://www.oracle.com/java/technologies/downloads/)
    The Java Development Kit (JDK) is a cross-platform software development environment that includes tools and libraries for creating Java-based software applications and applets.
     
  • Download Hbase - Download Apache Hbase from this link.
    (https://hbase.apache.org/downloads.html)

 

Must Read Apache Server

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Steps

Step-1 (Extraction of files)

Extract all the files in C drive

Step-2 (Creating Folder)

Create folders named "hbase" and "zookeeper."

Step-3 (Deleting line in HBase.cmd)

Open hbase.cmd in any text editor. 

Search for line %HEAP_SETTINGS% and remove it.

Step-4 (Add lines in hbase-env.cmd)

Now open hbase-env.cmd, which is in the conf folder in any text editor.

Add the below lines in the file after the comment session. 

set JAVA_HOME=%JAVA_HOME%

set HBASE_CLASSPATH=%HBASE_HOME%\lib\client-facing-thirdparty\*

set HBASE_HEAPSIZE=8000

set HBASE_OPTS="-XX:+UseConcMarkSweepGC" "-Djava.net.preferIPv4Stack=true"

set SERVER_GC_OPTS="-verbose:gc" "-XX:+PrintGCDetails" "-XX:+PrintGCDateStamps" %HBASE_GC_OPTS%

set HBASE_USE_GC_LOGFILE=true

 

set HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false" "-Dcom.sun.management.jmxremote.authenticate=false"

 

set HBASE_MASTER_OPTS=%HBASE_JMX_BASE% "-Dcom.sun.management.jmxremote.port=10101"

set HBASE_REGIONSERVER_OPTS=%HBASE_JMX_BASE% "-Dcom.sun.management.jmxremote.port=10102"

set HBASE_THRIFT_OPTS=%HBASE_JMX_BASE% "-Dcom.sun.management.jmxremote.port=10103"

set HBASE_ZOOKEEPER_OPTS=%HBASE_JMX_BASE% -Dcom.sun.management.jmxremote.port=10104"

set HBASE_REGIONSERVERS=%HBASE_HOME%\conf\regionservers

set HBASE_LOG_DIR=%HBASE_HOME%\logs

set HBASE_IDENT_STRING=%USERNAME%

set HBASE_MANAGES_ZK=true

Step-5 (Add the line in Hbase-site.xml)

Open hbase-site.xml, which is in the conf folder in any text editor.

Add the lines inside the <configuration> tag.

A distributed HBase entirely relies on Zookeeper (for cluster configuration and management). ZooKeeper coordinates, communicates and distributes state between the Masters and RegionServers in Apache HBase. HBase's design strategy is to use ZooKeeper solely for transient data (that is, for coordination and state communication). Thus, removing HBase's ZooKeeper data affects only temporary operations – data can continue to be written and retrieved to/from HBase.

<property>

    <name>hbase.rootdir</name>

    <value>file:///C:/Documents/hbase-2.2.5/hbase</value>

 </property>

 <property>

    <name>hbase.zookeeper.property.dataDir</name>

    <value>/C:/Documents/hbase-2.2.5/zookeeper</value>

 </property>

 <property>

     <name> hbase.zookeeper.quorum</name>

    <value>localhost</value>

 </property>

Step-6 (Setting Environment Variables)

Now set up the environment variables.

Search "System environment variables." 

Now click on " Environment Variables."

Then click on "New."

Variable name: HBASE_HOME

Variable Value: Put the path of the Hbase folder.

We have completed the HBase Setup on Windows 10 procedure.

FAQs

  1. What is HBase?
    HBase is a column-oriented database with a configurable database structure. It mainly works on top of HDFS and also supports MapReduce tasks. HBase also supports various high-level languages for data processing.
     
  2. Why should we use HBase in Apache?
    If we observe that our data is kept in collections, such as metadata, message data, or binary data that are all keyed on the same value, we should think about HBase. HBase should be considered if we need key-based access to data while storing or retrieving it.
     
  3. What is the difference between Hadoop and HBase?
    Both Hadoop and HBase are used to process large amounts of data. The primary distinction is that data in Hadoop Distributed File System (HDFS) is distributed across different nodes in a network. HBase, on another side, is a database that stores data in columns and rows in a Table.
     
  4. Why is HBase faster than RDBMS?
    Hbase correlates to the ACID Properties. HBase is a column-oriented database management system based on the Hadoop Distributed File System (HDFS). It is appropriate for sparse data sets, typical in many significant data use cases.
     
  5. What is the difference between Hive and HBase?
    Hive is only used for analyzing data. In contrast to Hive, HBase is utilized for real-time queries rather than analytical queries. Hive isn't a database, although it does have a schema model. On the other hand, HBase is a sort of NoSQL database that is schema-free.

Key Takeaways

We learned about HBase and the storage mechanism used in HBase. We also learned how to install and configure HBase in the windows operating system.

Visit here to learn more about different topics related to database management systems.

Also, try Coding Ninjas Studio to practice programming problems for your complete interview preparation. Don't stop here, Ninja; check out the Top 100 SQL Problems to get hands-on experience with frequently asked interview questions and land your dream job.

Previous article
HBase Use Cases
Next article
HBase Shell
Live masterclass