scan 't_ods_idc_isp_log2',{FILTER => "SingleColumnValueFilter('cf','commandld',=,'binary:141032279')", LIMIT => 1}
binary是比较的类型,还可以是binaryprefix,regexstring,substring一共四种。
在hbase的shell脚本添加远程调试代码:
export HBASE_JRUBY_OPTS="$HBASE_JRUBY_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8074"
HBASE_OPTS="$HBASE_OPTS $HBASE_JRUBY_OPTS"
CLASS="org.jruby.Main -X+O ${JRUBY_OPTS} ${HBASE_HOME}/bin/hirb.rb"
然后一步步的查看hbase内部是如何简析的。
scan 'test',{FILTER => "SingleColumnValueFilter('cf','test',=,'binary:23')"}
-- scan 't_ods_idc_isp_log2',{FILTER => "PrefixFilter('3|2014061212')", LIMIT => 5}
scan 't_ods_idc_isp_log2',{STARTROW => '3|2014061212', LIMIT => 5}
scan 't_ods_idc_isp_log2',{STARTROW => '3006583531|', FILTER => "FirstKeyOnlyFilter()" }
scan 't_ods_idc_isp_log2',{STARTROW => '3269959031|' , FILTER => "PrefixFilter('3269959031|') AND FirstKeyOnlyFilter()"}