Hi all,
I'm using hadoop for my thesis and have implemented an application for
hadoop 0.20.2
On 0.20.2 everything went fine but after switching to 0.21.0, I get the
following error several times:
java.lang.RuntimeException: Error in configuring object
at
org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:101)
at
org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:72)
at
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:125)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:393)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:330)
at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.ja
va:742)
at org.apache.hadoop.mapred.Child.main(Child.java:211)
Caused by: java.lang.reflect.InvocationTargetException
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.ReflectionUtils.setJobConf(ReflectionUtils.java:96)
After searching for this error, I know that this might come from the mapper
configuration when passing objects to the mapper via the JobConf.
Indeed, I need to pass a class to the mappers and am using the JobConf.
Below is my configuration method:
public void configure(JobConf job) {
super.configure(job);
String metricExpression =
job.get(LimesMRConfiguration.CONFIG_METRIC_EXPRESSION);
try {
this.mf = job.getClass(LimesMRConfiguration.CONFIG_METRIC_FACTORY_TYPE,
SimpleMetricFactory.class, MetricFactory.class).newInstance();
mf.setExpression(metricExpression);
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
Does anyone know why this code doesn't work anymore?
And does anyone have a solution for this?
Thanks.