HubSpot Backport: HBASE-27038 CellComparator should extend Serializable

This commit is contained in:
Bryan Beaudreault 2022-06-06 08:54:10 -04:00
parent fe19a63d13
commit a246b68ca5
2 changed files with 4 additions and 1 deletions

View File

@ -17,6 +17,7 @@
*/
package org.apache.hadoop.hbase;
import java.io.Serializable;
import java.nio.ByteBuffer;
import java.util.Comparator;
import org.apache.hadoop.hbase.util.ByteBufferUtils;
@ -30,7 +31,7 @@ import org.apache.yetus.audience.InterfaceStability;
*/
@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface CellComparator extends Comparator<Cell> {
public interface CellComparator extends Comparator<Cell>, Serializable {
/**
* A comparator for ordering cells in user-space tables. Useful when writing cells in sorted
* order as necessary for bulk import (i.e. via MapReduce).

View File

@ -45,6 +45,8 @@ import org.apache.yetus.audience.InterfaceStability;
@InterfaceStability.Evolving
public class CellComparatorImpl implements CellComparator {
private static final long serialVersionUID = 8186411895799094989L;
/**
* Comparator for plain key/values; i.e. non-catalog table key/values. Works on Key portion
* of KeyValue only.