incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Straube <>
Subject Cassandra is not updating data with CQL, with mutator it does
Date Sat, 18 Jun 2011 10:14:41 GMT

with the following code I try to update a row

Keyspace fKeyspace = HFactory.createKeyspace(KEYSPACE, fCluster);

// Update with CQL
CqlQuery<String,String,String> cqlQuery =
   new CqlQuery<String,String,String>(fKeyspace, fStringS, fStringS, fStringS);
    "INSERT INTO Fahrer (KEY, 'first') VALUES('fahrer1', 'FirstnameUpdated')");
QueryResult<CqlRows<String,String,String>> result = cqlQuery.execute();

// Update with mutator
Mutator<String> mutator = HFactory.createMutator(fKeyspace, fStringS);
MutationResult mr = mutator.insert("fahrer2", "Fahrer",
   HFactory.createStringColumn("first", "SecondUpdated"));

The update of the CQL-query is not performed, the update with the mutator is performed. Where
is the mistake?

Thank you very much!!

View raw message