public final class NettyRemoteBlockWriter extends Object implements RemoteBlockWriter
RemoteBlockWriter.Factory
Constructor and Description |
---|
NettyRemoteBlockWriter()
Creates a new
NettyRemoteBlockWrite . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
open(InetSocketAddress address,
long blockId,
long sessionId)
Opens a block writer to a data server.
|
void |
write(byte[] bytes,
int offset,
int length)
Writes data to the remote block.
|
public NettyRemoteBlockWriter()
NettyRemoteBlockWrite
.public void open(InetSocketAddress address, long blockId, long sessionId) throws IOException
RemoteBlockWriter
open
in interface RemoteBlockWriter
address
- The InetSocketAddress
of the data server.blockId
- The id of the block to write.sessionId
- The id of the session writing the block.IOException
- when the operation failspublic void close()
close
in interface Closeable
close
in interface AutoCloseable
public void write(byte[] bytes, int offset, int length) throws IOException
RemoteBlockWriter
write
in interface RemoteBlockWriter
bytes
- An array of bytes representing the source data.offset
- The offset into the source array of bytes.length
- The length of the data to write (in bytes).IOException
- when the operation failsCopyright © 2015. All Rights Reserved.