public class HDFSBlockLoader extends Object implements BlockLoader
Constructor and Description |
---|
HDFSBlockLoader(String defaultFSURI) |
Modifier and Type | Method and Description |
---|---|
void |
finalize() |
byte[] |
getBlock(String url,
long offset,
int length)
Fetch a range of bytes from a particular URL.
|
String |
getDefaultFSURI() |
void |
init() |
void |
setDefaultFSURI(String defaultFSURI) |
public HDFSBlockLoader(String defaultFSURI)
public void init() throws IOException, URISyntaxException
IOException
URISyntaxException
public byte[] getBlock(String url, long offset, int length) throws IOException
BlockLoader
getBlock
in interface BlockLoader
url
- String URL to fetchoffset
- byte start offset of the desired rangelength
- number of octets to fetchIOException
- on Network and protocol failures, as well as Timeoutspublic String getDefaultFSURI()
public void setDefaultFSURI(String defaultFSURI)
defaultFSURI
- the defaultFSURI to setCopyright © 2005–2015 IIPC. All rights reserved.