Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
Currently DataTransferProtocol has methods such as:
public static void opReadBlock(DataOutputStream out, long blockId, long blockGs, long blockOffset, long blockLen, String clientName, Token<BlockTokenIdentifier> blockToken) throws IOException;
The client has to pass the individual elements that make block identification such as blockId and generation stamp. I propose methods with the following format:
public static void opReadBlock(DataOutputStream out, Block block, long blockOffset, long blockLen, String clientName, Token<BlockTokenIdentifier> blockToken) throws IOException;
With this, the client need not understand the internals of Block. It receives Block over RPC and sends it in DataTransferProtocol. This helps in making Block opaque to the client.