Recent Posts

Saturday, 18 February 2017

HBase Shutting Down Tutorial


     You exit the shell by typing the exit command.
hbase> exit
Stopping HBase
     To stop HBase, browse to the HBase home folder and type the following command.
./bin/stop-hbase.sh
Stopping HBase Using Java API
package com.ashok.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 {

      Configuration conf = HBaseConfiguration.create();

      HBaseAdmin admin = new HBaseAdmin(conf);

      admin.shutdown();
      System.out.println("Shutting down HBase Successfully");
   }
}

Next Tutorial  HBase Insert Data Tutorial

Previous Tutorial  HBase Drop Table Tutorial 
 

No comments:

Post a Comment