blob: 9b9cff5c00e2f037bfec92e6e731d9c38390526c [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:01:43 GMT 2021 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>BlockLocation (Apache Hadoop Common 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="BlockLocation (Apache Hadoop Common 3.3.1 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10};
var tabs = {65535:["t0","All 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="class-use/BlockLocation.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/fs/BatchListingOperations.html" title="interface in org.apache.hadoop.fs"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/hadoop/fs/BlockStoragePolicySpi.html" title="interface in org.apache.hadoop.fs"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/hadoop/fs/BlockLocation.html" target="_top">Frames</a></li>
<li><a href="BlockLocation.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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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.fs</div>
<h2 title="Class BlockLocation" class="title">Class BlockLocation</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.hadoop.fs.BlockLocation</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd>
</dl>
<hr>
<br>
<pre>@InterfaceAudience.Public
@InterfaceStability.Stable
public class <span class="typeNameLabel">BlockLocation</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
<div class="block">Represents the network location of a block, information about the hosts
that contain block replicas, and other block metadata (E.g. the file
offset associated with the block, length, whether it is corrupt, etc).
For a single BlockLocation, it will have different meanings for replicated
and erasure coded files.
If the file is 3-replicated, offset and length of a BlockLocation represent
the absolute value in the file and the hosts are the 3 datanodes that
holding the replicas. Here is an example:
<pre>
BlockLocation(offset: 0, length: BLOCK_SIZE,
hosts: {"host1:9866", "host2:9866, host3:9866"})
</pre>
And if the file is erasure-coded, each BlockLocation represents a logical
block groups. Value offset is the offset of a block group in the file and
value length is the total length of a block group. Hosts of a BlockLocation
are the datanodes that holding all the data blocks and parity blocks of a
block group.
Suppose we have a RS_3_2 coded file (3 data units and 2 parity units).
A BlockLocation example will be like:
<pre>
BlockLocation(offset: 0, length: 3 * BLOCK_SIZE, hosts: {"host1:9866",
"host2:9866","host3:9866","host4:9866","host5:9866"})
</pre>
Please refer to
<a href="../../../../org/apache/hadoop/fs/FileSystem.html#getFileBlockLocations-org.apache.hadoop.fs.FileStatus-long-long-"><code>FileSystem.getFileBlockLocations(FileStatus, long, long)</code></a> or
<a href="../../../../org/apache/hadoop/fs/FileContext.html#getFileBlockLocations-org.apache.hadoop.fs.Path-long-long-"><code>FileContext.getFileBlockLocations(Path, long, long)</code></a>
for more examples.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../serialized-form.html#org.apache.hadoop.fs.BlockLocation">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#BlockLocation--">BlockLocation</a></span>()</code>
<div class="block">Default Constructor.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#BlockLocation-org.apache.hadoop.fs.BlockLocation-">BlockLocation</a></span>(<a href="../../../../org/apache/hadoop/fs/BlockLocation.html" title="class in org.apache.hadoop.fs">BlockLocation</a>&nbsp;that)</code>
<div class="block">Copy constructor.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#BlockLocation-java.lang.String:A-java.lang.String:A-long-long-">BlockLocation</a></span>(<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;names,
<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;hosts,
long&nbsp;offset,
long&nbsp;length)</code>
<div class="block">Constructor with host, name, offset and length.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#BlockLocation-java.lang.String:A-java.lang.String:A-long-long-boolean-">BlockLocation</a></span>(<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;names,
<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;hosts,
long&nbsp;offset,
long&nbsp;length,
boolean&nbsp;corrupt)</code>
<div class="block">Constructor with host, name, offset, length and corrupt flag.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#BlockLocation-java.lang.String:A-java.lang.String:A-java.lang.String:A-long-long-">BlockLocation</a></span>(<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;names,
<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;hosts,
<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;topologyPaths,
long&nbsp;offset,
long&nbsp;length)</code>
<div class="block">Constructor with host, name, network topology, offset and length.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#BlockLocation-java.lang.String:A-java.lang.String:A-java.lang.String:A-long-long-boolean-">BlockLocation</a></span>(<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;names,
<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;hosts,
<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;topologyPaths,
long&nbsp;offset,
long&nbsp;length,
boolean&nbsp;corrupt)</code>
<div class="block">Constructor with host, name, network topology, offset, length
and corrupt flag.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#BlockLocation-java.lang.String:A-java.lang.String:A-java.lang.String:A-java.lang.String:A-long-long-boolean-">BlockLocation</a></span>(<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;names,
<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;hosts,
<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;cachedHosts,
<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;topologyPaths,
long&nbsp;offset,
long&nbsp;length,
boolean&nbsp;corrupt)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#BlockLocation-java.lang.String:A-java.lang.String:A-java.lang.String:A-java.lang.String:A-java.lang.String:A-org.apache.hadoop.fs.StorageType:A-long-long-boolean-">BlockLocation</a></span>(<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;names,
<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;hosts,
<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;cachedHosts,
<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;topologyPaths,
<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;storageIds,
<a href="../../../../org/apache/hadoop/fs/StorageType.html" title="enum in org.apache.hadoop.fs">StorageType</a>[]&nbsp;storageTypes,
long&nbsp;offset,
long&nbsp;length,
boolean&nbsp;corrupt)</code>&nbsp;</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="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><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/fs/BlockLocation.html#getCachedHosts--">getCachedHosts</a></span>()</code>
<div class="block">Get the list of hosts (hostname) hosting a cached replica of the block.</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/fs/BlockLocation.html#getHosts--">getHosts</a></span>()</code>
<div class="block">Get the list of hosts (hostname) hosting this block.</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/fs/BlockLocation.html#getLength--">getLength</a></span>()</code>
<div class="block">Get the length of the block.</div>
</td>
</tr>
<tr id="i3" 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/fs/BlockLocation.html#getNames--">getNames</a></span>()</code>
<div class="block">Get the list of names (IP:xferPort) hosting this block.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#getOffset--">getOffset</a></span>()</code>
<div class="block">Get the start offset of file associated with this block.</div>
</td>
</tr>
<tr id="i5" 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/fs/BlockLocation.html#getStorageIds--">getStorageIds</a></span>()</code>
<div class="block">Get the storageID of each replica of the block.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/hadoop/fs/StorageType.html" title="enum in org.apache.hadoop.fs">StorageType</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#getStorageTypes--">getStorageTypes</a></span>()</code>
<div class="block">Get the storage type of each replica of the block.</div>
</td>
</tr>
<tr id="i7" 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/fs/BlockLocation.html#getTopologyPaths--">getTopologyPaths</a></span>()</code>
<div class="block">Get the list of network topology paths for each of the hosts.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#isCorrupt--">isCorrupt</a></span>()</code>
<div class="block">Get the corrupt flag.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#isStriped--">isStriped</a></span>()</code>
<div class="block">Return true if the block is striped (erasure coded).</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#setCachedHosts-java.lang.String:A-">setCachedHosts</a></span>(<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;cachedHosts)</code>
<div class="block">Set the hosts hosting a cached replica of this block.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#setCorrupt-boolean-">setCorrupt</a></span>(boolean&nbsp;corrupt)</code>
<div class="block">Set the corrupt flag.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#setHosts-java.lang.String:A-">setHosts</a></span>(<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;hosts)</code>
<div class="block">Set the hosts hosting this block.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#setLength-long-">setLength</a></span>(long&nbsp;length)</code>
<div class="block">Set the length of block.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#setNames-java.lang.String:A-">setNames</a></span>(<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;names)</code>
<div class="block">Set the names (host:port) hosting this block.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#setOffset-long-">setOffset</a></span>(long&nbsp;offset)</code>
<div class="block">Set the start offset of file associated with this block.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#setStorageIds-java.lang.String:A-">setStorageIds</a></span>(<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;storageIds)</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#setStorageTypes-org.apache.hadoop.fs.StorageType:A-">setStorageTypes</a></span>(<a href="../../../../org/apache/hadoop/fs/StorageType.html" title="enum in org.apache.hadoop.fs">StorageType</a>[]&nbsp;storageTypes)</code>&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/fs/BlockLocation.html#setTopologyPaths-java.lang.String:A-">setTopologyPaths</a></span>(<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;topologyPaths)</code>
<div class="block">Set the network topology paths of the hosts.</div>
</td>
</tr>
<tr id="i19" 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/fs/BlockLocation.html#toString--">toString</a></span>()</code>&nbsp;</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.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="BlockLocation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BlockLocation</h4>
<pre>public&nbsp;BlockLocation()</pre>
<div class="block">Default Constructor.</div>
</li>
</ul>
<a name="BlockLocation-org.apache.hadoop.fs.BlockLocation-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BlockLocation</h4>
<pre>public&nbsp;BlockLocation(<a href="../../../../org/apache/hadoop/fs/BlockLocation.html" title="class in org.apache.hadoop.fs">BlockLocation</a>&nbsp;that)</pre>
<div class="block">Copy constructor.</div>
</li>
</ul>
<a name="BlockLocation-java.lang.String:A-java.lang.String:A-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BlockLocation</h4>
<pre>public&nbsp;BlockLocation(<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;names,
<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;hosts,
long&nbsp;offset,
long&nbsp;length)</pre>
<div class="block">Constructor with host, name, offset and length.</div>
</li>
</ul>
<a name="BlockLocation-java.lang.String:A-java.lang.String:A-long-long-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BlockLocation</h4>
<pre>public&nbsp;BlockLocation(<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;names,
<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;hosts,
long&nbsp;offset,
long&nbsp;length,
boolean&nbsp;corrupt)</pre>
<div class="block">Constructor with host, name, offset, length and corrupt flag.</div>
</li>
</ul>
<a name="BlockLocation-java.lang.String:A-java.lang.String:A-java.lang.String:A-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BlockLocation</h4>
<pre>public&nbsp;BlockLocation(<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;names,
<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;hosts,
<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;topologyPaths,
long&nbsp;offset,
long&nbsp;length)</pre>
<div class="block">Constructor with host, name, network topology, offset and length.</div>
</li>
</ul>
<a name="BlockLocation-java.lang.String:A-java.lang.String:A-java.lang.String:A-long-long-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BlockLocation</h4>
<pre>public&nbsp;BlockLocation(<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;names,
<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;hosts,
<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;topologyPaths,
long&nbsp;offset,
long&nbsp;length,
boolean&nbsp;corrupt)</pre>
<div class="block">Constructor with host, name, network topology, offset, length
and corrupt flag.</div>
</li>
</ul>
<a name="BlockLocation-java.lang.String:A-java.lang.String:A-java.lang.String:A-java.lang.String:A-long-long-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BlockLocation</h4>
<pre>public&nbsp;BlockLocation(<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;names,
<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;hosts,
<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;cachedHosts,
<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;topologyPaths,
long&nbsp;offset,
long&nbsp;length,
boolean&nbsp;corrupt)</pre>
</li>
</ul>
<a name="BlockLocation-java.lang.String:A-java.lang.String:A-java.lang.String:A-java.lang.String:A-java.lang.String:A-org.apache.hadoop.fs.StorageType:A-long-long-boolean-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BlockLocation</h4>
<pre>public&nbsp;BlockLocation(<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;names,
<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;hosts,
<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;cachedHosts,
<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;topologyPaths,
<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;storageIds,
<a href="../../../../org/apache/hadoop/fs/StorageType.html" title="enum in org.apache.hadoop.fs">StorageType</a>[]&nbsp;storageTypes,
long&nbsp;offset,
long&nbsp;length,
boolean&nbsp;corrupt)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getHosts--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHosts</h4>
<pre>public&nbsp;<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;getHosts()
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 list of hosts (hostname) hosting this block.</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></dd>
</dl>
</li>
</ul>
<a name="getCachedHosts--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCachedHosts</h4>
<pre>public&nbsp;<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;getCachedHosts()</pre>
<div class="block">Get the list of hosts (hostname) hosting a cached replica of the block.</div>
</li>
</ul>
<a name="getNames--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNames</h4>
<pre>public&nbsp;<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;getNames()
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 list of names (IP:xferPort) hosting this block.</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></dd>
</dl>
</li>
</ul>
<a name="getTopologyPaths--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTopologyPaths</h4>
<pre>public&nbsp;<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;getTopologyPaths()
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 list of network topology paths for each of the hosts.
The last component of the path is the "name" (IP:xferPort).</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></dd>
</dl>
</li>
</ul>
<a name="getStorageIds--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStorageIds</h4>
<pre>public&nbsp;<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;getStorageIds()</pre>
<div class="block">Get the storageID of each replica of the block.</div>
</li>
</ul>
<a name="getStorageTypes--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStorageTypes</h4>
<pre>public&nbsp;<a href="../../../../org/apache/hadoop/fs/StorageType.html" title="enum in org.apache.hadoop.fs">StorageType</a>[]&nbsp;getStorageTypes()</pre>
<div class="block">Get the storage type of each replica of the block.</div>
</li>
</ul>
<a name="getOffset--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOffset</h4>
<pre>public&nbsp;long&nbsp;getOffset()</pre>
<div class="block">Get the start offset of file associated with this block.</div>
</li>
</ul>
<a name="getLength--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLength</h4>
<pre>public&nbsp;long&nbsp;getLength()</pre>
<div class="block">Get the length of the block.</div>
</li>
</ul>
<a name="isCorrupt--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCorrupt</h4>
<pre>public&nbsp;boolean&nbsp;isCorrupt()</pre>
<div class="block">Get the corrupt flag.</div>
</li>
</ul>
<a name="isStriped--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isStriped</h4>
<pre>public&nbsp;boolean&nbsp;isStriped()</pre>
<div class="block">Return true if the block is striped (erasure coded).</div>
</li>
</ul>
<a name="setOffset-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOffset</h4>
<pre>public&nbsp;void&nbsp;setOffset(long&nbsp;offset)</pre>
<div class="block">Set the start offset of file associated with this block.</div>
</li>
</ul>
<a name="setLength-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLength</h4>
<pre>public&nbsp;void&nbsp;setLength(long&nbsp;length)</pre>
<div class="block">Set the length of block.</div>
</li>
</ul>
<a name="setCorrupt-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCorrupt</h4>
<pre>public&nbsp;void&nbsp;setCorrupt(boolean&nbsp;corrupt)</pre>
<div class="block">Set the corrupt flag.</div>
</li>
</ul>
<a name="setHosts-java.lang.String:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setHosts</h4>
<pre>public&nbsp;void&nbsp;setHosts(<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;hosts)
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">Set the hosts hosting this block.</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></dd>
</dl>
</li>
</ul>
<a name="setCachedHosts-java.lang.String:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCachedHosts</h4>
<pre>public&nbsp;void&nbsp;setCachedHosts(<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;cachedHosts)</pre>
<div class="block">Set the hosts hosting a cached replica of this block.</div>
</li>
</ul>
<a name="setNames-java.lang.String:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNames</h4>
<pre>public&nbsp;void&nbsp;setNames(<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;names)
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">Set the names (host:port) hosting this block.</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></dd>
</dl>
</li>
</ul>
<a name="setTopologyPaths-java.lang.String:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTopologyPaths</h4>
<pre>public&nbsp;void&nbsp;setTopologyPaths(<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;topologyPaths)
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">Set the network topology paths of the hosts.</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></dd>
</dl>
</li>
</ul>
<a name="setStorageIds-java.lang.String:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStorageIds</h4>
<pre>public&nbsp;void&nbsp;setStorageIds(<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;storageIds)</pre>
</li>
</ul>
<a name="setStorageTypes-org.apache.hadoop.fs.StorageType:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStorageTypes</h4>
<pre>public&nbsp;void&nbsp;setStorageTypes(<a href="../../../../org/apache/hadoop/fs/StorageType.html" title="enum in org.apache.hadoop.fs">StorageType</a>[]&nbsp;storageTypes)</pre>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<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;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></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="class-use/BlockLocation.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/fs/BatchListingOperations.html" title="interface in org.apache.hadoop.fs"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/hadoop/fs/BlockStoragePolicySpi.html" title="interface in org.apache.hadoop.fs"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/hadoop/fs/BlockLocation.html" target="_top">Frames</a></li>
<li><a href="BlockLocation.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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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>