| 构造器和说明 |
|---|
BlockLocation()
Default Constructor
|
BlockLocation(String[] names,
String[] hosts,
long offset,
long length)
Constructor with host, name, offset and length
|
BlockLocation(String[] names,
String[] hosts,
String[] topologyPaths,
long offset,
long length)
Constructor with host, name, network topology, offset and length
|
| 限定符和类型 | 方法和说明 |
|---|---|
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 (hostname:port) hosting this block
|
long |
getOffset()
Get the start offset of file associated with this block
|
String[] |
getTopologyPaths()
Get the list of network topology paths for each of the hosts.
|
void |
readFields(DataInput in)
Implement readFields of Writable
|
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 |
setTopologyPaths(String[] topologyPaths)
Set the network topology paths of the hosts
|
String |
toString() |
void |
write(DataOutput out)
Implement write of Writable
|
public BlockLocation()
public BlockLocation(String[] names, String[] hosts, long offset, long length)
public String[] getHosts() throws IOException
IOExceptionpublic String[] getNames() throws IOException
IOExceptionpublic String[] getTopologyPaths() throws IOException
IOExceptionpublic long getOffset()
public long getLength()
public void setOffset(long offset)
public void setLength(long length)
public void setHosts(String[] hosts) throws IOException
IOExceptionpublic void setNames(String[] names) throws IOException
IOExceptionpublic void setTopologyPaths(String[] topologyPaths) throws IOException
IOExceptionpublic void write(DataOutput out) throws IOException
write 在接口中 Writableout - DataOuput to serialize this object into.IOExceptionpublic void readFields(DataInput in) throws IOException
readFields 在接口中 Writablein - DataInput to deseriablize this object from.IOExceptionCopyright © 2009 The Apache Software Foundation