本文介绍了在hbase shell上执行ValueFilter或ColumnFilter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我如何从hbase shell命令行执行限定符过滤器或ValueFilter?

Could anyone please tell me how to do a qualifier filter or ValueFilter from the hbase shell command line?

推荐答案

以与在Java中使用相同的方式实例化任何过滤器(使用JRuby语法),并提供过滤器:

You can instantiate any filter the same way you would do in Java (with JRuby syntax), and supply the filter as:

filter = ...
scan 'mytable', FILTER => filter

然而,直接在shell中实例化过滤器会很麻烦,所以更简单的方法是提供使用过滤器语言过滤为字符串。例如,要在扫描中包含所有值等于'myvalue'的列,您可以使用:

However, instantiating the filter in the shell directly can be cumbersome, so an easier way is to supply filter as a string using Filter Language. For example, to include all the columns with value equal to 'myvalue' in a scan you would use:

scan 'mytable', FILTER => "ValueFilter(=, 'binary:myvalue')

您可以检查作为过滤语言参考。

You can check this document as a 'Filter Language' reference.

这篇关于在hbase shell上执行ValueFilter或ColumnFilter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 08:07