Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> HBase table - distinct values


Copy link to this message
-
RE: HBase table - distinct values
Are you planning to use region splits? Can the rowkey have the deptno?

Having dept no in another table, may be having a reverse mapping of deptno
to empno may be helpful too if such queries are frequent.

Regards
Ram
> -----Original Message-----
> From: Anoop Sam John [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 11, 2012 9:32 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: HBase table - distinct values
>
> Hi Ravi
>          If dept_no is a CF:qualifier, to know all the dept numbers
> (distinct or not) you need a full table scan. As Doug said if it is a
> frequent online query don't think MR is a good choice..  If the data in
> your emp table is huge a full table scan also wont be that good I
> feel....  Can you guys think about storing dept number in another
> table?  If you people need query like select <empdetails> from emp
> where dept_no=?  (this query also)  you can think about creating
> secondary index implementation and indexing dept_no... You can use
> index table for above query as well as the 1st one you asked about.  :)
>
> -Anoop-
> ________________________________________
> From: [EMAIL PROTECTED] [[EMAIL PROTECTED]]
> Sent: Wednesday, October 10, 2012 7:51 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: HBase table - distinct values
>
> Hi,
>   Hbase table name  :- emp
>   Column family :- cf
>     Under the column family cf  we will be having the field name
> deptno
>
>
> Regards
> Raviprasad. T
> Mobile :-  91- 9894769541
>
>
> -----Anoop Sam John <[EMAIL PROTECTED]> wrote: -----
> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>, "hbase-
> [EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> From: Anoop Sam John <[EMAIL PROTECTED]>
> Date: 10/10/2012 06:18PM
> Subject: RE: HBase table - distinct values
>
> Hi
> Your schema? 'deptno'  is a cf:qualifier?
>
> -Anoop-
> ________________________________________
> From: [EMAIL PROTECTED] [[EMAIL PROTECTED]]
> Sent: Wednesday, October 10, 2012 4:29 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: HBase table - distinct values
>
> Hi all,
>   Is it possible to select distinct value from Hbase table.
>
> Example :-
>    what is the equivalant code for the below Oracle code  in Hbase  ?
>
>   Select count (distinct deptno) from emp ;
>
> Regards
> Raviprasad. T
>
>
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only.  If by an addressing or
> transmission error this mail has been misdirected to you, you are
> requested to delete this mail immediately. You are also hereby notified
> that any use, any form of reproduction, dissemination, copying,
> disclosure, modification, distribution and/or publication of this e-
> mail message, contents or its attachment other than by its intended
> recipient/s is strictly prohibited.
>
> Visit us at http://www.polarisFT.com
>
>
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only.  If by an addressing or
> transmission error this mail has been misdirected to you, you are
> requested to delete this mail immediately. You are also hereby notified
> that any use, any form of reproduction, dissemination, copying,
> disclosure, modification, distribution and/or publication of this e-
> mail message, contents or its attachment other than by its intended
> recipient/s is strictly prohibited.
>
> Visit us at http://www.polarisFT.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB