HBase(8): scan operation

1 needs

View all data in the ORDER_INFO table

1.2 scan command

In HBase, we can use the scan command to scan tables in HBase. grammar:

scan '表名'

1.3 Scan ORDER_INFO table

scan 'ORDER_INFO',{FORMATTER => 'toString'}

Note: Avoid scanning a large table!

2 Requirement 2: Query order data (only 3 items are displayed)

scan 'ORDER_INFO', {LIMIT => 3, FORMATTER => 'toString'}

3 Requirement 3: Query order status, payment method

3.1 Requirements

Only query the order status and payment method, and only display 3 pieces of data

3.2 Commands

scan 'ORDER_INFO', {LIMIT =>

Guess you like

Origin blog.csdn.net/u013938578/article/details/131462352