You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by som_shekhar <ko...@wipro.com> on 2011/02/07 07:15:50 UTC

Determining the unqiue row keys for Hbase table

Hi All,
I would like to know how to provide the unique row names for hbase table.
Since if there are similar row keys then they will be overwritten in the
hbase table. 
I am  writing the map reduce job which will read the file from the HDFS and
will update the table in the mapper function only. for the time being i am
not using  the reducer. 

if i append the session id with the row keys, then is it guarnteed to have
the unique key?

Regards,
Shekhar
-- 
View this message in context: http://old.nabble.com/Determining-the-unqiue-row-keys-for-Hbase-table-tp30860983p30860983.html
Sent from the HBase User mailing list archive at Nabble.com.


Re: Determining the unqiue row keys for Hbase table

Posted by Andrey Stepachev <oc...@gmail.com>.
You can use HTable.incrementColumnValue. Of cource you can increment in
steps (f.e. 100) and
reduce amount of rpc generetated by you MR jobs.

2011/2/7 som_shekhar <ko...@wipro.com>

>
> Hi All,
> I would like to know how to provide the unique row names for hbase table.
> Since if there are similar row keys then they will be overwritten in the
> hbase table.
> I am  writing the map reduce job which will read the file from the HDFS and
> will update the table in the mapper function only. for the time being i am
> not using  the reducer.
>
> if i append the session id with the row keys, then is it guarnteed to have
> the unique key?
>
> Regards,
> Shekhar
> --
> View this message in context:
> http://old.nabble.com/Determining-the-unqiue-row-keys-for-Hbase-table-tp30860983p30860983.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
>

Re: Determining the unqiue row keys for Hbase table

Posted by Jean-Daniel Cryans <jd...@apache.org>.
UUIDs could be used for that in general.

What's your row key currently made of? Kind of hard to help you if we
don't know anything about your use case :)

J-D

On Sun, Feb 6, 2011 at 10:15 PM, som_shekhar <ko...@wipro.com> wrote:
>
> Hi All,
> I would like to know how to provide the unique row names for hbase table.
> Since if there are similar row keys then they will be overwritten in the
> hbase table.
> I am  writing the map reduce job which will read the file from the HDFS and
> will update the table in the mapper function only. for the time being i am
> not using  the reducer.
>
> if i append the session id with the row keys, then is it guarnteed to have
> the unique key?
>
> Regards,
> Shekhar
> --
> View this message in context: http://old.nabble.com/Determining-the-unqiue-row-keys-for-Hbase-table-tp30860983p30860983.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
>