HBase shell中使用fliter
2016-01-04 17:41
501 查看
在hbase的命令行中,可以直接使用filter进行scan,命令如下所示:
如果是filter是自定义的,则首先将filter的jar包复制到hbase集群的所有结点上,再重启hbase,
在命令行中使用该自定义filter时,需要给import命令后的filter类名加入引号,比如import “test.testfilter”;否则,如果使用NameError: undefined local variable or method `test’
[code]import org.apache.hadoop.hbase.filter.CompareFilter import org.apache.hadoop.hbase.filter.SingleColumnValueFilter import org.apache.hadoop.hbase.filter.SubstringComparator import org.apache.hadoop.hbase.util.Bytes scan 'obd_multtrace', { COLUMNS => 'info:accessTime', FILTER => SingleColumnValueFilter.new (Bytes.toBytes('info'), Bytes.toBytes('accessTime'), CompareFilter::CompareOp.valueOf('EQUAL'), SubstringComparator.new('2015-12-09'))}
如果是filter是自定义的,则首先将filter的jar包复制到hbase集群的所有结点上,再重启hbase,
在命令行中使用该自定义filter时,需要给import命令后的filter类名加入引号,比如import “test.testfilter”;否则,如果使用NameError: undefined local variable or method `test’
相关文章推荐
- 父 shell,子 shell ,export 与 变量传递
- Java 调用 shell 脚本详解
- bash bad interpreter: 没有那个文件或目录
- 一些shell代码片段
- 20160103有关 shell脚本
- 控制台、终端、shell
- python传递参数给shell
- shell script(一)
- Linux Shell 编程语法
- Linux Shell编程入门
- linux shell中的命令自动补全(compgen complete)与 命令行参数解析
- shell 命令行实现
- shell实现增加删除Linux系统用户脚本(密码为随机)
- -bash: ulimit: pipe size: cannot modify limit: Invalid argument
- 第一次使用 gitbash
- shell date cal
- shellcode
- /bin/bash^M: bad interpreter: 没有那个文件或目录
- spark-submit 和 spark-shell 后面可跟的参数
- .bash_profile和.bashrc以及profile的什么区别