How to Stop HBase using Java API

Last updated on May 30 2022
Sonali Singh

Table of Contents

How to Stop HBase using Java API

HBase – Shutting Down

exit

You exit the shell by typing the exit command.

hbase(main):021:0> exit

Stopping HBase

To stop HBase, browse to the HBase home folder and type the subsequent command.

./bin/stop-hbase.sh

Stopping HBase Using Java API

You’ll shut down the HBase using the shutdown() method of the HBaseAdmin class. Follow the steps given below to shut down HBase:

Step 1

Instantiate the HbaseAdmin class.

// Instantiating configuration object

Configuration conf = HBaseConfiguration.create();

 

// Instantiating HBaseAdmin object

HBaseAdmin admin = new HBaseAdmin(conf);

Step 2

Shut down the HBase using the shutdown() method of the HBaseAdmin class.

admin.shutdown();

Given below is the program to stop the HBase.

import java.io.IOException;

 

import org.apache.hadoop.hbase.HBaseConfiguration;

import org.apache.hadoop.conf.Configuration;

import org.apache.hadoop.hbase.client.HBaseAdmin;

 

public class ShutDownHbase{

 

public static void main(String args[])throws IOException {

 

// Instantiating configuration class

Configuration conf = HBaseConfiguration.create();

 

// Instantiating HBaseAdmin class

HBaseAdmin admin = new HBaseAdmin(conf);

 

// Shutting down HBase

System.out.println(“Shutting down hbase”);

admin.shutdown();

}

}

Compile and execute the above program as shown below.

$javac ShutDownHbase.java

$java ShutDownHbase

The subsequent should be the output:

Shutting down hbase

 

So, this brings us to the end of blog. This Tecklearn ‘How to Stop HBase using Java API’ helps you with commonly asked questions if you are looking out for a job in HBase and No-SQL Database Domain.

If you wish to learn HBase and build a career in HBase or No-SQL Database domain, then check out our interactive, Apache HBase Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

https://www.tecklearn.com/course/apache-hbase-training/

Apache HBase Training

About the Course

Tecklearn Apache HBase training will master the powerful NoSQL distributed database. You will learn HBase architecture, data analytics using HBase, integration with Hive, monitoring cluster using ZooKeeper and working on real-life industry projects. Build your career as a certified HBase professional through our hands-on training with real-world examples. Upon completion of this online training, you will hold a solid understanding and hands-on experience with Apache HBase.

Why Should you take Apache HBase Training?

  • HBase is now the largest data-driven service serving top websites including Facebook Messaging Platform.
  • There is Strong demand for HBase qualified professionals and they are paid big bucks for the right skills.
  • According to indeed.com, the average pay of an HBase developer stands at $81,422 per annum.

What you will Learn in this Course?

Introduction to HBase and NoSQL

  • Introduction to HBase
  • Fundamentals of HBase
  • What is NoSQL
  • NoSQL Vs RDBMS
  • Why HBase
  • Where to use HBase

HBase Data Modelling

  • Data Modelling
  • HDFS vs. HBase
  • HBase Use Cases

HBase Architecture and Components

  • HBase Architecture
  • Components of HBase Cluster

HBase Installation

  • Prerequisites for HBase Installation
  • Installation Steps

Programming in HBase

  • Create an Eclipse Project for HBase
  • Simple Table Creation from Java in HBase
  • HBase API
  • HBase Shell
  • Primary operations and advanced operations

Integration of Hive with HBase

  • Create a table and insert data into it
  • Integration of Hive with HBase
  • HBase Mapping

Deep Dive into HBase

  • Input Data into HBase
  • File Loading
  • HDFS File
  • HBase handling files in File System
  • WAL
  • Seek Vs Transfer
  • HBase ACID Properties

Got a question for us? Please mention it in the comments section and we will get back to you.

 

0 responses on "How to Stop HBase using Java API"

Leave a Message

Your email address will not be published. Required fields are marked *