在没有任何列数据的情况下扫描 HBase 中的行名

发布于 2024-12-03 07:31:26 字数 312 浏览 4 评论 0原文

如何扫描 HBase 中的行名而不请求任何列数据?
我想通过省略所有列来加快扫描速度,因为我只需要行名。

编辑: 好的,我自己想出来了......只获取行名 可以使用FistKeyOnlyFilter。此过滤器确实返回的不仅仅是行键,而且仅返回每行的第一个键值,因此它比请求整行要高效得多...
如果有人有更好的想法,我仍然愿意寻求更好的方法!

How can I scan through rownames in HBase without requesting any column data?
I want to make the scan faster by omitting all columns as I need just the rownames.

EDIT:
Ok figured it out myself...to get only the rownames FistKeyOnlyFilter can be used. This filter does return more than just the rowkeys but only the first key values from each row so it is much more efficient than requesting the whole row...
If anyone has a better idea, I'm still open for a better way to do it!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橙幽之幻 2024-12-10 07:31:26

您有合适的过滤器。如果您想进一步改进此行为,您可以编写自己的过滤器并将其添加到 HBase 类路径和客户端类路径中。作为来自 HBase 的过滤器的一部分,这是我在 0.92 中看到的唯一一个为您提供最佳服务的过滤器。

You have the right filter. If you wanted to improve further this behavior, you could write your own filter and add it to HBase classpath and your client classpath. As part of the filters coming from HBase, this is the only one I can see in 0.92 that serves you the best.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文