Fixed issure related to initialization of Job Conf in HadoopReducer
git-svn-id: https://hyracks.googlecode.com/svn/trunk/hyracks@190 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-dataflow-hadoop/src/main/java/edu/uci/ics/hyracks/dataflow/hadoop/HadoopReducerOperatorDescriptor.java b/hyracks-dataflow-hadoop/src/main/java/edu/uci/ics/hyracks/dataflow/hadoop/HadoopReducerOperatorDescriptor.java
index b27cb40..ca895cc 100644
--- a/hyracks-dataflow-hadoop/src/main/java/edu/uci/ics/hyracks/dataflow/hadoop/HadoopReducerOperatorDescriptor.java
+++ b/hyracks-dataflow-hadoop/src/main/java/edu/uci/ics/hyracks/dataflow/hadoop/HadoopReducerOperatorDescriptor.java
@@ -319,16 +319,16 @@
private Object createReducer() throws Exception {
if (reducerClass != null) {
- return ReflectionUtils.newInstance(reducerClass, jobConf);
+ return ReflectionUtils.newInstance(reducerClass, getJobConf());
} else {
Object reducer;
- if(jobConf.getUseNewReducer()){
- JobContext jobContext = new JobContext(jobConf, null);
+ if(getJobConf().getUseNewReducer()){
+ JobContext jobContext = new JobContext(getJobConf(), null);
reducerClass = (Class<? extends org.apache.hadoop.mapreduce.Reducer<?,?,?,?>> )jobContext.getReducerClass();
} else {
- reducerClass = (Class<? extends Reducer>) jobConf.getReducerClass();
+ reducerClass = (Class<? extends Reducer>) getJobConf().getReducerClass();
}
- reducer = getHadoopClassFactory().createReducer(reducerClass.getName(),jobConf);
+ reducer = getHadoopClassFactory().createReducer(reducerClass.getName(),getJobConf());
return reducer;
}
}