You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "yizhou (JIRA)" <ji...@apache.org> on 2014/04/01 01:29:15 UTC

[jira] [Created] (CASSANDRA-6963) hadoop_cql3_wordcount example : inconsistent schema definitions means writing results to Cassandra fails.

yizhou created CASSANDRA-6963:
---------------------------------

             Summary: hadoop_cql3_wordcount example : inconsistent schema definitions means writing results to Cassandra fails.
                 Key: CASSANDRA-6963
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6963
             Project: Cassandra
          Issue Type: Bug
          Components: Examples
         Environment: Ubuntu 12.04, Java version 1.7.0_51
            Reporter: yizhou
            Priority: Minor
             Fix For: 2.0.6
         Attachments: Screen Shot 2014-03-31 at 5.28.26 PM.png

The schema defined in WordCountSetup.java specifies 'row_id' as primary key for output_words. Ultimately, this is inconsistent with the assumed schema in WordCount.java. What ends up happening is that within the O.A.C.hadoop.cql3.CqlRecordWriter class, the getPartitionKey function returns null when trying looking up the primary key as 'row_id'. This propagates eventually causing a NullPointerException. The results of wordcount are not recorded in Cassandra as a result.

This error can be reproduced on cassandra 2.0.6 by building cassandra, building the hadoop_cql3_wordcount example, and then running word_count_setup and word_count.

I attached a patch which modifies the output_words schema so that every runs out of the box.
I attached a screenshot of the exception stack.



--
This message was sent by Atlassian JIRA
(v6.2#6252)