This topic contains 0 replies, has 1 voice, and was last updated by  Avikumar 2 years, 7 months ago.

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

    Avikumar
    Participant

    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

    hbase(main):001:0>

    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
    TABLE

    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
    version
    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
    table_help
    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’……
    whoami
    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)
Reply To: Hbase
Your information:




cf22

Your Name (required)

Your Email (required)

Subject

Phone No

Your Message

Cart

  • No products in the cart.