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
IOExceptionURISyntaxExceptionpublic byte[] getBlock(String url, long offset, int length) throws IOException
BlockLoadergetBlock in interface BlockLoaderurl - 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–2017 IIPC. All rights reserved.