incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alicia Leong <lccali...@gmail.com>
Subject Re: Java client options for C* v1.2
Date Thu, 21 Mar 2013 07:27:45 GMT
I tried https://github.com/datastax/java-driver
with below CQL3. It works well.

CREATE TABLE my_columnfamily (
  printer varchar,
  computer varchar,
  snapshot int,
  xml text,
  status varchar,
  PRIMARY KEY ((printer, computer), snapshot)
)
WITH CLUSTERING ORDER BY (snapshot DESC);

CREATE INDEX my_columnfamily_status
  ON payloads (status);


Cluster cluster =
Cluster.builder().addContactPoint("localhost").withPort(9160).build();
Session session = cluster.connect("my_keyspace");

for (Row row : session.execute("select * from my_columnfamily where
status = 'N'")) {
	System.out.println("pinter :" + row.getString(0));
	System.out.println("computer :" + row.getString(1));
	System.out.println("snapshot :" + row.getInt(2));
	System.out.println("status :" + row.getString(3));
	System.out.println("xml :" + row.getString(4));
	System.out.println("------------------------------------------------");
}







On Thu, Mar 21, 2013 at 3:10 PM, Marko Asplund <marko.asplund@gmail.com>wrote:

> VĂ­ctor Hugo Oliveira Molinar wrote:
> > I guess Hector fits your requirements. The last release is pretty new.
> > But i'd suggest you to take a look at astyanax too.
>
> thanks.
>
> C* versions 1.1 and 1.2 seem to have been released after the latest
> Hector release.
> Does Hector support al the newer C* features (such as CQL3)?
>
>
> marko
>

Mime
View raw message