incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Lumby <johnlu...@hotmail.com>
Subject cassandra hadoop reducer writing to CQL3 - primary key - must it be text type?
Date Wed, 09 Oct 2013 00:00:34 GMT
I have been expermimenting with using hadoop for a map/reduce operation on cassandra,
outputting to the CqlOutputFormat.class.
I based my first program fairly closely on the famous WordCount example in 
examples/hadoop_cql3_word_count
except  ---  I set my output colfamily to have a bigint primary key :

CREATE TABLE archive_recordids ( recordid bigint , count_num bigint, PRIMARY KEY (recordid))

and simply tried setting this key as one of the keys in the output 
            keys.put("recordid", ByteBufferUtil.bytes(recordid.longValue()));

but it always failed with a strange error :

java.io.IOException: InvalidRequestException(why:Key may not be empty) 		 	   		  
Mime
View raw message