Permalink
Browse files

updated to fix issue via https://github.com/rantav/hector/issues/405

…thanks to GH user @quorg for the submission
  • Loading branch information...
1 parent 550cbb4 commit a855ab2a8d772d4cedda0ebdee4e1e92d83cf572 zznate committed Jan 30, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/main/java/com/riptano/cassandra/hector/example/SchemaManipulation.java
@@ -7,13 +7,8 @@
import me.prettyprint.cassandra.model.BasicColumnFamilyDefinition;
import me.prettyprint.cassandra.serializers.StringSerializer;
import me.prettyprint.cassandra.service.ThriftCfDef;
-import me.prettyprint.cassandra.service.ThriftKsDef;
import me.prettyprint.hector.api.Cluster;
-import me.prettyprint.hector.api.ddl.ColumnFamilyDefinition;
-import me.prettyprint.hector.api.ddl.ColumnIndexType;
-import me.prettyprint.hector.api.ddl.ColumnType;
-import me.prettyprint.hector.api.ddl.ComparatorType;
-import me.prettyprint.hector.api.ddl.KeyspaceDefinition;
+import me.prettyprint.hector.api.ddl.*;
import me.prettyprint.hector.api.exceptions.HectorException;
import me.prettyprint.hector.api.factory.HFactory;
@@ -47,6 +42,7 @@ public static void main(String[] args) throws Exception {
BasicColumnDefinition columnDefinition = new BasicColumnDefinition();
columnDefinition.setName(stringSerializer.toByteBuffer("birthdate"));
+ columnDefinition.setIndexName("birthdate_idx");
columnDefinition.setIndexType(ColumnIndexType.KEYS);
columnDefinition.setValidationClass(ComparatorType.LONGTYPE.getClassName());

0 comments on commit a855ab2

Please sign in to comment.