syntax = "proto3"; package cuddlyproto; // import "file.proto"; import "common.proto"; import "datanode.proto"; import "namenode.proto"; // message ReplicateFileRequest { // string file_path = 1; // bytes data = 2; // } // Response after file replication // message ReplicateFileResponse { // cuddlyproto.StatusCode status = 1; // } // Request to synchronize metadata between nodes // message SynchronizeMetadataRequest { // cuddlyproto.FileMetadata metadata = 1; // } // Response after metadata synchronization // message SynchronizeMetadataResponse { // cuddlyproto.StatusCode status = 1; // } message BlockReceivedRequest { string address = 1; cuddlyproto.Block block = 2; } message BlockReceivedResponse { cuddlyproto.StatusCode status = 1; } /// Heartbeat request message : message HeartbeatRequest { DatanodeRegistrationProto registration = 1; // Datanode info repeated StorageReportProto reports = 2; } // Heartbeat response message message HeartbeatResponse { StatusCode status = 1; // Error message if the heartbeat was not received successfully NNHAStatusHeartbeatProto haStatus = 2; // High availability status } // Node service for inter-node communication service NodeService { // rpc ReplicateFile (ReplicateFileRequest) returns (ReplicateFileResponse); // rpc SynchronizeMetadata (SynchronizeMetadataRequest) returns (SynchronizeMetadataResponse); rpc BlockReceived (BlockReceivedRequest) returns (BlockReceivedResponse); rpc Heartbeat (HeartbeatRequest) returns (HeartbeatResponse); }