blob: 59e22aea0a405fbe72c23b5c5e10876c673904ea [file] [log] [blame]
package exec.user;
option java_package = "org.apache.drill.exec.proto";
option java_outer_classname = "UserProtos";
option optimize_for = SPEED;
import "SchemaDef.proto";
import "UserBitShared.proto";
////// UserToBit RPC ///////
enum RpcType {
HANDSHAKE = 0;
ACK = 1;
GOODBYE = 2;
// user to bit
RUN_QUERY = 3; // user is submitting a new query to the drillbit
CANCEL_QUERY = 4; // user is sending a query cancellation request to the drillbit
REQUEST_RESULTS = 5;
// bit to user
QUERY_DATA = 6; // drillbit is sending a query result data batch to the user
QUERY_HANDLE = 7;
REQ_META_FUNCTIONS = 8;
RESP_FUNCTION_LIST = 9;
QUERY_RESULT = 10; // drillbit is reporting a query status change, most likely a terminal message, to the user
}
message Property {
required string key = 1;
required string value = 2;
}
message UserProperties {
repeated Property properties = 1;
}
message UserToBitHandshake {
optional exec.shared.RpcChannel channel = 1 [default = USER];
optional bool support_listening = 2;
optional int32 rpc_version = 3;
optional exec.shared.UserCredentials credentials = 4;
optional UserProperties properties = 5;
optional bool support_complex_types = 6 [default = false];
}
message RequestResults {
optional exec.shared.QueryId query_id = 1;
optional int32 maximum_responses = 2;
}
message RunQuery {
optional QueryResultsMode results_mode = 1;
optional exec.shared.QueryType type = 2;
optional string plan = 3;
}
enum QueryResultsMode {
STREAM_FULL = 1; // Server will inform the client regularly on the status of the query. Once the query is completed, service will inform the client as each query chunk is made available.
// STREAM_FIRST = 2; // Server will inform the client regularly on the status of the query. Once the query is completed, server will inform the client of the first query chunk.
// QUERY_FOR_STATUS = 3; // Client will need to query for status of query.
}
enum HandshakeStatus {
SUCCESS = 1; // Handshake is successful (including authentication if any)
RPC_VERSION_MISMATCH = 2; // Client and Server RPC versions are different
AUTH_FAILED = 3; // User authentication failed
UNKNOWN_FAILURE = 4; // Unknown failure, refer to the error message for more details
}
message BitToUserHandshake {
optional int32 rpc_version = 2;
optional HandshakeStatus status = 3;
optional string errorId = 4;
optional string errorMessage = 5;
}