hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samir das mohapatra <samir.help...@gmail.com>
Subject Region Server based filter using SingleColumnValueFilter is not working in CDH4.2.1 but working on CDH4.1.2
Date Wed, 27 Nov 2013 12:29:43 GMT
Dear Hadoop/Hbase Developer,

  I was trying to scan the hbase table  by  applying  *SingleColumnValueFilter
 ,* It workes fine in CDH4.1.2  but when same code  I am running in Other
Dev cluster which is not working under CDH4.2.1 , Is there any issue with
version difference or it is a code level issue ?

  I am sharing the code which i wrote in Driver level scanning for hbase


 List<Filter> filters = new ArrayList<Filter>();

   SingleColumnValueFilter colValFilter = new
SingleColumnValueFilter(Bytes.toBytes("cf1"), Bytes.toBytes("code"),
CompareFilter.CompareOp.EQUAL, new SubstringComparator("SAMIR_AL_START "));


    FilterList fl = new FilterList( FilterList.Operator.MUST_PASS_ALL,

    Scan scan = new Scan();
    scan.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("sequence_id"));
    scan.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("session_id"));
    scan.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("timestamp"));
    scan.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("userguid"));
    scan.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("code"));


*Note: same code when I am running, it is not giving  only
 "SAMIR_AL_START " value as output , rather then it is producing the other
family's some Other value. *

*For example I want to filter the record  from hbase which containes only
"SAMIR_AL_START"  as value under families 'cf1' and qualifier 'code' (It is
giving as i wanted under CDH4.1.2 but when I am running same code in Other
cluder(CDH4.2.1) *
*which is not giving  the right output )*

*If Incase anyone already  aware with this type of filter in hbase using
java could you please help me on the same problem.*

*samir. *

View raw message