Viewing 1 post (of 1 total)
  • Author
  • #1274

    HBase – Shell:

    HBase contains a shell using which you can communicate with HBase. HBase uses the Hadoop File System to store its data. It will have a master server and region servers. The data storage will be in the form of regions (tables). These regions will be split up and stored in region servers.

    General Commands:

    status – Provides the status of HBase, for example, the number of servers.

    version – Provides the version of HBase being used.

    table_help – Provides help for table-reference commands.

    whoami – Provides information about the user

    Starting HBase Shell:-

    To access the HBase shell, you have to navigate to the HBase home folder.

    cd /usr/localhost/
    cd Hbase
    You can start the HBase interactive shell using “hbase shell” command as shown below.

    ./bin/hbase shell
    If you have successfully installed HBase in your system, then it gives you the HBase shell prompt as shown below.

    HBase Shell; enter ‘help<RETURN>’ for list of supported commands.
    Type “exit<RETURN>” to leave the HBase Shell
    Version 0.94.23, rf42302b28aceaab773b15f234aa8718fff7eea3c, Wed Aug 27
    00:54:09 UTC 2014


    verify the installation and the configuration of HBase in your system using this command as shown below.

    hbase(main):001:0> list
    When you type this command, it gives you the following output.

    hbase(main):001:0> list

    HBase – General Commands:-

    This command returns the status of the system including the details of the servers running on the system. Its syntax is as follows:

    hbase(main):009:0> status
    If you execute this command, it returns the following output.

    hbase(main):009:0> status
    3 servers, 0 dead, 1.3333 average load
    This command returns the version of HBase used in your system. Its syntax is as follows:

    hbase(main):010:0> version
    If you execute this command, it returns the following output.

    hbase(main):009:0> version
    0.98.8-hadoop2, r6cfc8d064754251365e070a10a82eb169956d5fe, Fri Nov 14
    18:26:29 PST 2014
    This command guides you what and how to use table-referenced commands. Given below is the syntax to use this command.

    hbase(main):02:0> table_help
    When you use this command, it shows help topics for table-related commands. Given below is the partial output of this command.

    hbase(main):002:0> table_help
    Help for table-reference commands.
    You can either create a table via ‘create’ and then manipulate the table
    via commands like ‘put’, ‘get’, etc.

    hbase> t = create ‘t’, ‘cf’……
    This command returns the user details of HBase. If you execute this command, returns the current HBase user as shown below.

    hbase(main):008:0> whoami
    hadoop (auth:SIMPLE)
    groups: hadoop

    Class HBase Admin:

    HBaseAdmin is a class representing the Admin. This class belongs to the org.apache.hadoop.hbase.client package. Using this class, you can perform the tasks of an administrator. You can get the instance of Admin using Connection.getAdmin() method.

Viewing 1 post (of 1 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.