cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Probst <ser...@preisroboter.de>
Subject import data into cassandra
Date Wed, 24 Feb 2010 17:43:33 GMT
Hi,

i'm playing around a little bit with cassandra and trying to load some data into it. I've
found the sstable2json and json2sstable scripts inside the /bin dir and tried to work with
this scripts. I've wrote a wrapper which transform csv's into a json file and the json-validator
throws no failures. But every time i tried to import the json, a exception is thrown:

host:/opt/cassandra# bin/json2sstable -K Keyspace1 -c col1 ../utf8_cassandra.json data/Keyspace1/col1-2-Data.db

Exception in thread "main" java.lang.NumberFormatException: For input string: "PR"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Integer.parseInt(Integer.java:447)
        at org.apache.cassandra.utils.FBUtilities.hexToBytes(FBUtilities.java:255)
        at org.apache.cassandra.tools.SSTableImport.addToStandardCF(SSTableImport.java:89)
        at org.apache.cassandra.tools.SSTableImport.importJson(SSTableImport.java:156)
        at org.apache.cassandra.tools.SSTableImport.main(SSTableImport.java:207) 

The Keyspace is configured as follows:
   <Keyspace Name="Keyspace1">
      <ColumnFamily CompareWith="UTF8Type" Name="col1" Comment="some data"/>
    </Keyspace>

Is there another way to import some data, maybe a tool or something? I've used the latest
stable cassandra version (0.5.0).

Thanks
Martin
Mime
View raw message