Nosql – command such as SQL LIMIT in HBIT

Does HBase have any commands similar to SQL LIMIT queries?

I can execute through setStart and setEnd, but I don’t want to iterate all the rows.

From the HBase shell, you can use LIMIT:

hbase> scan'test-table', {'LIMIT' => 5}

Scan.setMaxResultSize(N) or scan.setMaxResultsPerColumnFamily(N) can be used from the Java API.

> HBase API docs – Scan.setMaxResultSize
> HBase API docs – Scan.setMaxResultsPerColumnFamily

Is there anything similar to SQL LIMIT in HBase? Order?

I can execute through setStart and setEnd, but I don’t want to iterate all the rows.

You can use LIMIT from the HBase shell:

hbase> scan'test-table' , {'LIMIT' => 5}

Scan.setMaxResultSize(N) or scan.setMaxResultsPerColumnFamily(N) can be used from Java API.

> HBase API docs – Scan.setMaxResultSize
> HBase API docs – Scan.setMaxResultsPerColumnFamily

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 631 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.