Reply
Highlighted
New Contributor
Posts: 2
Registered: ‎01-14-2018

Multiple attributes or SOLR to query HBASE elements

Hi all,

I'm a newbie in the hadoop environment and i would like to know your opinion about search methods to use.

For now, i'm wokring on a project using a HBase database with tables based on this structure :
-> create ‘<table name>’,’<column family>’.

For my example, the table is named MY_TABLE and the one family used MY_FAMILY.
By default, there is only one column COL1 for my family MY_FAMILY.

In my example, i will put an XML file into COL1 with this structure :
"<?xml version="1.0" encoding="UTF-8"?>
<breakfast_menu>
    <food>
        <name>Belgian Waffles</name>
        <price>$5</price>
        <calories>900</calories>
    </food>
    <food>
        <name>Strawberry Belgian Waffles</name>
        <price>$6</price>
        <calories>900</calories>
    </food>
</breakfast_menu>"

The HBase Shell command to add the data in the table is :
-> put ’MY_TABLE’,’ROW1’,’MY_FAMILY:COL1’,’<?xml...</food></breakfast_menu>’ (as the example above).

Using the key/value system, i can retrieve my row using the shell command :
-> get ‘MY_TABLE’, ‘ROW1’.

In my case, I need to retrieve the row(s) from MY_TABLES where the XML contains $6 as price, and 900 as calories.

According to you, what would be the better way to store and retrieve the data ?
-> Create a table with multiple columns in the family MY_FAMILY (renamed FOOD as example) with the columns name, price, calories ?
-> Use the solr engine and index the XML file to be queried ?

Thank you in advance for your advice,
Bernard.

 

 

 

 

 

New Contributor
Posts: 2
Registered: ‎01-14-2018

Re: Multiple attributes or SOLR to query HBASE elements

[ Edited ]

Do you have any feedback on multi columns search in hbase vs index in Solr ? :/

Announcements