You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by FrankFlaherty <fr...@pega.com> on 2016/02/03 22:45:11 UTC

Cassandra BEGIN BATCH

Cassandra provides "BEGIN BATCH" and "APPLY BATCH" to perform atomic
execution of multiple statements as below:

BEGIN BATCH
  INSERT INTO "user_status_updates"
    ("username", "id", "body")
  VALUES(
    'dave',
    16e2f240-2afa-11e4-8069-5f98e903bf02,
    'dave update 4'
);

  INSERT INTO "home_status_updates" (
    "timeline_username",
    "status_update_id",
    "status_update_username",
    "body")
  VALUES (
    'alice',
    16e2f240-2afa-11e4-8069-5f98e903bf02,
    'dave',
    'dave update 4'
  );
APPLY BATCH;

Is there a way to update two or more Cassandra tables atomically using the
Cassandra Connector from Spark?

Thanks,
Frank





--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Cassandra-BEGIN-BATCH-tp26145.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


RE: Cassandra BEGIN BATCH

Posted by Mohammed Guller <mo...@glassbeam.com>.
Frank,
I don’t think so. Cassandra does not support transactions in the traditional sense. It is not an ACID compliant database.

Mohammed
Author: Big Data Analytics with Spark<http://www.amazon.com/Big-Data-Analytics-Spark-Practitioners/dp/1484209656/>

From: Ted Yu [mailto:yuzhihong@gmail.com]
Sent: Wednesday, February 3, 2016 2:55 PM
To: FrankFlaherty
Cc: user
Subject: Re: Cassandra BEGIN BATCH

Seems you can find faster response on Cassandra Connector mailing list.

On Wed, Feb 3, 2016 at 1:45 PM, FrankFlaherty <fr...@pega.com>> wrote:
Cassandra provides "BEGIN BATCH" and "APPLY BATCH" to perform atomic
execution of multiple statements as below:

BEGIN BATCH
  INSERT INTO "user_status_updates"
    ("username", "id", "body")
  VALUES(
    'dave',
    16e2f240-2afa-11e4-8069-5f98e903bf02,
    'dave update 4'
);

  INSERT INTO "home_status_updates" (
    "timeline_username",
    "status_update_id",
    "status_update_username",
    "body")
  VALUES (
    'alice',
    16e2f240-2afa-11e4-8069-5f98e903bf02,
    'dave',
    'dave update 4'
  );
APPLY BATCH;

Is there a way to update two or more Cassandra tables atomically using the
Cassandra Connector from Spark?

Thanks,
Frank





--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Cassandra-BEGIN-BATCH-tp26145.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org<ma...@spark.apache.org>
For additional commands, e-mail: user-help@spark.apache.org<ma...@spark.apache.org>


Re: Cassandra BEGIN BATCH

Posted by Ted Yu <yu...@gmail.com>.
Seems you can find faster response on Cassandra Connector mailing list.

On Wed, Feb 3, 2016 at 1:45 PM, FrankFlaherty <fr...@pega.com>
wrote:

> Cassandra provides "BEGIN BATCH" and "APPLY BATCH" to perform atomic
> execution of multiple statements as below:
>
> BEGIN BATCH
>   INSERT INTO "user_status_updates"
>     ("username", "id", "body")
>   VALUES(
>     'dave',
>     16e2f240-2afa-11e4-8069-5f98e903bf02,
>     'dave update 4'
> );
>
>   INSERT INTO "home_status_updates" (
>     "timeline_username",
>     "status_update_id",
>     "status_update_username",
>     "body")
>   VALUES (
>     'alice',
>     16e2f240-2afa-11e4-8069-5f98e903bf02,
>     'dave',
>     'dave update 4'
>   );
> APPLY BATCH;
>
> Is there a way to update two or more Cassandra tables atomically using the
> Cassandra Connector from Spark?
>
> Thanks,
> Frank
>
>
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/Cassandra-BEGIN-BATCH-tp26145.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
> For additional commands, e-mail: user-help@spark.apache.org
>
>