You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Patrik Modesto <pa...@gmail.com> on 2010/11/10 12:47:38 UTC

Re: WordCount example problem

Hi,

I'm trying the WordCount example and getting this error:

[12:33]$ ./bin/word_count
10/11/10 12:34:35 INFO WordCount: output reducer type: filesystem
10/11/10 12:34:36 INFO jvm.JvmMetrics: Initializing JVM Metrics with
processName=JobTracker, sessionId=
10/11/10 12:34:36 INFO WordCount: XXX:text0
10/11/10 12:34:36 INFO mapred.JobClient: Running job: job_local_0001
10/11/10 12:34:36 INFO mapred.MapTask: io.sort.mb = 100
10/11/10 12:34:36 INFO mapred.MapTask: data buffer = 79691776/99614720
10/11/10 12:34:36 INFO mapred.MapTask: record buffer = 262144/327680
10/11/10 12:34:36 WARN mapred.LocalJobRunner: job_local_0001
java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to [B
       at WordCount$TokenizerMapper.map(WordCount.java:73)
       at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
       at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)
       at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
       at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:177)
10/11/10 12:34:37 INFO mapred.JobClient:  map 0% reduce 0%
10/11/10 12:34:37 INFO mapred.JobClient: Job complete: job_local_0001
10/11/10 12:34:37 INFO mapred.JobClient: Counters: 0

I'm using cassandra 0.7.0beta3 (from latest trunk) on just one
machine. Is the example working for anybody?

Thanks,
P.

Re: WordCount example problem

Posted by Patrik Modesto <pa...@gmail.com>.
That's exactly what's happening to me. I wonder why Google did't find it.

Thanks!

P.

On Wed, Nov 10, 2010 at 15:39, Jonathan Ellis <jb...@gmail.com> wrote:
> http://www.mail-archive.com/user@cassandra.apache.org/msg07093.html
>
> On Wed, Nov 10, 2010 at 5:47 AM, Patrik Modesto
> <pa...@gmail.com> wrote:
>> Hi,
>>
>> I'm trying the WordCount example and getting this error:
>>
>> [12:33]$ ./bin/word_count
>> 10/11/10 12:34:35 INFO WordCount: output reducer type: filesystem
>> 10/11/10 12:34:36 INFO jvm.JvmMetrics: Initializing JVM Metrics with
>> processName=JobTracker, sessionId=
>> 10/11/10 12:34:36 INFO WordCount: XXX:text0
>> 10/11/10 12:34:36 INFO mapred.JobClient: Running job: job_local_0001
>> 10/11/10 12:34:36 INFO mapred.MapTask: io.sort.mb = 100
>> 10/11/10 12:34:36 INFO mapred.MapTask: data buffer = 79691776/99614720
>> 10/11/10 12:34:36 INFO mapred.MapTask: record buffer = 262144/327680
>> 10/11/10 12:34:36 WARN mapred.LocalJobRunner: job_local_0001
>> java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to [B
>>        at WordCount$TokenizerMapper.map(WordCount.java:73)
>>        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
>>        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)
>>        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
>>        at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:177)
>> 10/11/10 12:34:37 INFO mapred.JobClient:  map 0% reduce 0%
>> 10/11/10 12:34:37 INFO mapred.JobClient: Job complete: job_local_0001
>> 10/11/10 12:34:37 INFO mapred.JobClient: Counters: 0
>>
>> I'm using cassandra 0.7.0beta3 (from latest trunk) on just one
>> machine. Is the example working for anybody?
>>
>> Thanks,
>> P.
>>
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>

Re: WordCount example problem

Posted by Patrik Modesto <pa...@gmail.com>.
Thanks, I'll do.

P.

On Wed, Nov 10, 2010 at 16:28, Aditya Muralidharan
<Ad...@nisc.coop> wrote:
> Also, your Mapper class needs to look like this:
> MyMapper extends Mapper<ByteBuffer, SortedMap<ByteBuffer, IColumn>,Text,SumWritable> ... with all the necessary fixes to the map method.
>
> AD
>
> -----Original Message-----
> From: Jonathan Ellis [mailto:jbellis@gmail.com]
> Sent: Wednesday, November 10, 2010 8:40 AM
> To: user
> Subject: Re: WordCount example problem
>
> http://www.mail-archive.com/user@cassandra.apache.org/msg07093.html
>
> On Wed, Nov 10, 2010 at 5:47 AM, Patrik Modesto
> <pa...@gmail.com> wrote:
>> Hi,
>>
>> I'm trying the WordCount example and getting this error:
>>
>> [12:33]$ ./bin/word_count
>> 10/11/10 12:34:35 INFO WordCount: output reducer type: filesystem
>> 10/11/10 12:34:36 INFO jvm.JvmMetrics: Initializing JVM Metrics with
>> processName=JobTracker, sessionId=
>> 10/11/10 12:34:36 INFO WordCount: XXX:text0
>> 10/11/10 12:34:36 INFO mapred.JobClient: Running job: job_local_0001
>> 10/11/10 12:34:36 INFO mapred.MapTask: io.sort.mb = 100
>> 10/11/10 12:34:36 INFO mapred.MapTask: data buffer = 79691776/99614720
>> 10/11/10 12:34:36 INFO mapred.MapTask: record buffer = 262144/327680
>> 10/11/10 12:34:36 WARN mapred.LocalJobRunner: job_local_0001
>> java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to [B
>>        at WordCount$TokenizerMapper.map(WordCount.java:73)
>>        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
>>        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)
>>        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
>>        at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:177)
>> 10/11/10 12:34:37 INFO mapred.JobClient:  map 0% reduce 0%
>> 10/11/10 12:34:37 INFO mapred.JobClient: Job complete: job_local_0001
>> 10/11/10 12:34:37 INFO mapred.JobClient: Counters: 0
>>
>> I'm using cassandra 0.7.0beta3 (from latest trunk) on just one
>> machine. Is the example working for anybody?
>>
>> Thanks,
>> P.
>>
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>

