hbase
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了hbase,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2464字,纯文字阅读大概需要4分钟。
内容图文
http://grokbase.com/t/hbase/user/125ya2cxxs/scan-addfamily-vs-familyfilter-equal
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
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
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, ...)
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)?
Scan#addFamily is the more natural way of expressing column family
scoping.
St.Ack
原文:http://www.cnblogs.com/jvava/p/4580956.html
内容总结
以上是互联网集市为您收集整理的hbase全部内容,希望文章能够帮你解决hbase所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。