From 93996bd57897af6114472fdd08a3d647c85e7e42 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 7b2c121213c..301223ad294 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 @@ import org.apache.yetus.audience.InterfaceStability; */ @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 71513c89c83..4b138979beb 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 @@ -46,6 +46,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.