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 Plain View
HBase >> mail # user >> How to get row key from row value?


+
Pavan Sudheendra 2013-07-31, 12:19
+
Jean-Marc Spaggiari 2013-07-31, 12:23
+
Pavan Sudheendra 2013-07-31, 12:36
+
Jean-Marc Spaggiari 2013-07-31, 12:40
+
Pavan Sudheendra 2013-07-31, 13:01
+
Jean-Marc Spaggiari 2013-07-31, 13:31
+
Pavan Sudheendra 2013-07-31, 13:37
Copy link to this message
-
Re: How to get row key from row value?
Please correct me if I am wrong but I think there is as such no hard and
fast technique for it. There are no constructs or method to this
specifically in HBase. Your client while writing have to make sure to write
to both tables: 1) the main table 2) and the secondary index table.
Basically it is up to you according to the use-case and application. You
can delegate this to a sort of a middle (separate layer from client app at
least) which takes care of maintaing consistency between the two tables.
This layer will be used for both read and write to implement and handle
your indexing. The one obvious issue that you need to take into
consideration is atomicity and consistency of the two tables.

Regards,
Shahab
On Wed, Jul 31, 2013 at 9:37 AM, Pavan Sudheendra <[EMAIL PROTECTED]>wrote:

> Yes perfect. Could i get few examples on how to create a secondary lookup
> table?
>
>
> On Wed, Jul 31, 2013 at 7:01 PM, Jean-Marc Spaggiari
> <[EMAIL PROTECTED]> wrote:
> > Hi Pavan,
> >
> > for your lookup table, you need to lookup on the value? Not on the they?
> If
> > that's the case, just "revert" your table into a secondary index lookup
> > table where the value will be the key, and the key will be the value.
> That
> > way you just to a get on this secondary index lookup table instead of
> doing
> > a scan...
> >
> > Make sense?
> >
> > JM
> >
> > 2013/7/31 Pavan Sudheendra <[EMAIL PROTECTED]>
> >
> >> Before inserting a row in my main table, i need to do a lookup on my
> >> lookup table. I'm really not sure what logic has to be behind this.
> >> Should i do a full table scan of the lookup table every single time i
> >> insert in the main table?
> >>
> >> Thanks jean
> >>
> >>
> >>
> >> On Wed, Jul 31, 2013 at 6:10 PM, Jean-Marc Spaggiari
> >> <[EMAIL PROTECTED]> wrote:
> >> > the best way is to insert on your lookup table each time you insert on
> >> your
> >> > main table. That way you don't have to scan your entire main table to
> >> build
> >> > the lookup table...
> >> >
> >> > If you want to filter by CF you can look at
> >> >
> >>
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/FamilyFilter.html
> >> > .
> >> >
> >> > Basically, you have all the filters listed there:
> >> >
> >>
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/package-summary.html
> >> >
> >> > You should be able to find one which match your needs.
> >> >
> >> > JM
> >> >
> >> > 2013/7/31 Pavan Sudheendra <[EMAIL PROTECTED]>
> >> >
> >> >> Hi Jean,
> >> >> Is there a way to specify column family, column qualifier and column
> >> >> value to get the row key without having to scan the table every
> single
> >> >> time?
> >> >> Basically, i'm building a lookup table which helps in insertion of
> >> >> another HBase table. its quite complicated to explain.
> >> >>
> >> >> On Wed, Jul 31, 2013 at 5:53 PM, Jean-Marc Spaggiari
> >> >> <[EMAIL PROTECTED]> wrote:
> >> >> > Hi Pavan,
> >> >> >
> >> >> > Are you looking for something like
> >> >> >
> >> >>
> >>
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/ValueFilter.html
> >> >> ?
> >> >> >
> >> >> > You are going to do a table full scan... If you value is uniq, you
> >> might
> >> >> > want to build a secondary index table for direct access...
> >> >> >
> >> >> > JM
> >> >> >
> >> >> > 2013/7/31 Pavan Sudheendra <[EMAIL PROTECTED]>
> >> >> >
> >> >> >> How do i get the row key by specifying a row value assuming row
> >> values
> >> >> >> are unique?
> >> >> >>
> >> >> >> What API should i use for this purpose?
> >> >> >> --
> >> >> >> Regards-
> >> >> >> Pavan
> >> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Regards-
> >> >> Pavan
> >> >>
> >>
> >>
> >>
> >> --
> >> Regards-
> >> Pavan
> >>
>
>
>
> --
> Regards-
> Pavan
>
+
Pavan Sudheendra 2013-07-31, 14:02
+
Shahab Yunus 2013-07-31, 14:08
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