cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jake Luciani <jak...@gmail.com>
Subject Re: row key for string
Date Thu, 29 Sep 2011 16:22:36 GMT
You need that to work with the OPP since it checks that the string is UTF-8
Valid.

If you are using RP or BOP no need.

On Thu, Sep 29, 2011 at 12:14 PM, Ruby Stevenson <ruby185@gmail.com> wrote:

> btw - the original code is in brisk repo:
>
>
> https://github.com/riptano/brisk/blob/master/src/java/src/org/apache/cassandra/hadoop/fs/CassandraFileSystemThriftStore.java#L657
>
>
>
> On Thu, Sep 29, 2011 at 12:07 PM, Jonathan Ellis <jbellis@gmail.com>
> wrote:
> > Nope. That strikes me as odd, too.
> > On Sep 29, 2011 10:58 AM, "Ruby Stevenson" <ruby185@gmail.com> wrote:
> >> hi all
> >>
> >> I am reading some code related to encoding a string representing the
> >> file path into a row key, it essentially went through a series of
> >> transformation like this:
> >>
> >> String filepath = "/x/y/z";
> >> ByteBuffer bb = ByteBufferUtil.bytes(filepath);
> >> String s = FBUtilities.hashToBigInteger(bb).toString(16);
> >> return ByteBufferUtil.bytes(s);
> >>
> >> why hashToBigInteger and then hex string? is this a convention/idiom
> >> of generating row key this way?
> >>
> >> thanks
> >>
> >> Ruby
> >
>



-- 
http://twitter.com/tjake

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message