| package exec.bit.control; |
| |
| option java_package = "org.apache.drill.exec.proto"; |
| option java_outer_classname = "BitControl"; |
| option optimize_for = SPEED; |
| |
| import "ExecutionProtos.proto"; |
| import "Coordination.proto"; |
| import "UserBitShared.proto"; |
| |
| |
| ////// BitControl RPC /////// |
| enum RpcType { |
| HANDSHAKE = 0; |
| ACK = 1; |
| GOODBYE = 2; |
| |
| // bit requests |
| REQ_INIATILIZE_FRAGMENTS = 3; // Returns Handle |
| |
| REQ_CANCEL_FRAGMENT = 6; // send a cancellation message for a fragment, returns Ack |
| REQ_RECEIVER_FINISHED = 7; |
| REQ_FRAGMENT_STATUS = 8; // send a fragment status, return Ack |
| REQ_BIT_STATUS = 9; // get bit status. |
| REQ_QUERY_STATUS = 10; |
| REQ_QUERY_CANCEL = 15; |
| |
| // bit responses |
| RESP_FRAGMENT_HANDLE = 11; |
| RESP_FRAGMENT_STATUS = 12; |
| RESP_BIT_STATUS = 13; |
| RESP_QUERY_STATUS = 14; |
| } |
| |
| |
| message BitControlHandshake{ |
| optional int32 rpc_version = 1; |
| optional exec.shared.RpcChannel channel = 2 [default = BIT_CONTROL]; |
| optional DrillbitEndpoint endpoint = 3; |
| } |
| |
| message BitStatus { |
| repeated FragmentStatus fragment_status = 1; |
| } |
| |
| message FragmentStatus { |
| optional exec.shared.MinorFragmentProfile profile = 1; |
| optional FragmentHandle handle = 2; |
| } |
| |
| message InitializeFragments { |
| repeated PlanFragment fragment = 1; |
| } |
| |
| message PlanFragment { |
| optional FragmentHandle handle = 1; |
| optional float network_cost = 4; |
| optional float cpu_cost = 5; |
| optional float disk_cost = 6; |
| optional float memory_cost = 7; |
| optional string fragment_json = 8; |
| optional DrillbitEndpoint assignment = 10; |
| optional bool leaf_fragment = 9; |
| optional DrillbitEndpoint foreman = 11; |
| optional int64 mem_initial = 12 [default = 20000000]; // 20 megs |
| optional int64 mem_max = 13 [default = 2000000000]; // 20 gigs |
| optional int64 query_start_time = 14; // start time of query in milliseconds |
| optional exec.shared.UserCredentials credentials = 15; |
| optional int32 time_zone = 16; |
| optional string options_json = 17; |
| } |
| |
| message WorkQueueStatus{ |
| optional DrillbitEndpoint endpoint = 1; |
| optional int32 queue_length = 2; |
| optional int64 report_time = 3; |
| } |
| |
| message FinishedReceiver { |
| optional FragmentHandle receiver = 1; |
| optional FragmentHandle sender = 2; |
| } |