blob: 3d2f81a71ab4e92d1335d8cf3e8682fe82cb9097 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181-google-v7) on Mon Jan 27 16:42:31 PST 2020 -->
<title>ByteKeyRange (Apache Beam 2.20.0-SNAPSHOT)</title>
<meta name="date" content="2020-01-27">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ByteKeyRange (Apache Beam 2.20.0-SNAPSHOT)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":9,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRangeTracker.html" title="class in org.apache.beam.sdk.io.range"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/beam/sdk/io/range/ByteKeyRange.html" target="_top">Frames</a></li>
<li><a href="ByteKeyRange.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.beam.sdk.io.range</div>
<h2 title="Class ByteKeyRange" class="title">Class ByteKeyRange</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.beam.sdk.io.range.ByteKeyRange</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable, <a href="../../../../../../org/apache/beam/sdk/transforms/splittabledofn/HasDefaultTracker.html" title="interface in org.apache.beam.sdk.transforms.splittabledofn">HasDefaultTracker</a>&lt;<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a>,<a href="../../../../../../org/apache/beam/sdk/transforms/splittabledofn/ByteKeyRangeTracker.html" title="class in org.apache.beam.sdk.transforms.splittabledofn">ByteKeyRangeTracker</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>public final class <span class="typeNameLabel">ByteKeyRange</span>
extends java.lang.Object
implements java.io.Serializable, <a href="../../../../../../org/apache/beam/sdk/transforms/splittabledofn/HasDefaultTracker.html" title="interface in org.apache.beam.sdk.transforms.splittabledofn">HasDefaultTracker</a>&lt;<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a>,<a href="../../../../../../org/apache/beam/sdk/transforms/splittabledofn/ByteKeyRangeTracker.html" title="class in org.apache.beam.sdk.transforms.splittabledofn">ByteKeyRangeTracker</a>&gt;</pre>
<div class="block">A class representing a range of <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeys</code></a>.
<p>Instances of <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a> are immutable.
<p>A <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a> enforces the restriction that its start and end keys must form a valid,
non-empty range <code>[startKey, endKey)</code> that is inclusive of the start key and exclusive of
the end key.
<p>When the end key is empty, it is treated as the largest possible key.
<h3>Interpreting <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a> in a <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a></h3>
<p>The primary role of <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a> is to provide functionality for <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#estimateFractionForKey-org.apache.beam.sdk.io.range.ByteKey-"><code>estimateFractionForKey(ByteKey)</code></a>, <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#interpolateKey-double-"><code>interpolateKey(double)</code></a>, and <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#split-int-"><code>split(int)</code></a>.
<p><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a> implements these features by treating a <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a>'s underlying
<code>byte[]</code> as the binary expansion of floating point numbers in the range <code>[0.0, 1.0]</code>.
For example, the keys <code>ByteKey.of(0x80)</code>, <code>ByteKey.of(0xc0)</code>, and <code>ByteKey.of(0xe0)</code> are interpreted as <code>0.5</code>, <code>0.75</code>, and <code>0.875</code> respectively.
The empty <code>ByteKey.EMPTY</code> is interpreted as <code>0.0</code> when used as the start of a range
and <code>1.0</code> when used as the end key.
<p>Key interpolation, fraction estimation, and range splitting are all interpreted in these
floating-point semantics. See the respective implementations for further details. <b>Note:</b>
the underlying implementations of these functions use <code>BigInteger</code> and <code>BigDecimal</code>,
so they can be slow and should not be called in hot loops. Dynamic work rebalancing will only
invoke these functions during periodic control operations, so they are not called on the critical
path.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a>,
<a href="../../../../../../serialized-form.html#org.apache.beam.sdk.io.range.ByteKeyRange">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#ALL_KEYS">ALL_KEYS</a></span></code>
<div class="block">The range of all keys, with empty start and end keys.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>java.lang.Boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#containsKey-org.apache.beam.sdk.io.range.ByteKey-">containsKey</a></span>(<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;key)</code>
<div class="block">Returns <code>true</code> if the specified <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a> is contained within this range.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#equals-java.lang.Object-">equals</a></span>(java.lang.Object&nbsp;o)</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#estimateFractionForKey-org.apache.beam.sdk.io.range.ByteKey-">estimateFractionForKey</a></span>(<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;key)</code>
<div class="block">Returns the fraction of this range <code>[startKey, endKey)</code> that is in the interval <code>[startKey, key)</code>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#getEndKey--">getEndKey</a></span>()</code>
<div class="block">Returns the <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a> representing the upper bound of this <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#getStartKey--">getStartKey</a></span>()</code>
<div class="block">Returns the <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a> representing the lower bound of this <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#hashCode--">hashCode</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#interpolateKey-double-">interpolateKey</a></span>(double&nbsp;fraction)</code>
<div class="block">Returns a <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a> <code>key</code> such that <code>[startKey, key)</code> represents
approximately the specified fraction of the range <code>[startKey, endKey)</code>.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/beam/sdk/transforms/splittabledofn/ByteKeyRangeTracker.html" title="class in org.apache.beam.sdk.transforms.splittabledofn">ByteKeyRangeTracker</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#newTracker--">newTracker</a></span>()</code>
<div class="block">Creates a new tracker for <code>this</code>.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#of-org.apache.beam.sdk.io.range.ByteKey-org.apache.beam.sdk.io.range.ByteKey-">of</a></span>(<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;startKey,
<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;endKey)</code>
<div class="block">Creates a new <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a> with the given start and end keys.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>java.lang.Boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#overlaps-org.apache.beam.sdk.io.range.ByteKeyRange-">overlaps</a></span>(<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a>&nbsp;other)</code>
<div class="block">Returns <code>true</code> if the specified <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a> overlaps this range.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#split-int-">split</a></span>(int&nbsp;numSplits)</code>
<div class="block">Returns a list of up to <code>numSplits + 1</code> <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeys</code></a> in ascending order,
where the keys have been interpolated to form roughly equal sub-ranges of this <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a>, assuming a uniform distribution of keys within this range.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#withEndKey-org.apache.beam.sdk.io.range.ByteKey-">withEndKey</a></span>(<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;endKey)</code>
<div class="block">Returns new <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a> like this one, but with the specified end key.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#withStartKey-org.apache.beam.sdk.io.range.ByteKey-">withStartKey</a></span>(<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;startKey)</code>
<div class="block">Returns new <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a> like this one, but with the specified start key.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="ALL_KEYS">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ALL_KEYS</h4>
<pre>public static final&nbsp;<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a> ALL_KEYS</pre>
<div class="block">The range of all keys, with empty start and end keys.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="of-org.apache.beam.sdk.io.range.ByteKey-org.apache.beam.sdk.io.range.ByteKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>of</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a>&nbsp;of(<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;startKey,
<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;endKey)</pre>
<div class="block">Creates a new <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a> with the given start and end keys.
<p>Note that if <code>endKey</code> is empty, it is treated as the largest possible key.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if <code>endKey</code> is less than or equal to <code>startKey</code>,
unless <code>endKey</code> is empty indicating the maximum possible <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a></dd>
</dl>
</li>
</ul>
<a name="getStartKey--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStartKey</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;getStartKey()</pre>
<div class="block">Returns the <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a> representing the lower bound of this <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a>.</div>
</li>
</ul>
<a name="getEndKey--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEndKey</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;getEndKey()</pre>
<div class="block">Returns the <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a> representing the upper bound of this <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a>.
<p>Note that if <code>endKey</code> is empty, it is treated as the largest possible key.</div>
</li>
</ul>
<a name="containsKey-org.apache.beam.sdk.io.range.ByteKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsKey</h4>
<pre>public&nbsp;java.lang.Boolean&nbsp;containsKey(<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;key)</pre>
<div class="block">Returns <code>true</code> if the specified <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a> is contained within this range.</div>
</li>
</ul>
<a name="overlaps-org.apache.beam.sdk.io.range.ByteKeyRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>overlaps</h4>
<pre>public&nbsp;java.lang.Boolean&nbsp;overlaps(<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a>&nbsp;other)</pre>
<div class="block">Returns <code>true</code> if the specified <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a> overlaps this range.</div>
</li>
</ul>
<a name="split-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>split</h4>
<pre>public&nbsp;java.util.List&lt;<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&gt;&nbsp;split(int&nbsp;numSplits)</pre>
<div class="block">Returns a list of up to <code>numSplits + 1</code> <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeys</code></a> in ascending order,
where the keys have been interpolated to form roughly equal sub-ranges of this <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a>, assuming a uniform distribution of keys within this range.
<p>The first <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a> in the result is guaranteed to be equal to <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#getStartKey--"><code>getStartKey()</code></a>,
and the last <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a> in the result is guaranteed to be equal to <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html#getEndKey--"><code>getEndKey()</code></a>.
Thus the resulting list exactly spans the same key range as this <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a>.
<p>Note that the number of keys returned is not always equal to <code>numSplits + 1</code>.
Specifically, if this range is unsplittable (e.g., because the start and end keys are equal up
to padding by zero bytes), the list returned will only contain the start and end key.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the specified number of splits is less than 1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>the ByteKeyRange class Javadoc for more information about split semantics.</code></a></dd>
</dl>
</li>
</ul>
<a name="estimateFractionForKey-org.apache.beam.sdk.io.range.ByteKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>estimateFractionForKey</h4>
<pre>public&nbsp;double&nbsp;estimateFractionForKey(<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;key)</pre>
<div class="block">Returns the fraction of this range <code>[startKey, endKey)</code> that is in the interval <code>[startKey, key)</code>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if <code>key</code> does not fall within this range</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>the ByteKeyRange class Javadoc for more information about fraction semantics.</code></a></dd>
</dl>
</li>
</ul>
<a name="interpolateKey-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>interpolateKey</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;interpolateKey(double&nbsp;fraction)</pre>
<div class="block">Returns a <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKey</code></a> <code>key</code> such that <code>[startKey, key)</code> represents
approximately the specified fraction of the range <code>[startKey, endKey)</code>. The interpolation
is computed assuming a uniform distribution of keys.
<p>For example, given the largest possible range (defined by empty start and end keys), the
fraction <code>0.5</code> will return the <code>ByteKey.of(0x80)</code>, which will also be returned for
ranges <code>[0x40, 0xc0)</code> and <code>[0x6f, 0x91)</code>.
<p>The key returned will never be empty.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if <code>fraction</code> is outside the range [0, 1)</dd>
<dd><code>java.lang.IllegalStateException</code> - if this range cannot be interpolated</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>the ByteKeyRange class Javadoc for more information about fraction semantics.</code></a></dd>
</dl>
</li>
</ul>
<a name="withStartKey-org.apache.beam.sdk.io.range.ByteKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withStartKey</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a>&nbsp;withStartKey(<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;startKey)</pre>
<div class="block">Returns new <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a> like this one, but with the specified start key.</div>
</li>
</ul>
<a name="withEndKey-org.apache.beam.sdk.io.range.ByteKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withEndKey</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a>&nbsp;withEndKey(<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range">ByteKey</a>&nbsp;endKey)</pre>
<div class="block">Returns new <a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range"><code>ByteKeyRange</code></a> like this one, but with the specified end key.</div>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="equals-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(java.lang.Object&nbsp;o)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="newTracker--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>newTracker</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/beam/sdk/transforms/splittabledofn/ByteKeyRangeTracker.html" title="class in org.apache.beam.sdk.transforms.splittabledofn">ByteKeyRangeTracker</a>&nbsp;newTracker()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/beam/sdk/transforms/splittabledofn/HasDefaultTracker.html#newTracker--">HasDefaultTracker</a></code></span></div>
<div class="block">Creates a new tracker for <code>this</code>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/beam/sdk/transforms/splittabledofn/HasDefaultTracker.html#newTracker--">newTracker</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/beam/sdk/transforms/splittabledofn/HasDefaultTracker.html" title="interface in org.apache.beam.sdk.transforms.splittabledofn">HasDefaultTracker</a>&lt;<a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRange.html" title="class in org.apache.beam.sdk.io.range">ByteKeyRange</a>,<a href="../../../../../../org/apache/beam/sdk/transforms/splittabledofn/ByteKeyRangeTracker.html" title="class in org.apache.beam.sdk.transforms.splittabledofn">ByteKeyRangeTracker</a>&gt;</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKey.html" title="class in org.apache.beam.sdk.io.range"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/beam/sdk/io/range/ByteKeyRangeTracker.html" title="class in org.apache.beam.sdk.io.range"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/beam/sdk/io/range/ByteKeyRange.html" target="_top">Frames</a></li>
<li><a href="ByteKeyRange.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>