blob: 9547666084a5b9bfe02fdb19ba4dff52b9c2d568 [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_292) on Tue Jun 15 06:06:56 GMT 2021 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FsVolumeSpi.BlockIterator (Apache Hadoop HDFS 3.3.1 API)</title>
<meta name="date" content="2021-06-15">
<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="FsVolumeSpi.BlockIterator (Apache Hadoop HDFS 3.3.1 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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="class-use/FsVolumeSpi.BlockIterator.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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.html" title="interface in org.apache.hadoop.hdfs.server.datanode.fsdataset"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.ScanInfo.html" title="class in org.apache.hadoop.hdfs.server.datanode.fsdataset"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.BlockIterator.html" target="_top">Frames</a></li>
<li><a href="FsVolumeSpi.BlockIterator.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>Field&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>Field&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.hadoop.hdfs.server.datanode.fsdataset</div>
<h2 title="Interface FsVolumeSpi.BlockIterator" class="title">Interface FsVolumeSpi.BlockIterator</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></dd>
</dl>
<dl>
<dt>Enclosing interface:</dt>
<dd><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.html" title="interface in org.apache.hadoop.hdfs.server.datanode.fsdataset">FsVolumeSpi</a></dd>
</dl>
<hr>
<br>
<pre>public static interface <span class="typeNameLabel">FsVolumeSpi.BlockIterator</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></pre>
<div class="block">BlockIterator will return ExtendedBlock entries from a block pool in
this volume. The entries will be returned in sorted order.<p>
BlockIterator objects themselves do not always have internal
synchronization, so they can only safely be used by a single thread at a
time.<p>
Closing the iterator does not save it. You must call save to save it.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.BlockIterator.html#atEnd--">atEnd</a></span>()</code>
<div class="block">Returns true if we got to the end of the block pool.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.BlockIterator.html#getBlockPoolId--">getBlockPoolId</a></span>()</code>
<div class="block">Get the id of the block pool which this iterator traverses.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.BlockIterator.html#getIterStartMs--">getIterStartMs</a></span>()</code>
<div class="block">Get the wall-clock time, measured in milliseconds since the Epoch,
when this iterator was created.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.BlockIterator.html#getLastSavedMs--">getLastSavedMs</a></span>()</code>
<div class="block">Get the wall-clock time, measured in milliseconds since the Epoch,
when this iterator was last saved.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>org.apache.hadoop.hdfs.protocol.ExtendedBlock</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.BlockIterator.html#nextBlock--">nextBlock</a></span>()</code>
<div class="block">Get the next block.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.BlockIterator.html#rewind--">rewind</a></span>()</code>
<div class="block">Repositions the iterator at the beginning of the block pool.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.BlockIterator.html#save--">save</a></span>()</code>
<div class="block">Save this block iterator to the underlying volume.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.BlockIterator.html#setMaxStalenessMs-long-">setMaxStalenessMs</a></span>(long&nbsp;maxStalenessMs)</code>
<div class="block">Set the maximum staleness of entries that we will return.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.io.Closeable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;java.io.<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io">close</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="nextBlock--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextBlock</h4>
<pre>org.apache.hadoop.hdfs.protocol.ExtendedBlock&nbsp;nextBlock()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Get the next block.<p>
Note that this block may be removed in between the time we list it,
and the time the caller tries to use it, or it may represent a stale
entry. Callers should handle the case where the returned block no
longer exists.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The next block, or null if there are no
more blocks. Null if there was an error
determining the next block.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there was an error getting the next block in
this volume. In this case, EOF will be set on
the iterator.</dd>
</dl>
</li>
</ul>
<a name="atEnd--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>atEnd</h4>
<pre>boolean&nbsp;atEnd()</pre>
<div class="block">Returns true if we got to the end of the block pool.</div>
</li>
</ul>
<a name="rewind--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewind</h4>
<pre>void&nbsp;rewind()</pre>
<div class="block">Repositions the iterator at the beginning of the block pool.</div>
</li>
</ul>
<a name="save--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>save</h4>
<pre>void&nbsp;save()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Save this block iterator to the underlying volume.
Any existing saved block iterator with this name will be overwritten.
maxStalenessMs will not be saved.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there was an error when saving the block
iterator.</dd>
</dl>
</li>
</ul>
<a name="setMaxStalenessMs-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxStalenessMs</h4>
<pre>void&nbsp;setMaxStalenessMs(long&nbsp;maxStalenessMs)</pre>
<div class="block">Set the maximum staleness of entries that we will return.<p>
A maximum staleness of 0 means we will never return stale entries; a
larger value will allow us to reduce resource consumption in exchange
for returning more potentially stale entries. Even with staleness set
to 0, consumers of this API must handle race conditions where block
disappear before they can be processed.</div>
</li>
</ul>
<a name="getIterStartMs--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIterStartMs</h4>
<pre>long&nbsp;getIterStartMs()</pre>
<div class="block">Get the wall-clock time, measured in milliseconds since the Epoch,
when this iterator was created.</div>
</li>
</ul>
<a name="getLastSavedMs--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLastSavedMs</h4>
<pre>long&nbsp;getLastSavedMs()</pre>
<div class="block">Get the wall-clock time, measured in milliseconds since the Epoch,
when this iterator was last saved. Returns iterStartMs if the
iterator was never saved.</div>
</li>
</ul>
<a name="getBlockPoolId--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getBlockPoolId</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getBlockPoolId()</pre>
<div class="block">Get the id of the block pool which this iterator traverses.</div>
</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="class-use/FsVolumeSpi.BlockIterator.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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.html" title="interface in org.apache.hadoop.hdfs.server.datanode.fsdataset"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.ScanInfo.html" title="class in org.apache.hadoop.hdfs.server.datanode.fsdataset"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.BlockIterator.html" target="_top">Frames</a></li>
<li><a href="FsVolumeSpi.BlockIterator.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>Field&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>Field&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 ======= -->
<p class="legalCopy"><small>Copyright &#169; 2008&#x2013;2021 <a href="https://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>