Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated to remove clock

  • Loading branch information...
commit 275b4a527e3dad0de61aeffc5c7f194e1cf0a382 1 parent 43d6577
zznate authored
View
4 src/main/java/com/riptano/cassandra/hector/example/DeleteBatchMutate.java
@@ -36,7 +36,7 @@ public static void main(String[] args) throws Exception {
CassandraClient client = cluster.borrowClient();
Keyspace keyspace = client.getKeyspace("Keyspace1");
try {
- Clock clock = keyspace.createClock();
+ Clock clock = new Clock(keyspace.createClock());
Column columnFirst = new Column(StringUtils.bytes("first"),
StringUtils.bytes("John"),
clock);
@@ -64,7 +64,7 @@ public static void main(String[] args) throws Exception {
// re-init the BatchMutation for deletion
batchMutation = new BatchMutation<String>(stringSerializer);
- Deletion deletion = new Deletion(keyspace.createClock());
+ Deletion deletion = new Deletion(new Clock(keyspace.createClock()));
deletion.setPredicate(slicePredicate);
View
6 src/main/java/com/riptano/cassandra/hector/example/InsertSuperColumn.java
@@ -44,11 +44,13 @@ public static void main(String[] args) throws Exception {
KeyspaceOperator keyspaceOperator = HFactory.createKeyspaceOperator("Keyspace1", cluster);
try {
Mutator<String> mutator = HFactory.createMutator(keyspaceOperator, stringSerializer);
- mutator.insert("billing", "Super1", HFactory.createSuperColumn("jsmith", Arrays.asList(HFactory.createStringColumn("first", "John")),
+ mutator.insert("billing", "Super1", HFactory.createSuperColumn("jsmith",
+ Arrays.asList(HFactory.createStringColumn("first", "John")),
stringSerializer, stringSerializer, stringSerializer));
SuperColumnQuery<String, String, String, String> superColumnQuery =
- HFactory.createSuperColumnQuery(keyspaceOperator, stringSerializer, stringSerializer, stringSerializer, stringSerializer);
+ HFactory.createSuperColumnQuery(keyspaceOperator, stringSerializer, stringSerializer,
+ stringSerializer, stringSerializer);
superColumnQuery.setColumnFamily("Super1").setKey("billing").setSuperName("jsmith");
Result<HSuperColumn<String, String, String>> result = superColumnQuery.execute();
Please sign in to comment.
Something went wrong with that request. Please try again.