HBase Learning Notes-hbase Shell common commands

Source: Internet
Author: User

Limit the number of rows when you sweep a table

' table_name ' 5 }

When the table is scanned, only five data is specified

==============================================

Delete Table

The deletion of the table requires the implementation of two steps, namely disable and drop, as follows:

' table_name '  'table_name'

Of course, after the Disable table can also be re-enable, the command is:

' table_name '

==============================================

Assigning Permissions to users

' user_name ' ' Rwxca ' ' table_name '

The more common is to give a user the right to give a table, where ' rwxca ' each letter represents a permission type, R (read) is read, W (write) is write, X (Exec) is the execution, C (create) is created, a (admin) is Administrator rights

There are also commands to turn on row-level and cell-level permissions, but are not very common, as follows:

' user_name ' ' Rwxca ' ' table_name ' ' F1 ' ' col1 '

==============================================

Close the table's Wal log

In the Java API for HBase, you can specify that you do not use the Wal log when writing by using the following methods:

New Put (RowKey);p Ut.setwritetowal (false);

In the HBase shell, you can close a table's Wal log by executing the following command:

' table_name ' ' Skip_wal '

Note that this command requires all region of this table to be offline before it can take effect

HBase Learning Notes-hbase Shell common commands

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.