RE: WordCount example problem

Posted by Aditya Muralidharan <Ad...@nisc.coop>.
Also, your Mapper class needs to look like this:
MyMapper extends Mapper<ByteBuffer, SortedMap<ByteBuffer, IColumn>,Text,SumWritable> ... with all the necessary fixes to the map method.

AD

-----Original Message-----
From: Jonathan Ellis [mailto:jbellis@gmail.com] 
Sent: Wednesday, November 10, 2010 8:40 AM
To: user
Subject: Re: WordCount example problem

http://www.mail-archive.com/user@cassandra.apache.org/msg07093.html

On Wed, Nov 10, 2010 at 5:47 AM, Patrik Modesto
<pa...@gmail.com> wrote:
> Hi,
>
> I'm trying the WordCount example and getting this error:
>
> [12:33]$ ./bin/word_count
> 10/11/10 12:34:35 INFO WordCount: output reducer type: filesystem
> 10/11/10 12:34:36 INFO jvm.JvmMetrics: Initializing JVM Metrics with
> processName=JobTracker, sessionId=
> 10/11/10 12:34:36 INFO WordCount: XXX:text0
> 10/11/10 12:34:36 INFO mapred.JobClient: Running job: job_local_0001
> 10/11/10 12:34:36 INFO mapred.MapTask: io.sort.mb = 100
> 10/11/10 12:34:36 INFO mapred.MapTask: data buffer = 79691776/99614720
> 10/11/10 12:34:36 INFO mapred.MapTask: record buffer = 262144/327680
> 10/11/10 12:34:36 WARN mapred.LocalJobRunner: job_local_0001
> java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to [B
>        at WordCount$TokenizerMapper.map(WordCount.java:73)
>        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
>        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)
>        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
>        at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:177)
> 10/11/10 12:34:37 INFO mapred.JobClient:  map 0% reduce 0%
> 10/11/10 12:34:37 INFO mapred.JobClient: Job complete: job_local_0001
> 10/11/10 12:34:37 INFO mapred.JobClient: Counters: 0
>
> I'm using cassandra 0.7.0beta3 (from latest trunk) on just one
> machine. Is the example working for anybody?
>
> Thanks,
> P.
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

Re: WordCount example problem

Posted by Jonathan Ellis <jb...@gmail.com>.
http://www.mail-archive.com/user@cassandra.apache.org/msg07093.html

On Wed, Nov 10, 2010 at 5:47 AM, Patrik Modesto
<pa...@gmail.com> wrote:
> Hi,
>
> I'm trying the WordCount example and getting this error:
>
> [12:33]$ ./bin/word_count
> 10/11/10 12:34:35 INFO WordCount: output reducer type: filesystem
> 10/11/10 12:34:36 INFO jvm.JvmMetrics: Initializing JVM Metrics with
> processName=JobTracker, sessionId=
> 10/11/10 12:34:36 INFO WordCount: XXX:text0
> 10/11/10 12:34:36 INFO mapred.JobClient: Running job: job_local_0001
> 10/11/10 12:34:36 INFO mapred.MapTask: io.sort.mb = 100
> 10/11/10 12:34:36 INFO mapred.MapTask: data buffer = 79691776/99614720
> 10/11/10 12:34:36 INFO mapred.MapTask: record buffer = 262144/327680
> 10/11/10 12:34:36 WARN mapred.LocalJobRunner: job_local_0001
> java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to [B
>        at WordCount$TokenizerMapper.map(WordCount.java:73)
>        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
>        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)
>        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
>        at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:177)
> 10/11/10 12:34:37 INFO mapred.JobClient:  map 0% reduce 0%
> 10/11/10 12:34:37 INFO mapred.JobClient: Job complete: job_local_0001
> 10/11/10 12:34:37 INFO mapred.JobClient: Counters: 0
>
> I'm using cassandra 0.7.0beta3 (from latest trunk) on just one
> machine. Is the example working for anybody?
>
> Thanks,
> P.
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com