HBASE-27038 CellComparator should extend Serializable (#4492)

Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
Bryan Beaudreault 2022-06-06 17:44:13 -04:00 committed by GitHub
parent a060e71c53
commit 93996bd578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -17,6 +17,7 @@
*/ */
package org.apache.hadoop.hbase; package org.apache.hadoop.hbase;
import java.io.Serializable;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.Comparator; import java.util.Comparator;
import org.apache.hadoop.hbase.util.ByteBufferUtils; import org.apache.hadoop.hbase.util.ByteBufferUtils;
@ -30,7 +31,7 @@ import org.apache.yetus.audience.InterfaceStability;
*/ */
@InterfaceAudience.Public @InterfaceAudience.Public
@InterfaceStability.Evolving @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 * 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). * as necessary for bulk import (i.e. via MapReduce).

View File

@ -46,6 +46,8 @@ import org.apache.yetus.audience.InterfaceStability;
@InterfaceStability.Evolving @InterfaceStability.Evolving
public class CellComparatorImpl implements CellComparator { 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 * Comparator for plain key/values; i.e. non-catalog table key/values. Works on Key portion of
* KeyValue only. * KeyValue only.