Skip to content

Commit

Permalink
Add new messages to datanode protocol.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanzlenko committed Sep 11, 2024
1 parent f1ebd39 commit 3e3da43
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ package hadoop.hdds.datanode;
* 18. CopyContainer - Copies a container from a remote machine.
*
* 19. FinalizeBlock - Finalize block request from client.
*
* 20. VerifyBlock - Verify block request from client.
*/

enum Type {
Expand Down Expand Up @@ -108,6 +110,8 @@ enum Type {

FinalizeBlock = 21;
Echo = 22;

VerifyBlock = 23;
}


Expand Down Expand Up @@ -217,6 +221,8 @@ message ContainerCommandRequestProto {

optional FinalizeBlockRequestProto finalizeBlock = 25;
optional EchoRequestProto echo = 26;

optional VerifyBlockRequestProto verifyBlock = 27;
}

message ContainerCommandResponseProto {
Expand Down Expand Up @@ -250,6 +256,8 @@ message ContainerCommandResponseProto {

optional FinalizeBlockResponseProto finalizeBlock = 22;
optional EchoResponseProto echo = 23;

optional VerifyBlockResponseProto verifyBlock = 24;
}

message ContainerDataProto {
Expand Down Expand Up @@ -546,6 +554,19 @@ message SendContainerRequest {
message SendContainerResponse {
}

message VerifyBlockRequestProto {
required DatanodeBlockID blockID = 1;
}

message VerifyBlockResponseProto {
enum Reason {
MISSING_CHUNK = 1;
CORRUPTED_CHUNK = 2;
}
required bool valid = 1;
optional Reason reason = 2;
}

service XceiverClientProtocolService {
// A client-to-datanode RPC to send container commands
rpc send(stream ContainerCommandRequestProto) returns
Expand Down

0 comments on commit 3e3da43

Please sign in to comment.