mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <sro...@gmail.com>
Subject Re: IDs to longs?
Date Tue, 04 Aug 2009 15:09:56 GMT
Maybe I am not thinking this through entirely but I was thinking a
deterministic mapping from String to long would be preferable, since
the entire mapping could be recreated from the Strings if needed. If I
start assigning IDs in order, that mapping has to be saved and synced
to any component that needs to do the translation. Somehow I am
guessing that could get tricky. For example a new ID shows up in the
system in some kind of clustered or distributed system context. Now
you need to make sure the entire system agrees on which long gets
assigned to that String.

But then again you avoid the collision issue -- it has a cost though.
My gut was that the hash (implicit mapping) was preferable but hadn't
thought it through entirely. more thoughts?

But yes I agree the idea is to provide such a component, with a
in-memory representation and a JDBC-backed representation I imagine.

On Tue, Aug 4, 2009 at 3:55 PM, Grant Ingersoll<gsingers@apache.org> wrote:
> Here I was figuring you'd just keep an internal counter, but that you would
> define an interface and maybe then people can easily create there own.

Mime
View raw message