Created
February 28, 2012 18:49
-
-
Save zznate/1934287 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Row row = new Row(); | |
row.put("column1", "value1").put(2, "value2").put(3, false); | |
UUID id = TimeUUIDUtils.getUniqueTimeUUIDinMillis(); | |
row.put(42, id).put(id, "uuid col name"); | |
row.increment("counter1",4).increment(1234L,1).increment("counter1",1); | |
columnFamily.insert(row); | |
CFCursor cursor = columnFamily.query(row); | |
Row foundRow = cursor.next(); | |
log.info("Row key: {}", foundRow.getKey()); | |
log.info(" column1: {}", foundRow.getString("column1")); | |
log.info(" '2': {}", foundRow.getString(2)); | |
log.info(" '3': {}", foundRow.getBoolean(3)); | |
log.info(" UUID: {}", foundRow.getUUID(42)); | |
log.info(" 'counter1': {}", foundRow.getCount("counter1")); | |
log.info(" '1234L': {}", foundRow.getCount(1234L)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment