package exec;

option java_package = "org.apache.drill.exec.proto";
option java_outer_classname = "CoordinationProtos";
option optimize_for = SPEED;

message DrillbitEndpoint{
  optional string address = 1;
  optional int32 user_port = 2;
  optional int32 control_port = 3;
  optional int32 data_port = 4;
  optional Roles roles = 5;
  optional string version = 6;
  enum State {
      STARTUP = 0;
      ONLINE = 1;
      QUIESCENT = 2;
      OFFLINE = 3;
  }
  optional State state = 7;
  optional int32 http_port = 8;
}

message DrillServiceInstance{
  optional string id = 1;
  optional int64 registrationTimeUTC = 2;
  optional DrillbitEndpoint endpoint = 3;
}

message Roles{
	optional bool sql_query = 1 [default = true];
	optional bool logical_plan = 2 [default = true];
	optional bool physical_plan = 3 [default = true];
	optional bool java_executor = 4 [default = true];
	optional bool distributed_cache = 5 [default = true];
}
