You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Rita <rm...@gmail.com> on 2014/11/06 13:17:00 UTC
key byte pattern
ATM, i have a key which is a string.
"Z.1415276116.223232"
Are there any algorithms or design patterns I should follow for something
like this to decrease the key size? Obviously, storing it as a String is
costly was wondering if there was a better way to store something like
this?
BTW, 1415276116.223232 is a epoch second
--
--- Get your facts first, then you can distort them as you please.--
Re: key byte pattern
Posted by Ted Yu <yu...@gmail.com>.
See http://hbase.apache.org/book.html#keysize
Cheers
On Thu, Nov 6, 2014 at 7:05 AM, David Larsen <dl...@connexity.com> wrote:
> You could simply take the timestamp as a Long and store it as as a byte
> array.
>
> What's the main advantage you are after with smaller keys?
>
>
> Sent from my Verizon Wireless 4G LTE smartphone
>
>
> -------- Original message --------
> From: Rita
> Date:11/06/2014 4:19 AM (GMT-08:00)
> To: hbase-user@hadoop.apache.org
> Subject: key byte pattern
>
> ATM, i have a key which is a string.
>
> "Z.1415276116.223232"
>
> Are there any algorithms or design patterns I should follow for something
> like this to decrease the key size? Obviously, storing it as a String is
> costly was wondering if there was a better way to store something like
> this?
> BTW, 1415276116.223232 is a epoch second
>
>
>
> --
> --- Get your facts first, then you can distort them as you please.--
>
RE: key byte pattern
Posted by David Larsen <dl...@connexity.com>.
You could simply take the timestamp as a Long and store it as as a byte array.
What's the main advantage you are after with smaller keys?
Sent from my Verizon Wireless 4G LTE smartphone
-------- Original message --------
From: Rita
Date:11/06/2014 4:19 AM (GMT-08:00)
To: hbase-user@hadoop.apache.org
Subject: key byte pattern
ATM, i have a key which is a string.
"Z.1415276116.223232"
Are there any algorithms or design patterns I should follow for something
like this to decrease the key size? Obviously, storing it as a String is
costly was wondering if there was a better way to store something like
this?
BTW, 1415276116.223232 is a epoch second
--
--- Get your facts first, then you can distort them as you please.--