HBASE-12929 TableMapReduceUtil.initTableMapperJob unnecessarily limits the types of outputKeyClass and outputValueClass (Will Temperley)

This commit is contained in:
tedyu 2015-01-27 07:58:48 -08:00
parent e7bb32c240
commit f1bd041113
1 changed files with 6 additions and 7 deletions

View File

@ -57,7 +57,6 @@ import org.apache.hadoop.hbase.util.Base64;
import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.zookeeper.ZKUtil; import org.apache.hadoop.hbase.zookeeper.ZKUtil;
import org.apache.hadoop.io.Writable; import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.mapreduce.InputFormat; import org.apache.hadoop.mapreduce.InputFormat;
import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.util.StringUtils;
@ -354,8 +353,8 @@ public class TableMapReduceUtil {
*/ */
public static void initTableMapperJob(List<Scan> scans, public static void initTableMapperJob(List<Scan> scans,
Class<? extends TableMapper> mapper, Class<? extends TableMapper> mapper,
Class<? extends WritableComparable> outputKeyClass, Class<?> outputKeyClass,
Class<? extends Writable> outputValueClass, Job job) throws IOException { Class<?> outputValueClass, Job job) throws IOException {
initTableMapperJob(scans, mapper, outputKeyClass, outputValueClass, job, initTableMapperJob(scans, mapper, outputKeyClass, outputValueClass, job,
true); true);
} }
@ -376,8 +375,8 @@ public class TableMapReduceUtil {
*/ */
public static void initTableMapperJob(List<Scan> scans, public static void initTableMapperJob(List<Scan> scans,
Class<? extends TableMapper> mapper, Class<? extends TableMapper> mapper,
Class<? extends WritableComparable> outputKeyClass, Class<?> outputKeyClass,
Class<? extends Writable> outputValueClass, Job job, Class<?> outputValueClass, Job job,
boolean addDependencyJars) throws IOException { boolean addDependencyJars) throws IOException {
initTableMapperJob(scans, mapper, outputKeyClass, outputValueClass, job, initTableMapperJob(scans, mapper, outputKeyClass, outputValueClass, job,
addDependencyJars, true); addDependencyJars, true);
@ -400,8 +399,8 @@ public class TableMapReduceUtil {
*/ */
public static void initTableMapperJob(List<Scan> scans, public static void initTableMapperJob(List<Scan> scans,
Class<? extends TableMapper> mapper, Class<? extends TableMapper> mapper,
Class<? extends WritableComparable> outputKeyClass, Class<?> outputKeyClass,
Class<? extends Writable> outputValueClass, Job job, Class<?> outputValueClass, Job job,
boolean addDependencyJars, boolean addDependencyJars,
boolean initCredentials) throws IOException { boolean initCredentials) throws IOException {
job.setInputFormatClass(MultiTableInputFormat.class); job.setInputFormatClass(MultiTableInputFormat.class);