How to get specific column values in Hbase?

This is for Hadoop eco system like HDFS, Map reduce, Hive, Hbase, Pig, sqoop,sqoop2, Avro, solr, hcatalog, impala, Oozie, Zoo Keeper and Hadoop distribution like Cloudera, Hortonwork etc.
ramverma
Posts: 435
Joined: Sat Aug 23, 2014 5:34 pm
Contact:

How to get specific column values in Hbase?

Postby ramverma » Mon Aug 25, 2014 9:04 pm

I have two column families in Info table. cfa1, cfa2.
cfa1 have following columns: id, name, age, email
cfa2 have following columns: city,state,country

what will be they query to find specific column of table info like cfa2:city where cfa1: name?
I am trying to get it in Java so can i use API for this ?


Guest

Re: How to get specific column values in Hbase?

Postby Guest » Wed Sep 17, 2014 8:14 pm

I think you can use below command in Hbase.

scan 'your_tablename' , {COLUMNS => 'cf1:city'}


for java you can use SingleColumnValueFilter()
SingleColumnValueFilter('cf1','city',=,'binary:nameofthecity')


Return to “Hadoop and Big Data”

Who is online

Users browsing this forum: No registered users and 1 guest