Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated to latest package movements in hector trunk

  • Loading branch information...
commit 8e21d28db8fe53ccea7fabf39037737d2a794faf 1 parent 23b1769
zznate authored
View
3  src/main/java/com/riptano/cassandra/hector/example/GetIndexedSlices.java
@@ -1,8 +1,6 @@
package com.riptano.cassandra.hector.example;
-import me.prettyprint.cassandra.model.HectorException;
import me.prettyprint.cassandra.model.IndexedSlicesQuery;
-import me.prettyprint.cassandra.model.IndexedSlicesQueryTest;
import me.prettyprint.cassandra.model.KeyspaceOperator;
import me.prettyprint.cassandra.model.Mutator;
import me.prettyprint.cassandra.model.OrderedRows;
@@ -10,6 +8,7 @@
import me.prettyprint.cassandra.serializers.LongSerializer;
import me.prettyprint.cassandra.serializers.StringSerializer;
import me.prettyprint.cassandra.service.Cluster;
+import me.prettyprint.hector.api.exceptions.HectorException;
import me.prettyprint.hector.api.factory.HFactory;
/**
View
19 src/main/java/com/riptano/cassandra/hector/example/GetRangeSlicesKeysOnly.java
@@ -1,11 +1,5 @@
package com.riptano.cassandra.hector.example;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import me.prettyprint.cassandra.model.HectorException;
import me.prettyprint.cassandra.model.KeyspaceOperator;
import me.prettyprint.cassandra.model.Mutator;
import me.prettyprint.cassandra.model.OrderedRows;
@@ -13,21 +7,10 @@
import me.prettyprint.cassandra.model.Result;
import me.prettyprint.cassandra.model.Row;
import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.service.CassandraClient;
-import me.prettyprint.cassandra.service.CassandraClientPool;
-import me.prettyprint.cassandra.service.CassandraClientPoolFactory;
import me.prettyprint.cassandra.service.Cluster;
-import me.prettyprint.cassandra.service.Keyspace;
-import me.prettyprint.cassandra.utils.StringUtils;
+import me.prettyprint.hector.api.exceptions.HectorException;
import me.prettyprint.hector.api.factory.HFactory;
-import org.apache.cassandra.thrift.Column;
-import org.apache.cassandra.thrift.ColumnParent;
-import org.apache.cassandra.thrift.ColumnPath;
-import org.apache.cassandra.thrift.KeyRange;
-import org.apache.cassandra.thrift.SlicePredicate;
-import org.apache.cassandra.thrift.SliceRange;
-
/**
* Use get_range_slices to retrieve the keys without deserializing the columns.
* For clear results, it's best to run this on an empty ColumnFamily.
View
7 src/main/java/com/riptano/cassandra/hector/example/InsertSingleColumn.java
@@ -1,12 +1,12 @@
package com.riptano.cassandra.hector.example;
import me.prettyprint.cassandra.model.HColumn;
-import me.prettyprint.cassandra.model.HectorException;
import me.prettyprint.cassandra.model.KeyspaceOperator;
import me.prettyprint.cassandra.model.Mutator;
import me.prettyprint.cassandra.model.Result;
import me.prettyprint.cassandra.serializers.StringSerializer;
import me.prettyprint.cassandra.service.Cluster;
+import me.prettyprint.hector.api.exceptions.HectorException;
import me.prettyprint.hector.api.factory.HFactory;
import me.prettyprint.hector.api.query.ColumnQuery;
@@ -33,10 +33,9 @@ public static void main(String[] args) throws Exception {
mutator.insert("jsmith", "Standard1", HFactory.createStringColumn("first", "John"));
ColumnQuery<String, String, String> columnQuery = HFactory.createStringColumnQuery(keyspaceOperator);
- columnQuery.setColumnFamily("Standard1");
- columnQuery.setKey("jsmith");
- columnQuery.setName("first");
+ columnQuery.setColumnFamily("Standard1").setKey("jsmith").setName("first");
Result<HColumn<String, String>> result = columnQuery.execute();
+
System.out.println("Read HColumn from cassandra: " + result.get());
System.out.println("Verify on CLI with: get Keyspace1.Standard1['jsmith'] ");
View
2  src/main/java/com/riptano/cassandra/hector/example/PaginateGetRangeSlices.java
@@ -1,6 +1,5 @@
package com.riptano.cassandra.hector.example;
-import me.prettyprint.cassandra.model.HectorException;
import me.prettyprint.cassandra.model.KeyspaceOperator;
import me.prettyprint.cassandra.model.Mutator;
import me.prettyprint.cassandra.model.OrderedRows;
@@ -9,6 +8,7 @@
import me.prettyprint.cassandra.model.Row;
import me.prettyprint.cassandra.serializers.StringSerializer;
import me.prettyprint.cassandra.service.Cluster;
+import me.prettyprint.hector.api.exceptions.HectorException;
import me.prettyprint.hector.api.factory.HFactory;
/**
View
2  src/main/java/com/riptano/cassandra/hector/example/ResultDetailsDemo.java
@@ -1,6 +1,5 @@
package com.riptano.cassandra.hector.example;
-import me.prettyprint.cassandra.model.HectorException;
import me.prettyprint.cassandra.model.KeyspaceOperator;
import me.prettyprint.cassandra.model.MutationResult;
import me.prettyprint.cassandra.model.Mutator;
@@ -9,6 +8,7 @@
import me.prettyprint.cassandra.model.Result;
import me.prettyprint.cassandra.serializers.StringSerializer;
import me.prettyprint.cassandra.service.Cluster;
+import me.prettyprint.hector.api.exceptions.HectorException;
import me.prettyprint.hector.api.factory.HFactory;
/**
View
19 src/main/java/com/riptano/cassandra/hector/example/TombstonedGetRangeSlices.java
@@ -1,13 +1,6 @@
package com.riptano.cassandra.hector.example;
-import static me.prettyprint.hector.api.factory.HFactory.createSliceQuery;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
import me.prettyprint.cassandra.model.ColumnSlice;
-import me.prettyprint.cassandra.model.HectorException;
import me.prettyprint.cassandra.model.KeyspaceOperator;
import me.prettyprint.cassandra.model.Mutator;
import me.prettyprint.cassandra.model.OrderedRows;
@@ -16,20 +9,10 @@
import me.prettyprint.cassandra.model.Row;
import me.prettyprint.cassandra.model.SliceQuery;
import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.service.CassandraClient;
-import me.prettyprint.cassandra.service.CassandraClientPool;
-import me.prettyprint.cassandra.service.CassandraClientPoolFactory;
import me.prettyprint.cassandra.service.Cluster;
-import me.prettyprint.cassandra.service.Keyspace;
-import me.prettyprint.cassandra.utils.StringUtils;
+import me.prettyprint.hector.api.exceptions.HectorException;
import me.prettyprint.hector.api.factory.HFactory;
-import org.apache.cassandra.thrift.Column;
-import org.apache.cassandra.thrift.ColumnParent;
-import org.apache.cassandra.thrift.ColumnPath;
-import org.apache.cassandra.thrift.SlicePredicate;
-import org.apache.cassandra.thrift.SliceRange;
-
/**
* Shows what tombstoned data looks like in the result sets of
* get_range_slices and get_slice
Please sign in to comment.
Something went wrong with that request. Please try again.