Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 58512CDC9 for ; Mon, 17 Mar 2014 16:54:36 +0000 (UTC) Received: (qmail 41814 invoked by uid 500); 17 Mar 2014 16:54:27 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 40984 invoked by uid 500); 17 Mar 2014 16:54:07 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 40906 invoked by uid 99); 17 Mar 2014 16:54:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2014 16:54:05 +0000 Date: Mon, 17 Mar 2014 16:54:05 +0000 (UTC) From: "Alex Liu (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-6793) NPE in Hadoop Word count example MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-6793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13938021#comment-13938021 ] Alex Liu commented on CASSANDRA-6793: ------------------------------------- +1 except for change bin/* file permission to executable. > NPE in Hadoop Word count example > -------------------------------- > > Key: CASSANDRA-6793 > URL: https://issues.apache.org/jira/browse/CASSANDRA-6793 > Project: Cassandra > Issue Type: Bug > Components: Examples > Reporter: Chander S Pechetty > Assignee: Chander S Pechetty > Priority: Minor > Labels: hadoop > Fix For: 2.0.7, 2.1 beta2 > > Attachments: trunk-6793-v2.txt, trunk-6793-v3.txt, trunk-6793.txt > > > The partition keys requested in WordCount.java do not match the primary key set up in the table output_words. It looks this patch was not merged properly from [CASSANDRA-5622|https://issues.apache.org/jira/browse/CASSANDRA-5622].The attached patch addresses the NPE and uses the correct keys defined in #5622. > I am assuming there is no need to fix the actual NPE like throwing an InvalidRequestException back to user to fix the partition keys, as it would be trivial to get the same from the TableMetadata using the driver API. > java.lang.NullPointerException > at org.apache.cassandra.dht.Murmur3Partitioner.getToken(Murmur3Partitioner.java:92) > at org.apache.cassandra.dht.Murmur3Partitioner.getToken(Murmur3Partitioner.java:40) > at org.apache.cassandra.client.RingCache.getRange(RingCache.java:117) > at org.apache.cassandra.hadoop.cql3.CqlRecordWriter.write(CqlRecordWriter.java:163) > at org.apache.cassandra.hadoop.cql3.CqlRecordWriter.write(CqlRecordWriter.java:63) > at org.apache.hadoop.mapred.ReduceTask$NewTrackingRecordWriter.write(ReduceTask.java:587) > at org.apache.hadoop.mapreduce.TaskInputOutputContext.write(TaskInputOutputContext.java:80) > at WordCount$ReducerToCassandra.reduce(Unknown Source) > at WordCount$ReducerToCassandra.reduce(Unknown Source) > at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:176) > at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649) > at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417) > at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:260) -- This message was sent by Atlassian JIRA (v6.2#6252)