hello.
why do we have to set the map and reduce classes as static?
i need inside them to access some data which is not static. what i should do?

non static map or reduce classes generates the following exception:

java.lang.RuntimeException: java.lang.NoSuchMethodException: 
hadoop.examples.Simple$MyMapper.()
   at 
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:45)
   at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:32)
   at 
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:53)
   at org.apache.hadoop.mapred.MapTask.run(MapTask.java:209)
   at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:1210)
Caused by: java.lang.NoSuchMethodException: hadoop.examples.Simple$MyMapper.()
   at java.lang.Class.getConstructor0(Class.java:2705)
   at java.lang.Class.getDeclaredConstructor(Class.java:1984)
   at 
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:41)
   ... 4 more




any ideas?

thanks in advance,

Deyaa

Reply via email to