@InterfaceAudience.Public @InterfaceStability.Stable public class BlockLocation extends Object
| Constructor and Description | 
|---|
BlockLocation()
Default Constructor 
 | 
BlockLocation(BlockLocation that)
Copy constructor 
 | 
BlockLocation(String[] names,
             String[] hosts,
             long offset,
             long length)
Constructor with host, name, offset and length 
 | 
BlockLocation(String[] names,
             String[] hosts,
             long offset,
             long length,
             boolean corrupt)
Constructor with host, name, offset, length and corrupt flag 
 | 
BlockLocation(String[] names,
             String[] hosts,
             String[] topologyPaths,
             long offset,
             long length)
Constructor with host, name, network topology, offset and length 
 | 
BlockLocation(String[] names,
             String[] hosts,
             String[] topologyPaths,
             long offset,
             long length,
             boolean corrupt)
Constructor with host, name, network topology, offset, length 
 and corrupt flag 
 | 
BlockLocation(String[] names,
             String[] hosts,
             String[] cachedHosts,
             String[] topologyPaths,
             long offset,
             long length,
             boolean corrupt)  | 
BlockLocation(String[] names,
             String[] hosts,
             String[] cachedHosts,
             String[] topologyPaths,
             String[] storageIds,
             StorageType[] storageTypes,
             long offset,
             long length,
             boolean corrupt)  | 
| Modifier and Type | Method and Description | 
|---|---|
String[] | 
getCachedHosts()
Get the list of hosts (hostname) hosting a cached replica of the block 
 | 
String[] | 
getHosts()
Get the list of hosts (hostname) hosting this block 
 | 
long | 
getLength()
Get the length of the block 
 | 
String[] | 
getNames()
Get the list of names (IP:xferPort) hosting this block 
 | 
long | 
getOffset()
Get the start offset of file associated with this block 
 | 
String[] | 
getStorageIds()
Get the storageID of each replica of the block. 
 | 
StorageType[] | 
getStorageTypes()
Get the storage type of each replica of the block. 
 | 
String[] | 
getTopologyPaths()
Get the list of network topology paths for each of the hosts. 
 | 
boolean | 
isCorrupt()
Get the corrupt flag. 
 | 
void | 
setCachedHosts(String[] cachedHosts)
Set the hosts hosting a cached replica of this block 
 | 
void | 
setCorrupt(boolean corrupt)
Set the corrupt flag. 
 | 
void | 
setHosts(String[] hosts)
Set the hosts hosting this block 
 | 
void | 
setLength(long length)
Set the length of block 
 | 
void | 
setNames(String[] names)
Set the names (host:port) hosting this block 
 | 
void | 
setOffset(long offset)
Set the start offset of file associated with this block 
 | 
void | 
setStorageIds(String[] storageIds)  | 
void | 
setStorageTypes(StorageType[] storageTypes)  | 
void | 
setTopologyPaths(String[] topologyPaths)
Set the network topology paths of the hosts 
 | 
String | 
toString()  | 
public BlockLocation()
public BlockLocation(BlockLocation that)
public BlockLocation(String[] names, String[] hosts, long offset, long length)
public BlockLocation(String[] names, String[] hosts, long offset, long length, boolean corrupt)
public BlockLocation(String[] names, String[] hosts, String[] topologyPaths, long offset, long length)
public BlockLocation(String[] names, String[] hosts, String[] topologyPaths, long offset, long length, boolean corrupt)
public BlockLocation(String[] names, String[] hosts, String[] cachedHosts, String[] topologyPaths, long offset, long length, boolean corrupt)
public String[] getHosts() throws IOException
IOExceptionpublic String[] getCachedHosts()
public String[] getNames() throws IOException
IOExceptionpublic String[] getTopologyPaths() throws IOException
IOExceptionpublic String[] getStorageIds()
public StorageType[] getStorageTypes()
public long getOffset()
public long getLength()
public boolean isCorrupt()
public void setOffset(long offset)
public void setLength(long length)
public void setCorrupt(boolean corrupt)
public void setHosts(String[] hosts) throws IOException
IOExceptionpublic void setCachedHosts(String[] cachedHosts)
public void setNames(String[] names) throws IOException
IOExceptionpublic void setTopologyPaths(String[] topologyPaths) throws IOException
IOExceptionpublic void setStorageIds(String[] storageIds)
public void setStorageTypes(StorageType[] storageTypes)
Copyright © 2022 Apache Software Foundation. All rights reserved.