You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bb...@apache.org on 2022/06/06 21:48:22 UTC

[hbase] branch branch-2 updated: HBASE-27038 CellComparator should extend Serializable (#4492)

This is an automated email from the ASF dual-hosted git repository.

bbeaudreault pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 50e2ef24d5f HBASE-27038 CellComparator should extend Serializable (#4492)
50e2ef24d5f is described below

commit 50e2ef24d5f55fab164197f0579d6277dc033ed7
Author: Bryan Beaudreault <bb...@hubspot.com>
AuthorDate: Mon Jun 6 17:44:13 2022 -0400

    HBASE-27038 CellComparator should extend Serializable (#4492)
    
    Signed-off-by: Andrew Purtell <ap...@apache.org>
---
 hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java | 3 ++-
 .../src/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<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).
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 6f25f9493a6..5992b8b404b 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 @@ 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.