HBASE-18945 Make a IA.LimitedPrivate interface for CellComparator - addendum fixes compilation for branch-2

This commit is contained in:
tedyu 2017-10-17 16:30:53 -07:00
parent 16ccd55c43
commit 998bc32ec9
2 changed files with 3 additions and 3 deletions

View File

@ -164,7 +164,7 @@ public class Import extends Configured implements Tool {
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "EQ_COMPARETO_USE_OBJECT_EQUALS", @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "EQ_COMPARETO_USE_OBJECT_EQUALS",
justification = "This is wrong, yes, but we should be purging Writables, not fixing them") justification = "This is wrong, yes, but we should be purging Writables, not fixing them")
public int compareTo(KeyValueWritableComparable o) { public int compareTo(KeyValueWritableComparable o) {
return CellComparator.COMPARATOR.compare(this.kv, ((KeyValueWritableComparable) o).kv); return CellComparatorImpl.COMPARATOR.compare(this.kv, ((KeyValueWritableComparable) o).kv);
} }
public static class KeyValueWritableComparator extends WritableComparator { public static class KeyValueWritableComparator extends WritableComparator {

View File

@ -21,7 +21,7 @@ package org.apache.hadoop.hbase.mapreduce;
import java.util.TreeSet; import java.util.TreeSet;
import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceAudience;
import org.apache.hadoop.hbase.CellComparator; import org.apache.hadoop.hbase.CellComparatorImpl;
import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.hadoop.mapreduce.Reducer; import org.apache.hadoop.mapreduce.Reducer;
@ -42,7 +42,7 @@ public class KeyValueSortReducer
protected void reduce(ImmutableBytesWritable row, Iterable<KeyValue> kvs, protected void reduce(ImmutableBytesWritable row, Iterable<KeyValue> kvs,
Reducer<ImmutableBytesWritable, KeyValue, ImmutableBytesWritable, KeyValue>.Context context) Reducer<ImmutableBytesWritable, KeyValue, ImmutableBytesWritable, KeyValue>.Context context)
throws java.io.IOException, InterruptedException { throws java.io.IOException, InterruptedException {
TreeSet<KeyValue> map = new TreeSet<>(CellComparator.COMPARATOR); TreeSet<KeyValue> map = new TreeSet<>(CellComparatorImpl.COMPARATOR);
for (KeyValue kv: kvs) { for (KeyValue kv: kvs) {
try { try {
map.add(kv.clone()); map.add(kv.clone());