blob: d116f5a6828ea012d5fdfa8fb34397c86510a037 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>CellComparator (Apache HBase 4.0.0-alpha-1-SNAPSHOT API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.hadoop.hbase, interface: CellComparator">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/CellComparator.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.hadoop.hbase</a></div>
<h1 title="Interface CellComparator" class="title">Interface CellComparator</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Superinterfaces:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;</code>, <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></code></dd>
</dl>
<dl class="notes">
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="CellComparatorImpl.html" title="class in org.apache.hadoop.hbase">CellComparatorImpl</a></code>, <code><a href="InnerStoreCellComparator.html" title="class in org.apache.hadoop.hbase">InnerStoreCellComparator</a></code>, <code><a href="MetaCellComparator.html" title="class in org.apache.hadoop.hbase">MetaCellComparator</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="annotations">@Public
@Evolving
</span><span class="modifiers">public interface </span><span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-32">CellComparator</a></span><span class="extends-implements">
extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></span></div>
<div class="block">Comparator for comparing cells and has some specialized methods that allows comparing individual
cell components like row, family, qualifier and timestamp</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab5" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab5', 3)" class="table-tab">Default Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0">
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#compare(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell)" class="member-name-link">compare</a><wbr>(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Lexographically compares two cells.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#compare(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell,boolean)" class="member-name-link">compare</a><wbr>(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell,
boolean&nbsp;ignoreSequenceid)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Compare cells.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#compareFamilies(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell)" class="member-name-link">compareFamilies</a><wbr>(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Lexicographically compares the families of the two cells</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#compareQualifiers(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell)" class="member-name-link">compareQualifiers</a><wbr>(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Lexicographically compares the qualifiers of the two cells</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#compareRows(byte%5B%5D,byte%5B%5D)" class="member-name-link">compareRows</a><wbr>(byte[]&nbsp;leftRow,
byte[]&nbsp;rightRow)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Compares two row bytes</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#compareRows(java.nio.ByteBuffer,org.apache.hadoop.hbase.Cell)" class="member-name-link">compareRows</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;row,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;cell)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Lexicographically compare two rows</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#compareRows(org.apache.hadoop.hbase.Cell,byte%5B%5D,int,int)" class="member-name-link">compareRows</a><wbr>(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;cell,
byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Compares the row part of the cell with a simple plain byte[] like the stopRow in Scan.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#compareRows(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell)" class="member-name-link">compareRows</a><wbr>(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Lexographically compares the rows of two cells.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#compareTimestamps(long,long)" class="member-name-link">compareTimestamps</a><wbr>(long&nbsp;leftCellts,
long&nbsp;rightCellts)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Compares cell's timestamps in DESCENDING order.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#compareTimestamps(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell)" class="member-name-link">compareTimestamps</a><wbr>(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Compares cell's timestamps in DESCENDING order.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#compareWithoutRow(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell)" class="member-name-link">compareWithoutRow</a><wbr>(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Lexicographically compares the two cells excluding the row part.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1"><code>static <a href="CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1"><code><a href="#getInstance()" class="member-name-link">getInstance</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1">
<div class="block">A comparator for ordering cells in user-space tables.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getSimpleComparator()" class="member-name-link">getSimpleComparator</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Return a dumbed-down, fast comparator for hbase2 base-type, the <a href="ByteBufferKeyValue.html" title="class in org.apache.hadoop.hbase"><code>ByteBufferKeyValue</code></a>.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.util.Comparator">Methods inherited from interface&nbsp;java.util.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html#equals(java.lang.Object)" title="class or interface in java.util" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html#reversed()" title="class or interface in java.util" class="external-link">reversed</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html#thenComparing(java.util.Comparator)" title="class or interface in java.util" class="external-link">thenComparing</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html#thenComparing(java.util.function.Function)" title="class or interface in java.util" class="external-link">thenComparing</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html#thenComparing(java.util.function.Function,java.util.Comparator)" title="class or interface in java.util" class="external-link">thenComparing</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html#thenComparingDouble(java.util.function.ToDoubleFunction)" title="class or interface in java.util" class="external-link">thenComparingDouble</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html#thenComparingInt(java.util.function.ToIntFunction)" title="class or interface in java.util" class="external-link">thenComparingInt</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html#thenComparingLong(java.util.function.ToLongFunction)" title="class or interface in java.util" class="external-link">thenComparingLong</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getInstance()">
<h3>getInstance</h3>
<div class="member-signature"><span class="modifiers">static</span>&nbsp;<span class="return-type"><a href="CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a></span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-43">getInstance</a></span>()</div>
<div class="block">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).
<p>
CAUTION: This comparator may provide inaccurate ordering for cells from system tables, and
should not be relied upon in that case.</div>
</section>
</li>
<li>
<section class="detail" id="compare(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell)">
<h3>compare</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-55">compare</a></span><wbr><span class="parameters">(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell)</span></div>
<div class="block">Lexographically compares two cells. The key part of the cell is taken for comparison which
includes row, family, qualifier, timestamp and type</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html#compare(T,T)" title="class or interface in java.util" class="external-link">compare</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>leftCell</code> - the left hand side cell</dd>
<dd><code>rightCell</code> - the right hand side cell</dd>
<dt>Returns:</dt>
<dd>greater than 0 if leftCell is bigger, less than 0 if rightCell is bigger, 0 if both
cells are equal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="compare(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell,boolean)">
<h3>compare</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-64">compare</a></span><wbr><span class="parameters">(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell,
boolean&nbsp;ignoreSequenceid)</span></div>
<div class="block">Compare cells.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>ignoreSequenceid</code> - True if we are to compare the key portion only and ignore the
sequenceid. Set to false to compare key and consider sequenceid.</dd>
<dt>Returns:</dt>
<dd>0 if equal, -1 if a &lt; b, and +1 if a &gt; b.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="compareRows(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell)">
<h3>compareRows</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-73">compareRows</a></span><wbr><span class="parameters">(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell)</span></div>
<div class="block">Lexographically compares the rows of two cells.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>leftCell</code> - the left hand side cell</dd>
<dd><code>rightCell</code> - the right hand side cell</dd>
<dt>Returns:</dt>
<dd>greater than 0 if leftCell is bigger, less than 0 if rightCell is bigger, 0 if both
cells are equal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="compareRows(org.apache.hadoop.hbase.Cell,byte[],int,int)">
<h3>compareRows</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-84">compareRows</a></span><wbr><span class="parameters">(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;cell,
byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</span></div>
<div class="block">Compares the row part of the cell with a simple plain byte[] like the stopRow in Scan.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>cell</code> - the cell</dd>
<dd><code>bytes</code> - the byte[] representing the row to be compared with</dd>
<dd><code>offset</code> - the offset of the byte[]</dd>
<dd><code>length</code> - the length of the byte[]</dd>
<dt>Returns:</dt>
<dd>greater than 0 if leftCell is bigger, less than 0 if rightCell is bigger, 0 if both
cells are equal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="compareRows(byte[],byte[])">
<h3>compareRows</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-93">compareRows</a></span><wbr><span class="parameters">(byte[]&nbsp;leftRow,
byte[]&nbsp;rightRow)</span></div>
<div class="block">Compares two row bytes</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>leftRow</code> - the byte array of the left row</dd>
<dd><code>rightRow</code> - the byte array of the right row</dd>
<dt>Returns:</dt>
<dd>greater than 0 if leftRow is bigger, less than 0 if rightRow is bigger, 0 if both rows
are equal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="compareRows(java.nio.ByteBuffer,org.apache.hadoop.hbase.Cell)">
<h3>compareRows</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-104">compareRows</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;row,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;cell)</span></div>
<div class="block">Lexicographically compare two rows</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>row</code> - ByteBuffer that wraps a row; will read from current position and will reading all
remaining; will not disturb the ByteBuffer internal state.</dd>
<dt>Returns:</dt>
<dd>greater than 0 if leftCell is bigger, less than 0 if rightCell is bigger, 0 if both
cells are equal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="compareWithoutRow(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell)">
<h3>compareWithoutRow</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-122">compareWithoutRow</a></span><wbr><span class="parameters">(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell)</span></div>
<div class="block">Lexicographically compares the two cells excluding the row part. It compares family, qualifier,
timestamp and the type</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>leftCell</code> - the left hand side cell</dd>
<dd><code>rightCell</code> - the right hand side cell</dd>
<dt>Returns:</dt>
<dd>greater than 0 if leftCell is bigger, less than 0 if rightCell is bigger, 0 if both
cells are equal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="compareFamilies(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell)">
<h3>compareFamilies</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-131">compareFamilies</a></span><wbr><span class="parameters">(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell)</span></div>
<div class="block">Lexicographically compares the families of the two cells</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>leftCell</code> - the left hand side cell</dd>
<dd><code>rightCell</code> - the right hand side cell</dd>
<dt>Returns:</dt>
<dd>greater than 0 if leftCell is bigger, less than 0 if rightCell is bigger, 0 if both
cells are equal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="compareQualifiers(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell)">
<h3>compareQualifiers</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-140">compareQualifiers</a></span><wbr><span class="parameters">(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell)</span></div>
<div class="block">Lexicographically compares the qualifiers of the two cells</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>leftCell</code> - the left hand side cell</dd>
<dd><code>rightCell</code> - the right hand side cell</dd>
<dt>Returns:</dt>
<dd>greater than 0 if leftCell is bigger, less than 0 if rightCell is bigger, 0 if both
cells are equal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="compareTimestamps(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.Cell)">
<h3>compareTimestamps</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-152">compareTimestamps</a></span><wbr><span class="parameters">(<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;leftCell,
<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;rightCell)</span></div>
<div class="block">Compares cell's timestamps in DESCENDING order. The below older timestamps sorting ahead of
newer timestamps looks wrong but it is intentional. This way, newer timestamps are first found
when we iterate over a memstore and newer versions are the first we trip over when reading from
a store file.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>leftCell</code> - the left hand side cell</dd>
<dd><code>rightCell</code> - the right hand side cell</dd>
<dt>Returns:</dt>
<dd>1 if left's timestamp &lt; right's timestamp -1 if left's timestamp &gt; right's
timestamp 0 if both timestamps are equal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="compareTimestamps(long,long)">
<h3>compareTimestamps</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-164">compareTimestamps</a></span><wbr><span class="parameters">(long&nbsp;leftCellts,
long&nbsp;rightCellts)</span></div>
<div class="block">Compares cell's timestamps in DESCENDING order. The below older timestamps sorting ahead of
newer timestamps looks wrong but it is intentional. This way, newer timestamps are first found
when we iterate over a memstore and newer versions are the first we trip over when reading from
a store file.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>leftCellts</code> - the left cell's timestamp</dd>
<dd><code>rightCellts</code> - the right cell's timestamp</dd>
<dt>Returns:</dt>
<dd>1 if left's timestamp &lt; right's timestamp -1 if left's timestamp &gt; right's
timestamp 0 if both timestamps are equal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getSimpleComparator()">
<h3>getSimpleComparator</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;<a href="Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/CellComparator.html#line-171">getSimpleComparator</a></span>()</div>
<div class="block">Return a dumbed-down, fast comparator for hbase2 base-type, the <a href="ByteBufferKeyValue.html" title="class in org.apache.hadoop.hbase"><code>ByteBufferKeyValue</code></a>.
Create an instance when you make a new memstore, when you know only BBKVs will be passed. Do
not pollute with types other than BBKV if can be helped; the Comparator will slow.</div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2007&#x2013;2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>