From 046e51085f7c1c874a423380c3c100aea3cfcbbd Mon Sep 17 00:00:00 2001 From: Bryan Beaudreault Date: Mon, 6 Jun 2022 17:44:13 -0400 Subject: [PATCH] HBASE-27038 CellComparator should extend Serializable (#4492) Signed-off-by: Andrew Purtell --- .../src/main/java/org/apache/hadoop/hbase/CellComparator.java | 3 ++- .../main/java/org/apache/hadoop/hbase/CellComparatorImpl.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java index 7b2c121213c1..301223ad2940 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java @@ -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 @@ */ @InterfaceAudience.Public @InterfaceStability.Evolving -public interface CellComparator extends Comparator { +public interface CellComparator extends Comparator, 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). diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java index 6f25f9493a66..5992b8b404be 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java @@ -47,6 +47,8 @@ @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.