Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the functions and similarities and differences of scan and get in Hbase?

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail the functions and similarities and differences of scan and get in Hbase. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

The functions and similarities and differences of scan and get in Hbase

1. Only one entry is obtained according to the specified RowKey. There are two ways to deal with the get method (org.apache.hadoop.hbase.client.Get) Get: the ClosestRowBefore is set and the rowlock is not set, which is mainly used to ensure the transactionality of the row, that is, each get is marked with a row. There can be many family and column in a row.

two。 A batch of records are obtained according to the specified conditions, and the scan method (org.apache.Hadoop.hbase.client.Scan) uses scan to realize the conditional query function.

1) scan can be improved by setCaching and setBatch methods (space for time)

2) scan can use setStartRow and setEndRow to limit the range ([start,end] start? Is a closed interval, end is an open interval). The smaller the range, the higher the performance.

3) scan can add filters through the setFilter method, which is also the basis of paging and multi-conditional queries. 3. Full table scan, that is, directly scan all row records in the entire table.

About "what are the functions and similarities and differences of scan and get in Hbase?" this article ends here. I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report