| // Copyright 2015-2016 Pivotal Software, Inc. |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| syntax = "proto2"; |
| |
| package quickstep.serialization; |
| |
| import "catalog/Catalog.proto"; |
| import "query_execution/QueryContext.proto"; |
| import "relational_operators/WorkOrder.proto"; |
| |
| message ShiftbossRegistrationMessage { |
| // The total Work Order processing capacity in Shiftboss, which equals to the |
| // sum of the capacity of each worker managed by Shiftboss. |
| required uint64 work_order_capacity = 1; |
| } |
| |
| message ShiftbossRegistrationResponseMessage { |
| } |
| |
| message SqlQueryMessage { |
| required string sql_query = 1; |
| } |
| |
| message ShiftbossInitiateMessage { |
| required uint64 query_id = 1; |
| required CatalogDatabase catalog_database_cache = 2; |
| required QueryContext query_context = 3; |
| } |
| |
| message ShiftbossInitiateResponseMessage { |
| required uint64 query_id = 1; |
| } |
| |
| message WorkOrderMessage { |
| required uint64 operator_index = 1; |
| required WorkOrder work_order = 2; |
| } |
| |
| // Used for both Normal WorkOrders and RebuildWorkOrders. |
| // NOTE(zuyu): we might need to seperate the completion messages to contain |
| // run-time information for Foreman to make better decisions on scheduling |
| // WorkOrders. |
| message WorkOrderCompletionMessage { |
| required uint64 operator_index = 1; |
| required uint64 worker_id = 2; |
| } |
| |
| message InitiateRebuildMessage { |
| required uint64 operator_index = 1; |
| required uint64 insert_destination_index = 2; |
| required int32 relation_id = 3; |
| } |
| |
| message InitiateRebuildResponseMessage { |
| required uint64 operator_index = 1; |
| required uint64 num_rebuild_work_orders = 2; |
| } |
| |
| message CatalogRelationNewBlockMessage { |
| required int32 relation_id = 1; |
| required fixed64 block_id = 2; |
| |
| // Used by PartitionAwareInsertDestination. |
| optional uint64 partition_id = 3; |
| } |
| |
| message DataPipelineMessage { |
| required uint64 operator_index = 1; |
| required fixed64 block_id = 2; |
| required int32 relation_id = 3; |
| } |
| |
| message WorkOrdersAvailableMessage { |
| required uint64 operator_index = 1; |
| } |
| |
| message QueryExecutionSuccessMessage { |
| optional CatalogRelation query_result_relation = 1; |
| } |
| |
| message QueryExecutionErrorMessage { |
| required string error_message = 1; |
| } |
| |
| message QueryResultRelationMessage { |
| required int32 relation_id = 1; |
| repeated fixed64 blocks = 2 [packed=true]; |
| } |
| |
| message QueryResultRelationResponseMessage { |
| required int32 relation_id = 1; |
| } |