Support Questions

Find answers, ask questions, and share your expertise

Hbase custom filter with get operation

avatar
Contributor

I have created a custom filter to filter data of columns (here column name will be numbers like 2,3,4,5,) whose column name is grater than 4, but the filter is not working as expected. please help me how can i resolve this.

below is the code

@Override public ReturnCode filterKeyValue(Cell cell) { String data=new String(value); int val =Integer.parseInt(data); String celldata=new String(CellUtil.cloneQualifier(cell)); int col=Integer.parseInt(celldata); System.out.println("from Custom filter:"+celldata); if (col>val) { filterRow = false; } return ReturnCode.INCLUDE; }

Am i overriding the correct method to get data of only a particular column?

1 ACCEPTED SOLUTION

avatar
Contributor

Thanks, I am able to do the custom filer operation. I have removed the filterRow() method overriding from my custom filter class after that its working as expected

Thanks

Ashok

View solution in original post

2 REPLIES 2

avatar
Contributor

By using the custom filter i can filter out a particular row, but can i use Hbase custom filter to get particular column in that row??

Actually I have millions of column in a row and i want to select a particular column in a row. is there any way i can achieve this using Hbase custom filters?

avatar
Contributor

Thanks, I am able to do the custom filer operation. I have removed the filterRow() method overriding from my custom filter class after that its working as expected

Thanks

Ashok