博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hbase
阅读量:5275 次
发布时间:2019-06-14

本文共 2585 字,大约阅读时间需要 8 分钟。

http://grokbase.com/t/hbase/user/125ya2cxxs/scan-addfamily-vs-familyfilter-equal

http://stackoverflow.com/questions/7256100/scan-with-filter-using-hbase-shell

 

Just to add on.

The java doc clearly says in FamilyFilter that
* If an already known column family is looked for, use {@link
org.apache.hadoop.hbase.client.Get#addFamily(byte[])}
* directly rather than a filter.
So addFamily should be better.
Regards
Ram

-----Original Message-----
From: Anoop Sam John
Sent: Thursday, May 31, 2012 11:49 AM
To: user@hbase.apache.org
Subject: RE: Scan addFamily vs FamilyFilter(EQUAL, ...)
Hi,
As per my understanding of the Scan code in your scenario where
you want to go with scanning of some CFs ( not all) You go with
Scan#addFamily.
The FamilyFilter also doing the same thing. But there is a difference
in the performance.
When one specify the CFs in the scan, the scanner will be created for
only those many Stores. For the other CFs, there wont be any scanners
and so those stores are not scanned. ( The HFile data is not fetched )
Instead when one use the FamilyFilter and not specify any specific
columns (using Scan#addFamily) all the stores will get scanned and data
will get fetched from HFiles. Later these KVs corresponding to which
you needed (as per your FamilyFilter) only will get included in the
Result and others just avoided. So there will be performance
difference I feel.. Correct me if I am wrong pls...
@Stack
One thing I ran into when using the Scan.addFamily / Scan.addColumn is
that those two methods overwrite each other.
In the Scan#addColumn javadoc it is clearly telling about this
overwrites... So this seems intentionally done correct?
-Anoop-
________________________________________
From: saint.ack@gmail.com [saint.ack@gmail.com] on behalf of Stack
[stack@duboce.net]
Sent: Wednesday, May 30, 2012 11:13 PM
To: user@hbase.apache.org
Subject: Re: Scan addFamily vs FamilyFilter(EQUAL, ...)
On Wed, May 30, 2012 at 9:59 AM, Kevin wrote:
I am curious and trying to learn which method is best when wanting to limit
a scan to a particular column or column family. The Scan class carries a
Filter instance and a TreeMap of the family map and I am unsure how they
get carried through to the server-side functionality. In terms of
performance is there any difference between doing Scan.addFamily(x) and
Scan.setFilter(new FamilyFilter(CompareFilter.CompareOp.EQUAL, x)?
There is probably not noticeable difference in performance but
Scan#addFamily is the more natural way of expressing column family
scoping.
St.Ack
 
 
 

转载于:https://www.cnblogs.com/jvava/p/4580956.html

你可能感兴趣的文章
HashMap循环遍历方式
查看>>
React Native 入门 调试项目
查看>>
C# 通过 Quartz .NET 实现 schedule job 的处理
查看>>
关于java之socket输入流输出流可否放在不同的线程里进行处理
查看>>
目前为止用过的最好的Json互转工具类ConvertJson
查看>>
Day13
查看>>
tensorflow saver简介+Demo with linear-model
查看>>
Luogu_4103 [HEOI2014]大工程
查看>>
Oracle——SQL基础
查看>>
项目置顶随笔
查看>>
Redis的安装与使用
查看>>
P1970 花匠
查看>>
java语言与java技术
查看>>
NOIP2016提高A组五校联考2总结
查看>>
iOS 项目的编译速度提高
查看>>
table中checkbox选择多行
查看>>
Magento开发文档(三):Magento控制器
查看>>
性能调优攻略
查看>>
ie6解决png图片透明问题
查看>>
瞬间的永恒
查看>>