You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Adam Fisk <a...@littleshoot.org> on 2010/01/22 02:56:19 UTC

insert and batch_insert should update?

I just wanted to make sure that a second insert of the same key and
the same Column/SuperColumn name should completely overwrite any
existing data there, correct? I'm seeing odd behavior there and just
wanted to verify what's expected.

Thanks very much.

-Adam

-- 
Adam Fisk
http://www.littleshoot.org | http://adamfisk.wordpress.com |
http://twitter.com/adamfisk

Re: insert and batch_insert should update?

Posted by Adam Fisk <a...@littleshoot.org>.
>
> Timestamps aren't optional. The columns you pass to batch_insert() all
> have a required timestamp member (which people generally set to the
> current time).
>

Good to know =).

Looks like that's the problem -- you just saved me a *lot* of time. Thanks.

-Adam

Re: insert and batch_insert should update?

Posted by Eric Evans <ee...@rackspace.com>.
On Thu, 2010-01-21 at 18:07 -0800, Adam Fisk wrote:
> Great - thanks. And if I don't specify any timestamp, for example with
> batch_insert, it'll always use the current timestamp, which should
> always be newer, correct?

Timestamps aren't optional. The columns you pass to batch_insert() all
have a required timestamp member (which people generally set to the
current time).

-- 
Eric Evans
eevans@rackspace.com


Re: insert and batch_insert should update?

Posted by Adam Fisk <a...@littleshoot.org>.
Great - thanks. And if I don't specify any timestamp, for example with
batch_insert, it'll always use the current timestamp, which should
always be newer, correct?

Unless of course I manually set some crazy timestamp in the future,
but I'm not doing that.

Thanks very much.

-Adam


On Thu, Jan 21, 2010 at 6:02 PM, Eric Evans <ee...@rackspace.com> wrote:
> On Thu, 2010-01-21 at 17:56 -0800, Adam Fisk wrote:
>> I just wanted to make sure that a second insert of the same key and
>> the same Column/SuperColumn name should completely overwrite any
>> existing data there, correct? I'm seeing odd behavior there and just
>> wanted to verify what's expected.
>
> Provided that the second write uses a higher timestamp, yes.
>
> --
> Eric Evans
> eevans@rackspace.com
>
>



-- 
Adam Fisk
http://www.littleshoot.org | http://adamfisk.wordpress.com |
http://twitter.com/adamfisk

Re: insert and batch_insert should update?

Posted by Eric Evans <ee...@rackspace.com>.
On Thu, 2010-01-21 at 17:56 -0800, Adam Fisk wrote:
> I just wanted to make sure that a second insert of the same key and
> the same Column/SuperColumn name should completely overwrite any
> existing data there, correct? I'm seeing odd behavior there and just
> wanted to verify what's expected.

Provided that the second write uses a higher timestamp, yes.

-- 
Eric Evans
eevans@rackspace.com