You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Shyam Sarkar <sh...@gmail.com> on 2009/01/20 22:01:21 UTC

Null Pointer with Pattern file

Hi,

I was trying to run Hadoop wordcount version 2 example under Cygwin. I tried
without pattern.txt file -- It works fine.
I tried with pattern.txt file to skip some patterns, I get NULL POINTER
exception as follows::

09/01/20 12:56:16 INFO jvm.JvmMetrics: Initializing JVM Metrics with
processName=JobTracker, sessionId=
09/01/20 12:56:17 WARN mapred.JobClient: No job jar file set.  User classes
may not be found. See JobConf(Class) or JobConf#setJar(String).
09/01/20 12:56:17 INFO mapred.FileInputFormat: Total input paths to process
: 4
09/01/20 12:56:17 INFO mapred.JobClient: Running job: job_local_0001
09/01/20 12:56:17 INFO mapred.FileInputFormat: Total input paths to process
: 4
09/01/20 12:56:17 INFO mapred.MapTask: numReduceTasks: 1
09/01/20 12:56:17 INFO mapred.MapTask: io.sort.mb = 100
09/01/20 12:56:17 INFO mapred.MapTask: data buffer = 79691776/99614720
09/01/20 12:56:17 INFO mapred.MapTask: record buffer = 262144/327680
09/01/20 12:56:17 WARN mapred.LocalJobRunner: job_local_0001
java.lang.NullPointerException
 at org.myorg.WordCount$Map.configure(WordCount.java:39)
 at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:58)
 at
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:83)
 at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:34)
 at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:58)
 at
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:83)
 at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
 at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:138)
java.io.IOException: Job failed!
 at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1217)
 at org.myorg.WordCount.run(WordCount.java:114)
 at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
 at org.myorg.WordCount.main(WordCount.java:119)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
 at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
 at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
 at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
 at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)


Please tell me what should I do.

Thanks,
shyam.s.sarkar@gmail.com

Re: Null Pointer with Pattern file

Posted by Rasit OZDAS <ra...@gmail.com>.
Hi,
Try to use:

conf.setJarByClass(EchoOche.class);  // conf is the JobConf instance of your
example.

Hope this helps,
Rasit

2009/1/20 Shyam Sarkar <sh...@gmail.com>

> Hi,
>
> I was trying to run Hadoop wordcount version 2 example under Cygwin. I
> tried
> without pattern.txt file -- It works fine.
> I tried with pattern.txt file to skip some patterns, I get NULL POINTER
> exception as follows::
>
> 09/01/20 12:56:16 INFO jvm.JvmMetrics: Initializing JVM Metrics with
> processName=JobTracker, sessionId=
> 09/01/20 12:56:17 WARN mapred.JobClient: No job jar file set.  User classes
> may not be found. See JobConf(Class) or JobConf#setJar(String).
> 09/01/20 12:56:17 INFO mapred.FileInputFormat: Total input paths to process
> : 4
> 09/01/20 12:56:17 INFO mapred.JobClient: Running job: job_local_0001
> 09/01/20 12:56:17 INFO mapred.FileInputFormat: Total input paths to process
> : 4
> 09/01/20 12:56:17 INFO mapred.MapTask: numReduceTasks: 1
> 09/01/20 12:56:17 INFO mapred.MapTask: io.sort.mb = 100
> 09/01/20 12:56:17 INFO mapred.MapTask: data buffer = 79691776/99614720
> 09/01/20 12:56:17 INFO mapred.MapTask: record buffer = 262144/327680
> 09/01/20 12:56:17 WARN mapred.LocalJobRunner: job_local_0001
> java.lang.NullPointerException
>  at org.myorg.WordCount$Map.configure(WordCount.java:39)
>  at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:58)
>  at
> org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:83)
>  at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:34)
>  at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:58)
>  at
> org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:83)
>  at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>  at
> org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:138)
> java.io.IOException: Job failed!
>  at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1217)
>  at org.myorg.WordCount.run(WordCount.java:114)
>  at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>  at org.myorg.WordCount.main(WordCount.java:119)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:597)
>  at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
>  at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
>  at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>  at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
>  at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
>
>
> Please tell me what should I do.
>
> Thanks,
> shyam.s.sarkar@gmail.com
>



-- 
M. Raşit ÖZDAŞ