public final class TCPRemoteBlockReader extends Object implements RemoteBlockReader
RemoteBlockReader.Factory
Constructor and Description |
---|
TCPRemoteBlockReader() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
ByteBuffer |
readRemoteBlock(InetSocketAddress address,
long blockId,
long offset,
long length)
Reads a remote block with a offset and length.
|
public ByteBuffer readRemoteBlock(InetSocketAddress address, long blockId, long offset, long length) throws IOException
RemoteBlockReader
readRemoteBlock
in interface RemoteBlockReader
address
- The InetSocketAddress
of the data server.blockId
- the id of the block trying to read.offset
- the offset of the block.length
- the length the client wants to read.IOException
- if the remote server is not reachable or responds with failures.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2015. All Rights Reserved.