Refactored WritableComparingComparatorFactory to RawComparingComparatorFactory
git-svn-id: https://hyracks.googlecode.com/svn/trunk/hyracks@257 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 ca895cc..265147f 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
@@ -47,7 +47,7 @@
import edu.uci.ics.hyracks.api.job.IOperatorEnvironment;
import edu.uci.ics.hyracks.api.job.JobSpecification;
import edu.uci.ics.hyracks.dataflow.hadoop.data.KeyComparatorFactory;
-import edu.uci.ics.hyracks.dataflow.hadoop.data.WritableComparingComparatorFactory;
+import edu.uci.ics.hyracks.dataflow.hadoop.data.RawComparingComparatorFactory;
import edu.uci.ics.hyracks.dataflow.hadoop.util.DatatypeHelper;
import edu.uci.ics.hyracks.dataflow.hadoop.util.IHadoopClassFactory;
import edu.uci.ics.hyracks.dataflow.std.base.IOpenableDataWriterOperator;
@@ -353,7 +353,7 @@
rawComparator = WritableComparator.get((Class<? extends WritableComparable>) Class
.forName(mapOutputKeyClass));
}
- this.comparatorFactory = new WritableComparingComparatorFactory(rawComparator.getClass());
+ this.comparatorFactory = new RawComparingComparatorFactory(rawComparator.getClass());
}
}
IOpenableDataWriterOperator op = new DeserializedPreclusteredGroupOperator(new int[] { 0 },
diff --git a/hyracks-dataflow-hadoop/src/main/java/edu/uci/ics/hyracks/dataflow/hadoop/data/WritableComparingComparatorFactory.java b/hyracks-dataflow-hadoop/src/main/java/edu/uci/ics/hyracks/dataflow/hadoop/data/RawComparingComparatorFactory.java
similarity index 77%
rename from hyracks-dataflow-hadoop/src/main/java/edu/uci/ics/hyracks/dataflow/hadoop/data/WritableComparingComparatorFactory.java
rename to hyracks-dataflow-hadoop/src/main/java/edu/uci/ics/hyracks/dataflow/hadoop/data/RawComparingComparatorFactory.java
index cec29d5..329fb86 100644
--- a/hyracks-dataflow-hadoop/src/main/java/edu/uci/ics/hyracks/dataflow/hadoop/data/WritableComparingComparatorFactory.java
+++ b/hyracks-dataflow-hadoop/src/main/java/edu/uci/ics/hyracks/dataflow/hadoop/data/RawComparingComparatorFactory.java
@@ -21,10 +21,10 @@
import edu.uci.ics.hyracks.api.dataflow.value.IComparatorFactory;
import edu.uci.ics.hyracks.dataflow.common.util.ReflectionUtils;
-public class WritableComparingComparatorFactory<T> implements IComparatorFactory<WritableComparable<T>> {
- private Class<? extends RawComparator<? super WritableComparable<T>>> klass;
+public class RawComparingComparatorFactory<T> implements IComparatorFactory<WritableComparable<T>> {
+ private Class<? extends RawComparator> klass;
- public WritableComparingComparatorFactory(Class<? extends RawComparator<? super WritableComparable<T>>> klass) {
+ public RawComparingComparatorFactory(Class<? extends RawComparator> klass) {
this.klass = klass;
}
@@ -32,7 +32,7 @@
@Override
public IComparator<WritableComparable<T>> createComparator() {
- final RawComparator<? super WritableComparable<T>> instance = ReflectionUtils.createInstance(klass);
+ final RawComparator instance = ReflectionUtils.createInstance(klass);
return new IComparator<WritableComparable<T>>() {
@Override
public int compare(WritableComparable<T> o1, WritableComparable<T> o2) {