AnsweredAssumed Answered

fuzzyrowfilter supported in mapr hbase

Question asked by gowri_shankar on Jan 7, 2014
I am currently exploring fuzzyrowfilter for use with mapr hbase. Is it supported ? I am getting the following error when I use it along with a scan,

2014-01-08 19:18:24,1327 ERROR JniCommon fs/client/fileclient/cc/jni_common.cc:7223 Thread: -2 Failed to init scanner for table <tableName>, error = Invalid argument(-22)
Exception in thread "main" java.io.IOException: Failed to create a scanner
at com.mapr.fs.Inode.getScanner(Inode.java:1260)
at com.mapr.fs.HTableImpl.getScanner(HTableImpl.java:207)
at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:795)
at com.xactlycorp.mapr.LoginQuery.performRegexScan(LoginQuery.java:219)
at com.xactlycorp.mapr.LoginQuery.main(LoginQuery.java:69)

This is the code snippet

List<Pair<byte[], byte[]>> fuzzyKeysData = new ArrayList<Pair<byte[], byte[]>>();
  byte[] fuzzyRowKey = getFuzzyKey(new Long(businessId));

byte[] fuzzyMetaData = getFuzzyMetaData();
Pair<byte[], byte[]> pair = new Pair<byte[], byte[]>(fuzzyRowKey,
    fuzzyMetaData);
  fuzzyKeysData.add(pair);

  FuzzyRowFilter fuzzyRowFilter = new FuzzyRowFilter(fuzzyKeysData);
  scan.setFilter(fuzzyRowFilter);

  ResultScanner resultScanner = hTable.getScanner(scan);

Outcomes