• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Problem Search data in HBASE.

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are having problems using filters to search for matching data in HBASE.
Here are our issues wondering if anyone can shed some light to our problem.

Compare value=011511607 in table Win2 to Comp2.  There should be three matches but it only show two matches.







Below are the code that shown only two results.

First I am reading some data from one table and storing in a vector or arrayList:


Then, I want to search a different table based on the values of this vector. I used filters to do this: (I tried binaryprefixComparator and binaryComparator as well)





I should get 3 results back, however I only get one result back, the first entry in the databse.
What doesnt make sense is that when I hardcode the value that I am looking for into my code, I will get all 3 results back.

I thought there might be some issue with converting the bytes to String and then back to bytes, but that would not explain how it was able to bring back the first result. For some reason, it is stopping at the first match and doesn't continue to find the other 2 rows that contain matching data. (but if I hardcode it i get the results?? such as:      x.addElement("abc123");    filterList.addFilter(new SingleColumnValueFilter(Bytes.toBytes("name"), null, CompareOp.EQUAL, new SubstringComparator( x.get(0).toString()  )));
)

Does anyone know what the problem is or what I need to do to resolve my issue? Your help is much appreciated.

Thank You
Yoom
reply
    Bookmark Topic Watch Topic
  • New Topic