Retrieving a column from Cassandra is a straight forward operation. Using the ColumnQuery object to retrieve the information we inserted in the example above, we would have:
ColumnQuery
HFactory.createStringColumnQuery(keyspace);
columnQuery.setColumnFamily("Standard1").setKey("jsmith").setName("first");
Result<HColumn<String, String&rt;&rt; result = columnQuery.execute();
Note the strong typing provided by the ColumnQuery and Result objects.
No comments:
Post a Comment