blob: 10dce1fb9095193b01671d0ef05ee26a85fb416a [file] [log] [blame]
package exec.shared;
option java_package = "org.apache.drill.exec.proto";
option java_outer_classname = "UserBitShared";
option optimize_for = SPEED;
import "Types.proto";
import "Coordination.proto";
import "SchemaDef.proto";
enum RpcChannel {
BIT_CONTROL = 0;
BIT_DATA = 1;
USER = 2;
}
enum QueryType {
SQL = 1;
LOGICAL = 2;
PHYSICAL = 3;
}
message UserCredentials {
optional string user_name = 1;
}
message QueryId {
optional sfixed64 part1 = 1;
optional sfixed64 part2 = 2;
}
message DrillPBError{
optional string error_id = 1; // for debug tracing purposes
optional DrillbitEndpoint endpoint = 2;
optional int32 error_type = 3;
optional string message = 4;
repeated ParsingError parsing_error = 5; //optional, used when providing location of error within a piece of text.
}
message ParsingError{
optional int32 start_column = 2;
optional int32 start_row = 3;
optional int32 end_column = 4;
optional int32 end_row = 5;
}
message RecordBatchDef {
optional int32 record_count = 1;
repeated SerializedField field = 2;
optional bool carries_two_byte_selection_vector = 3;
}
message NamePart{
enum Type{
NAME = 0;
ARRAY = 1;
}
optional Type type = 1;
optional string name = 2;
optional NamePart child = 3;
}
message SerializedField {
optional common.MajorType major_type = 1; // the type associated with this field.
optional NamePart name_part = 2;
repeated SerializedField child = 3; // only in the cases of type == MAP or REPEAT_MAP or REPEATED_LIST
optional int32 value_count = 4;
optional int32 var_byte_length = 5;
optional int32 group_count = 6; // number of groups. (number of repeated records)
optional int32 buffer_length = 7;
}
message NodeStatus {
optional int32 node_id = 1;
optional int64 memory_footprint = 2;
}
message QueryResult {
enum QueryState {
PENDING = 0;
RUNNING = 1;
COMPLETED = 2;
CANCELED = 3;
FAILED = 4;
UNKNOWN_QUERY = 5;
}
optional QueryState query_state = 1;
optional QueryId query_id = 2;
optional bool is_last_chunk = 3;
optional int32 row_count = 4;
optional int64 records_scan = 5;
optional int64 records_error = 6;
optional int64 submission_time = 7;
repeated NodeStatus node_status = 8;
repeated DrillPBError error = 9;
optional RecordBatchDef def = 10;
optional bool schema_changed = 11;
}
message QueryProfile {
optional QueryId id = 1;
optional QueryType type = 2;
optional int64 start = 3;
optional int64 end = 4;
optional string query = 5;
optional string plan = 6;
optional DrillbitEndpoint foreman = 7;
optional QueryResult.QueryState state = 8;
optional int32 total_fragments = 9;
optional int32 finished_fragments = 10;
repeated MajorFragmentProfile fragment_profile = 11;
}
message MajorFragmentProfile {
optional int32 major_fragment_id = 1;
repeated MinorFragmentProfile minor_fragment_profile = 2;
}
message MinorFragmentProfile {
optional FragmentState state = 1;
optional DrillPBError error = 2;
optional int32 minor_fragment_id = 3;
repeated OperatorProfile operator_profile = 4;
optional int64 start_time = 5;
optional int64 end_time = 6;
optional int64 memory_used = 7;
optional int64 max_memory_used = 8;
optional DrillbitEndpoint endpoint = 9;
}
message OperatorProfile {
repeated StreamProfile input_profile = 1;
optional int32 operator_id = 3;
optional int32 operator_type = 4;
optional int64 setup_nanos = 5;
optional int64 process_nanos = 6;
optional int64 local_memory_allocated = 7;
repeated MetricValue metric = 8;
optional int64 wait_nanos = 9;
}
message StreamProfile {
optional int64 records = 1;
optional int64 batches = 2;
optional int64 schemas = 3;
}
message MetricValue {
optional int32 metric_id = 1;
optional int64 long_value = 2;
optional double double_value = 3;
}
enum FragmentState {
SENDING = 0;
AWAITING_ALLOCATION = 1;
RUNNING = 2;
FINISHED = 3;
CANCELLED = 4;
FAILED = 5;
}
enum CoreOperatorType {
SINGLE_SENDER = 0;
BROADCAST_SENDER = 1;
FILTER = 2;
HASH_AGGREGATE = 3;
HASH_JOIN = 4;
MERGE_JOIN = 5;
HASH_PARTITION_SENDER = 6;
LIMIT = 7;
MERGING_RECEIVER = 8;
ORDERED_PARTITION_SENDER = 9;
PROJECT = 10;
UNORDERED_RECEIVER = 11;
RANGE_SENDER = 12;
SCREEN = 13;
SELECTION_VECTOR_REMOVER = 14;
STREAMING_AGGREGATE = 15;
TOP_N_SORT = 16;
EXTERNAL_SORT = 17;
TRACE = 18;
UNION = 19;
OLD_SORT = 20;
PARQUET_ROW_GROUP_SCAN = 21;
HIVE_SUB_SCAN = 22;
SYSTEM_TABLE_SCAN = 23;
MOCK_SUB_SCAN = 24;
PARQUET_WRITER = 25;
DIRECT_SUB_SCAN = 26;
TEXT_WRITER = 27;
TEXT_SUB_SCAN = 28;
JSON_SUB_SCAN = 29;
INFO_SCHEMA_SUB_SCAN = 30;
COMPLEX_TO_JSON = 31;
PRODUCER_CONSUMER = 32;
}