I should add, Nate, that the intention is to do a read before write
validation and have that occur as close to the data as possible.

if there is a better hook to implement it on I'd love a pointer to it.

JK

On Fri, Jul 8, 2011 at 12:21 PM, Nate McCall <n...@datastax.com> wrote:

> Validation occurs at the API level, returning an
> InvalidRequestException to the caller of the API (a thrift client in
> this case). Specifically, a mutation will not be scheduled for the
> storage until it has been validated at the API level.
>
> If the intention is to do a read-before-write validation as an
> AbstractType extension, then yes, the underlying value could indeed
> change between validation and storage. If this were the goal, you need
> to implement locking externally (via zookeper or similar as previously
> mentioned).
>
> On Fri, Jul 8, 2011 at 10:21 AM, William Oberman
> <ober...@civicscience.com> wrote:
> > I haven't ever written my own
> org.apache.cassandra.db.marshal.AbstractType
> > (which is I think what your talking about), so I have no idea.
> >
> > Looking up the JavaDoc for that class, validate says "validate that the
> byte
> > array is a valid sequence for the type we are supposed to be comparing",
> > which sounds like a local operation to me (e.g. it shouldn't fetch remote
> > data, it's just saying "yep, this is a valid member of type T").
> >
> > will
> >
> > On Fri, Jul 8, 2011 at 11:17 AM, Jeffrey Kesselman <jef...@gmail.com>
> wrote:
> >>
> >> Alright,
> >> So are you saying the column validator, as specified
> >> by conf/storage-conf.xml is checked in the client interface library and
> not
> >> on the server side?  That seems odd to me on a number of levels, not the
> >> least being I cant see how thrift could autogenerate that
> >> for different languages or how those other languages would use a Java
> class.
> >>
> >> On Fri, Jul 8, 2011 at 11:13 AM, William Oberman
> >> <ober...@civicscience.com> wrote:
> >>>
> >>> I use a language specific wrapper around thrift as my "client", but
> yes,
> >>> I guess I fundamentally mean thrift == client, and the cassandra server
> ==
> >>> server.
> >>>
> >>> will
> >>>
> >>> On Fri, Jul 8, 2011 at 11:08 AM, Jeffrey Kesselman <jef...@gmail.com>
> >>> wrote:
> >>>>
> >>>> I am confused by what you mean by "Cassandra client code."  Is this
> part
> >>>> of the Cassnadra server?
> >>>> My architecture is my "user" talks thrift to Cassandra.
> >>>>
> >>>
> >>
> >>
> >>
> >> --
> >> It's always darkest just before you are eaten by a grue.
> >
> >
> >
>



-- 
It's always darkest just before you are eaten by a grue.

Reply via email to