Hector error inserting integer
===

I am running a single node Cassandra instance (for dev purposes) and am looking to insert an integer row into it. My Keyspace and columnfamily are already created on Cassandra.

I am using Cassandra 1.0 with Hector 1.0.5 (Jar version). My code is as follows:

    Cluster cluster = HFactory.getOrCreateCluster("Test Cluster", "10.40.14.93:9160");

    Keyspace keyspaceOperator = HFactory.createKeyspace("mykeyspace", cluster)

    Mutator intM = HFactory.createMutator(keyspaceOperator, IntegerSerializer.get());

    for each elem in my list {

     intM.insert(doc.document_id , 
                "mycolfamily",
                me.prettyprint.hector.api.factory.HFactory.createColumn("numAdults", doc.numAdults))
    }

I get TimedOutException on my client, and in the Cassandra logs, I see a bunch of the following:

    ERROR [MutationStage:357] 2012-07-20 08:15:02,106 AbstractCassandraDaemon.java (line  139) Fatal exception in thread Thread[MutationStage:357,5,main]
    java.lang.RuntimeException: java.lang.NumberFormatException: For input string: ""
            at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1228)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.NumberFormatException: For input string: ""
            at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
            at java.lang.Long.parseLong(Long.java:410)
            at java.lang.Long.parseLong(Long.java:468)
            at org.apache.solr.schema.TrieField.createField(TrieField.java:508)
            at org.apache.solr.schema.FieldType.createFields(FieldType.java:292)
            at org.apache.solr.schema.SchemaField.createFields(SchemaField.java:106)
            at com.datastax.bdp.cassandra.index.solr.SolrSecondaryIndex.addFieldToDocument(SolrSecondaryIndex.java:382)
            at com.datastax.bdp.cassandra.index.solr.SolrSecondaryIndex.populateDocument(SolrSecondaryIndex.java:280)
            at com.datastax.bdp.cassandra.index.solr.SolrSecondaryIndex.applyIndexUpdates(SolrSecondaryIndex.java:164)
            at org.apache.cassandra.db.index.SecondaryIndexManager.applyIndexUpdates(SecondaryIndexManager.java:419)
            at org.apache.cassandra.db.Table.apply(Table.java:448)
            at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:256)
            at org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:415)
            at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1224)
            ... 3 more
    ERROR [MutationStage:357] 2012-07-20 08:15:02,106 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[MutationStage:357,5,main]
    java.lang.RuntimeException: java.lang.NumberFormatException: For input string: ""
            at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1228)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.NumberFormatException: For input string: ""
            at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
            at java.lang.Long.parseLong(Long.java:410)
            at java.lang.Long.parseLong(Long.java:468)
            at org.apache.solr.schema.TrieField.createField(TrieField.java:508)
            at org.apache.solr.schema.FieldType.createFields(FieldType.java:292)
            at org.apache.solr.schema.SchemaField.createFields(SchemaField.java:106)
            at com.datastax.bdp.cassandra.index.solr.SolrSecondaryIndex.addFieldToDocument(SolrSecondaryIndex.java:382)
            at com.datastax.bdp.cassandra.index.solr.SolrSecondaryIndex.populateDocument(SolrSecondaryIndex.java:280)
            at com.datastax.bdp.cassandra.index.solr.SolrSecondaryIndex.applyIndexUpdates(SolrSecondaryIndex.java:164)
            at org.apache.cassandra.db.index.SecondaryIndexManager.applyIndexUpdates(SecondaryIndexManager.java:419)
            at org.apache.cassandra.db.Table.apply(Table.java:448)
            at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:256)
            at org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:415)
            at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1224)
    
    }

I am trialling the Datastax Enterprise (DSE) which packages Cassandra, Hadoop, Solr etc. I have created my Cassandra CF via Solr Configuration (You can post Solr config and schema xmls to a Datastax instance to create the Keyspace and CF - its a feature of DSE)

Could someone please help?
