diff --git a/go/greptime/v1/ddl.pb.go b/go/greptime/v1/ddl.pb.go index 744442ed..9ee7194d 100644 --- a/go/greptime/v1/ddl.pb.go +++ b/go/greptime/v1/ddl.pb.go @@ -355,7 +355,8 @@ type AlterExpr struct { // *AlterExpr_AddColumns // *AlterExpr_DropColumns // *AlterExpr_RenameTable - Kind isAlterExpr_Kind `protobuf_oneof:"kind"` + Kind isAlterExpr_Kind `protobuf_oneof:"kind"` + TableId *TableId `protobuf:"bytes,7,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` } func (x *AlterExpr) Reset() { @@ -439,6 +440,13 @@ func (x *AlterExpr) GetRenameTable() *RenameTable { return nil } +func (x *AlterExpr) GetTableId() *TableId { + if x != nil { + return x.TableId + } + return nil +} + type isAlterExpr_Kind interface { isAlterExpr_Kind() } @@ -466,9 +474,10 @@ type DropTableExpr struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CatalogName string `protobuf:"bytes,1,opt,name=catalog_name,json=catalogName,proto3" json:"catalog_name,omitempty"` - SchemaName string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"` - TableName string `protobuf:"bytes,3,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` + CatalogName string `protobuf:"bytes,1,opt,name=catalog_name,json=catalogName,proto3" json:"catalog_name,omitempty"` + SchemaName string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"` + TableName string `protobuf:"bytes,3,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` + TableId *TableId `protobuf:"bytes,4,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` } func (x *DropTableExpr) Reset() { @@ -524,15 +533,23 @@ func (x *DropTableExpr) GetTableName() string { return "" } +func (x *DropTableExpr) GetTableId() *TableId { + if x != nil { + return x.TableId + } + return nil +} + type FlushTableExpr struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CatalogName string `protobuf:"bytes,1,opt,name=catalog_name,json=catalogName,proto3" json:"catalog_name,omitempty"` - SchemaName string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"` - TableName string `protobuf:"bytes,3,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` - RegionNumber *uint32 `protobuf:"varint,4,opt,name=region_number,json=regionNumber,proto3,oneof" json:"region_number,omitempty"` + CatalogName string `protobuf:"bytes,1,opt,name=catalog_name,json=catalogName,proto3" json:"catalog_name,omitempty"` + SchemaName string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"` + TableName string `protobuf:"bytes,3,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` + RegionNumber *uint32 `protobuf:"varint,4,opt,name=region_number,json=regionNumber,proto3,oneof" json:"region_number,omitempty"` + TableId *TableId `protobuf:"bytes,5,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` } func (x *FlushTableExpr) Reset() { @@ -595,6 +612,13 @@ func (x *FlushTableExpr) GetRegionNumber() uint32 { return 0 } +func (x *FlushTableExpr) GetTableId() *TableId { + if x != nil { + return x.TableId + } + return nil +} + type CreateDatabaseExpr struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1067,7 +1091,7 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{ 0x11, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb0, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe1, 0x02, 0x0a, 0x09, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, @@ -1086,75 +1110,84 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{ 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, - 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, - 0x64, 0x22, 0x72, 0x0a, 0x0d, 0x44, 0x72, 0x6f, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x78, - 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, - 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x0e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x72, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x6a, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x23, 0x0a, - 0x0d, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x66, 0x5f, - 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x66, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, - 0x73, 0x74, 0x73, 0x22, 0x45, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x0a, - 0x61, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x49, 0x0a, 0x0b, 0x44, 0x72, - 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x64, 0x72, 0x6f, - 0x70, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x72, - 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x0b, 0x64, 0x72, 0x6f, 0x70, 0x43, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x33, 0x0a, 0x0b, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, - 0x77, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc8, 0x02, 0x0a, 0x09, 0x41, - 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x44, 0x65, 0x66, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, - 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x69, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0xaf, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x51, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, - 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x6f, - 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x61, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x6f, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, - 0x24, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x09, 0x0a, 0x05, 0x46, 0x49, 0x52, 0x53, 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x46, - 0x54, 0x45, 0x52, 0x10, 0x01, 0x22, 0x20, 0x0a, 0x0a, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x07, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, - 0x69, 0x64, 0x42, 0x4c, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x42, 0x03, 0x44, 0x64, 0x6c, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, - 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, + 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, + 0x64, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x22, 0xa3, 0x01, 0x0a, 0x0d, 0x44, 0x72, 0x6f, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x65, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x52, + 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x22, 0xe0, 0x01, 0x0a, 0x0e, 0x46, 0x6c, 0x75, + 0x73, 0x68, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, + 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, + 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, + 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x6a, 0x0a, 0x12, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, + 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x5f, 0x69, 0x66, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x66, 0x4e, 0x6f, + 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x45, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x5f, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x49, + 0x0a, 0x0b, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x3a, 0x0a, + 0x0c, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x0b, 0x64, 0x72, + 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x33, 0x0a, 0x0b, 0x52, 0x65, 0x6e, + 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc8, + 0x02, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x35, 0x0a, 0x0a, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x44, 0x65, 0x66, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x08, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xaf, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x72, + 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x66, 0x74, 0x65, 0x72, + 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x6f, 0x75, 0x6d, 0x6e, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x52, 0x53, 0x54, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x41, 0x46, 0x54, 0x45, 0x52, 0x10, 0x01, 0x22, 0x20, 0x0a, 0x0a, 0x44, 0x72, 0x6f, + 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x07, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x42, 0x4c, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x03, 0x44, 0x64, 0x6c, 0x5a, 0x35, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1201,16 +1234,19 @@ var file_greptime_v1_ddl_proto_depIdxs = []int32{ 7, // 8: greptime.v1.AlterExpr.add_columns:type_name -> greptime.v1.AddColumns 8, // 9: greptime.v1.AlterExpr.drop_columns:type_name -> greptime.v1.DropColumns 9, // 10: greptime.v1.AlterExpr.rename_table:type_name -> greptime.v1.RenameTable - 10, // 11: greptime.v1.AddColumns.add_columns:type_name -> greptime.v1.AddColumn - 11, // 12: greptime.v1.DropColumns.drop_columns:type_name -> greptime.v1.DropColumn - 15, // 13: greptime.v1.AddColumn.column_def:type_name -> greptime.v1.ColumnDef - 14, // 14: greptime.v1.AddColumn.location:type_name -> greptime.v1.AddColumn.Location - 0, // 15: greptime.v1.AddColumn.Location.location_type:type_name -> greptime.v1.AddColumn.Location.LocationType - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 12, // 11: greptime.v1.AlterExpr.table_id:type_name -> greptime.v1.TableId + 12, // 12: greptime.v1.DropTableExpr.table_id:type_name -> greptime.v1.TableId + 12, // 13: greptime.v1.FlushTableExpr.table_id:type_name -> greptime.v1.TableId + 10, // 14: greptime.v1.AddColumns.add_columns:type_name -> greptime.v1.AddColumn + 11, // 15: greptime.v1.DropColumns.drop_columns:type_name -> greptime.v1.DropColumn + 15, // 16: greptime.v1.AddColumn.column_def:type_name -> greptime.v1.ColumnDef + 14, // 17: greptime.v1.AddColumn.location:type_name -> greptime.v1.AddColumn.Location + 0, // 18: greptime.v1.AddColumn.Location.location_type:type_name -> greptime.v1.AddColumn.Location.LocationType + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name } func init() { file_greptime_v1_ddl_proto_init() } diff --git a/go/greptime/v1/meta/ddl.pb.go b/go/greptime/v1/meta/ddl.pb.go index f85617c3..b1e8f9dc 100644 --- a/go/greptime/v1/meta/ddl.pb.go +++ b/go/greptime/v1/meta/ddl.pb.go @@ -21,6 +21,7 @@ package meta import ( + v1 "github.com/GreptimeTeam/greptime-proto/go/greptime/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -38,15 +39,18 @@ type DdlTaskType int32 const ( DdlTaskType_Create DdlTaskType = 0 + DdlTaskType_Drop DdlTaskType = 1 ) // Enum value maps for DdlTaskType. var ( DdlTaskType_name = map[int32]string{ 0: "Create", + 1: "Drop", } DdlTaskType_value = map[string]int32{ "Create": 0, + "Drop": 1, } ) @@ -77,84 +81,94 @@ func (DdlTaskType) EnumDescriptor() ([]byte, []int) { return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{0} } -type Status int32 +type CreateTableTask struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -const ( - Status_Done Status = 0 - Status_Failed Status = 1 - Status_Cancelled Status = 2 -) + CreateTable *v1.CreateTableExpr `protobuf:"bytes,1,opt,name=create_table,json=createTable,proto3" json:"create_table,omitempty"` + Partitions []*Partition `protobuf:"bytes,2,rep,name=partitions,proto3" json:"partitions,omitempty"` + TableInfo []byte `protobuf:"bytes,3,opt,name=table_info,json=tableInfo,proto3" json:"table_info,omitempty"` +} -// Enum value maps for Status. -var ( - Status_name = map[int32]string{ - 0: "Done", - 1: "Failed", - 2: "Cancelled", - } - Status_value = map[string]int32{ - "Done": 0, - "Failed": 1, - "Cancelled": 2, +func (x *CreateTableTask) Reset() { + *x = CreateTableTask{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -) +} -func (x Status) Enum() *Status { - p := new(Status) - *p = x - return p +func (x *CreateTableTask) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +func (*CreateTableTask) ProtoMessage() {} + +func (x *CreateTableTask) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (Status) Descriptor() protoreflect.EnumDescriptor { - return file_greptime_v1_meta_ddl_proto_enumTypes[1].Descriptor() +// Deprecated: Use CreateTableTask.ProtoReflect.Descriptor instead. +func (*CreateTableTask) Descriptor() ([]byte, []int) { + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{0} } -func (Status) Type() protoreflect.EnumType { - return &file_greptime_v1_meta_ddl_proto_enumTypes[1] +func (x *CreateTableTask) GetCreateTable() *v1.CreateTableExpr { + if x != nil { + return x.CreateTable + } + return nil } -func (x Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) +func (x *CreateTableTask) GetPartitions() []*Partition { + if x != nil { + return x.Partitions + } + return nil } -// Deprecated: Use Status.Descriptor instead. -func (Status) EnumDescriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{1} +func (x *CreateTableTask) GetTableInfo() []byte { + if x != nil { + return x.TableInfo + } + return nil } -type Task struct { +type DropTableTask struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type DdlTaskType `protobuf:"varint,1,opt,name=type,proto3,enum=greptime.v1.meta.DdlTaskType" json:"type,omitempty"` - // Types that are assignable to Payload: - // - // *Task_Pd - Payload isTask_Payload `protobuf_oneof:"payload"` + DropTable *v1.DropTableExpr `protobuf:"bytes,1,opt,name=drop_table,json=dropTable,proto3" json:"drop_table,omitempty"` } -func (x *Task) Reset() { - *x = Task{} +func (x *DropTableTask) Reset() { + *x = DropTableTask{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[0] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Task) String() string { +func (x *DropTableTask) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Task) ProtoMessage() {} +func (*DropTableTask) ProtoMessage() {} -func (x *Task) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[0] +func (x *DropTableTask) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -165,41 +179,64 @@ func (x *Task) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Task.ProtoReflect.Descriptor instead. -func (*Task) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{0} +// Deprecated: Use DropTableTask.ProtoReflect.Descriptor instead. +func (*DropTableTask) Descriptor() ([]byte, []int) { + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{1} } -func (x *Task) GetType() DdlTaskType { +func (x *DropTableTask) GetDropTable() *v1.DropTableExpr { if x != nil { - return x.Type + return x.DropTable } - return DdlTaskType_Create + return nil } -func (m *Task) GetPayload() isTask_Payload { - if m != nil { - return m.Payload - } - return nil +type AlterTableTask struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AlterTable *v1.AlterExpr `protobuf:"bytes,1,opt,name=alter_table,json=alterTable,proto3" json:"alter_table,omitempty"` } -func (x *Task) GetPd() []byte { - if x, ok := x.GetPayload().(*Task_Pd); ok { - return x.Pd +func (x *AlterTableTask) Reset() { + *x = AlterTableTask{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type isTask_Payload interface { - isTask_Payload() +func (x *AlterTableTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlterTableTask) ProtoMessage() {} + +func (x *AlterTableTask) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type Task_Pd struct { - Pd []byte `protobuf:"bytes,2,opt,name=pd,proto3,oneof"` +// Deprecated: Use AlterTableTask.ProtoReflect.Descriptor instead. +func (*AlterTableTask) Descriptor() ([]byte, []int) { + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{2} } -func (*Task_Pd) isTask_Payload() {} +func (x *AlterTableTask) GetAlterTable() *v1.AlterExpr { + if x != nil { + return x.AlterTable + } + return nil +} type SubmitDdlTaskRequest struct { state protoimpl.MessageState @@ -207,20 +244,18 @@ type SubmitDdlTaskRequest struct { unknownFields protoimpl.UnknownFields Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // The following information plays a bigger role in making messages traceable - // and facilitating debugging. - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - From string `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"` - To string `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"` - // The unix timestamp in milliseconds. - TimestampMillis int64 `protobuf:"varint,5,opt,name=timestamp_millis,json=timestampMillis,proto3" json:"timestamp_millis,omitempty"` - Task *Task `protobuf:"bytes,6,opt,name=task,proto3" json:"task,omitempty"` + // Types that are assignable to Task: + // + // *SubmitDdlTaskRequest_CreateTableTask + // *SubmitDdlTaskRequest_DropTableTask + // *SubmitDdlTaskRequest_AlterTableTask + Task isSubmitDdlTaskRequest_Task `protobuf_oneof:"task"` } func (x *SubmitDdlTaskRequest) Reset() { *x = SubmitDdlTaskRequest{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[1] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -233,7 +268,7 @@ func (x *SubmitDdlTaskRequest) String() string { func (*SubmitDdlTaskRequest) ProtoMessage() {} func (x *SubmitDdlTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[1] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -246,7 +281,7 @@ func (x *SubmitDdlTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitDdlTaskRequest.ProtoReflect.Descriptor instead. func (*SubmitDdlTaskRequest) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{1} + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{3} } func (x *SubmitDdlTaskRequest) GetHeader() *RequestHeader { @@ -256,41 +291,56 @@ func (x *SubmitDdlTaskRequest) GetHeader() *RequestHeader { return nil } -func (x *SubmitDdlTaskRequest) GetSubject() string { - if x != nil { - return x.Subject +func (m *SubmitDdlTaskRequest) GetTask() isSubmitDdlTaskRequest_Task { + if m != nil { + return m.Task } - return "" + return nil } -func (x *SubmitDdlTaskRequest) GetFrom() string { - if x != nil { - return x.From +func (x *SubmitDdlTaskRequest) GetCreateTableTask() *CreateTableTask { + if x, ok := x.GetTask().(*SubmitDdlTaskRequest_CreateTableTask); ok { + return x.CreateTableTask } - return "" + return nil } -func (x *SubmitDdlTaskRequest) GetTo() string { - if x != nil { - return x.To +func (x *SubmitDdlTaskRequest) GetDropTableTask() *DropTableTask { + if x, ok := x.GetTask().(*SubmitDdlTaskRequest_DropTableTask); ok { + return x.DropTableTask } - return "" + return nil } -func (x *SubmitDdlTaskRequest) GetTimestampMillis() int64 { - if x != nil { - return x.TimestampMillis +func (x *SubmitDdlTaskRequest) GetAlterTableTask() *AlterTableTask { + if x, ok := x.GetTask().(*SubmitDdlTaskRequest_AlterTableTask); ok { + return x.AlterTableTask } - return 0 + return nil } -func (x *SubmitDdlTaskRequest) GetTask() *Task { - if x != nil { - return x.Task - } - return nil +type isSubmitDdlTaskRequest_Task interface { + isSubmitDdlTaskRequest_Task() +} + +type SubmitDdlTaskRequest_CreateTableTask struct { + CreateTableTask *CreateTableTask `protobuf:"bytes,2,opt,name=create_table_task,json=createTableTask,proto3,oneof"` +} + +type SubmitDdlTaskRequest_DropTableTask struct { + DropTableTask *DropTableTask `protobuf:"bytes,3,opt,name=drop_table_task,json=dropTableTask,proto3,oneof"` } +type SubmitDdlTaskRequest_AlterTableTask struct { + AlterTableTask *AlterTableTask `protobuf:"bytes,4,opt,name=alter_table_task,json=alterTableTask,proto3,oneof"` +} + +func (*SubmitDdlTaskRequest_CreateTableTask) isSubmitDdlTaskRequest_Task() {} + +func (*SubmitDdlTaskRequest_DropTableTask) isSubmitDdlTaskRequest_Task() {} + +func (*SubmitDdlTaskRequest_AlterTableTask) isSubmitDdlTaskRequest_Task() {} + type SubmitDdlTaskResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -298,14 +348,15 @@ type SubmitDdlTaskResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` // Key is the identifier for the ddl task. - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Status Status `protobuf:"varint,3,opt,name=status,proto3,enum=greptime.v1.meta.Status" json:"status,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // Returns if table created. + TableId *v1.TableId `protobuf:"bytes,4,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` } func (x *SubmitDdlTaskResponse) Reset() { *x = SubmitDdlTaskResponse{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[2] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -318,7 +369,7 @@ func (x *SubmitDdlTaskResponse) String() string { func (*SubmitDdlTaskResponse) ProtoMessage() {} func (x *SubmitDdlTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[2] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -331,7 +382,7 @@ func (x *SubmitDdlTaskResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitDdlTaskResponse.ProtoReflect.Descriptor instead. func (*SubmitDdlTaskResponse) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{2} + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{4} } func (x *SubmitDdlTaskResponse) GetHeader() *ResponseHeader { @@ -348,11 +399,11 @@ func (x *SubmitDdlTaskResponse) GetKey() []byte { return nil } -func (x *SubmitDdlTaskResponse) GetStatus() Status { +func (x *SubmitDdlTaskResponse) GetTableId() *v1.TableId { if x != nil { - return x.Status + return x.TableId } - return Status_Done + return nil } var File_greptime_v1_meta_ddl_proto protoreflect.FileDescriptor @@ -362,53 +413,74 @@ var file_greptime_v1_meta_ddl_proto_rawDesc = []byte{ 0x74, 0x61, 0x2f, 0x64, 0x64, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, - 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x02, 0x70, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x02, 0x70, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xe4, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, - 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, - 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, - 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, - 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x64, 0x6c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xae, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3f, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, + 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, + 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x22, 0x4a, 0x0a, 0x0d, 0x44, 0x72, 0x6f, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x45, 0x78, 0x70, 0x72, 0x52, 0x09, 0x64, 0x72, 0x6f, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, + 0x49, 0x0a, 0x0e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, + 0x6b, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0a, + 0x61, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xc1, 0x02, 0x0a, 0x14, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x11, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x61, 0x73, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x49, 0x0a, + 0x0f, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x72, 0x6f, 0x70, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x4c, 0x0a, 0x10, 0x61, 0x6c, 0x74, 0x65, + 0x72, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0x94, + 0x01, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x52, 0x07, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x49, 0x64, 0x2a, 0x23, 0x0a, 0x0b, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x10, 0x00, + 0x12, 0x08, 0x0a, 0x04, 0x44, 0x72, 0x6f, 0x70, 0x10, 0x01, 0x32, 0x6b, 0x0a, 0x07, 0x44, 0x64, + 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x60, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, + 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x26, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0x95, 0x01, 0x0a, - 0x15, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2a, 0x19, 0x0a, 0x0b, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x10, 0x00, 0x2a, - 0x2d, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x6f, 0x6e, - 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x01, 0x12, - 0x0d, 0x0a, 0x09, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x32, 0x6b, - 0x0a, 0x07, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x60, 0x0a, 0x0d, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x26, 0x2e, 0x67, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x64, 0x6c, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, - 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x61, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, + 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -423,30 +495,41 @@ func file_greptime_v1_meta_ddl_proto_rawDescGZIP() []byte { return file_greptime_v1_meta_ddl_proto_rawDescData } -var file_greptime_v1_meta_ddl_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_greptime_v1_meta_ddl_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_greptime_v1_meta_ddl_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_greptime_v1_meta_ddl_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_greptime_v1_meta_ddl_proto_goTypes = []interface{}{ (DdlTaskType)(0), // 0: greptime.v1.meta.DdlTaskType - (Status)(0), // 1: greptime.v1.meta.Status - (*Task)(nil), // 2: greptime.v1.meta.Task - (*SubmitDdlTaskRequest)(nil), // 3: greptime.v1.meta.SubmitDdlTaskRequest - (*SubmitDdlTaskResponse)(nil), // 4: greptime.v1.meta.SubmitDdlTaskResponse - (*RequestHeader)(nil), // 5: greptime.v1.meta.RequestHeader - (*ResponseHeader)(nil), // 6: greptime.v1.meta.ResponseHeader + (*CreateTableTask)(nil), // 1: greptime.v1.meta.CreateTableTask + (*DropTableTask)(nil), // 2: greptime.v1.meta.DropTableTask + (*AlterTableTask)(nil), // 3: greptime.v1.meta.AlterTableTask + (*SubmitDdlTaskRequest)(nil), // 4: greptime.v1.meta.SubmitDdlTaskRequest + (*SubmitDdlTaskResponse)(nil), // 5: greptime.v1.meta.SubmitDdlTaskResponse + (*v1.CreateTableExpr)(nil), // 6: greptime.v1.CreateTableExpr + (*Partition)(nil), // 7: greptime.v1.meta.Partition + (*v1.DropTableExpr)(nil), // 8: greptime.v1.DropTableExpr + (*v1.AlterExpr)(nil), // 9: greptime.v1.AlterExpr + (*RequestHeader)(nil), // 10: greptime.v1.meta.RequestHeader + (*ResponseHeader)(nil), // 11: greptime.v1.meta.ResponseHeader + (*v1.TableId)(nil), // 12: greptime.v1.TableId } var file_greptime_v1_meta_ddl_proto_depIdxs = []int32{ - 0, // 0: greptime.v1.meta.Task.type:type_name -> greptime.v1.meta.DdlTaskType - 5, // 1: greptime.v1.meta.SubmitDdlTaskRequest.header:type_name -> greptime.v1.meta.RequestHeader - 2, // 2: greptime.v1.meta.SubmitDdlTaskRequest.task:type_name -> greptime.v1.meta.Task - 6, // 3: greptime.v1.meta.SubmitDdlTaskResponse.header:type_name -> greptime.v1.meta.ResponseHeader - 1, // 4: greptime.v1.meta.SubmitDdlTaskResponse.status:type_name -> greptime.v1.meta.Status - 3, // 5: greptime.v1.meta.DdlTask.SubmitDdlTask:input_type -> greptime.v1.meta.SubmitDdlTaskRequest - 4, // 6: greptime.v1.meta.DdlTask.SubmitDdlTask:output_type -> greptime.v1.meta.SubmitDdlTaskResponse - 6, // [6:7] is the sub-list for method output_type - 5, // [5:6] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 6, // 0: greptime.v1.meta.CreateTableTask.create_table:type_name -> greptime.v1.CreateTableExpr + 7, // 1: greptime.v1.meta.CreateTableTask.partitions:type_name -> greptime.v1.meta.Partition + 8, // 2: greptime.v1.meta.DropTableTask.drop_table:type_name -> greptime.v1.DropTableExpr + 9, // 3: greptime.v1.meta.AlterTableTask.alter_table:type_name -> greptime.v1.AlterExpr + 10, // 4: greptime.v1.meta.SubmitDdlTaskRequest.header:type_name -> greptime.v1.meta.RequestHeader + 1, // 5: greptime.v1.meta.SubmitDdlTaskRequest.create_table_task:type_name -> greptime.v1.meta.CreateTableTask + 2, // 6: greptime.v1.meta.SubmitDdlTaskRequest.drop_table_task:type_name -> greptime.v1.meta.DropTableTask + 3, // 7: greptime.v1.meta.SubmitDdlTaskRequest.alter_table_task:type_name -> greptime.v1.meta.AlterTableTask + 11, // 8: greptime.v1.meta.SubmitDdlTaskResponse.header:type_name -> greptime.v1.meta.ResponseHeader + 12, // 9: greptime.v1.meta.SubmitDdlTaskResponse.table_id:type_name -> greptime.v1.TableId + 4, // 10: greptime.v1.meta.DdlTask.SubmitDdlTask:input_type -> greptime.v1.meta.SubmitDdlTaskRequest + 5, // 11: greptime.v1.meta.DdlTask.SubmitDdlTask:output_type -> greptime.v1.meta.SubmitDdlTaskResponse + 11, // [11:12] is the sub-list for method output_type + 10, // [10:11] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_greptime_v1_meta_ddl_proto_init() } @@ -455,9 +538,10 @@ func file_greptime_v1_meta_ddl_proto_init() { return } file_greptime_v1_meta_common_proto_init() + file_greptime_v1_meta_route_proto_init() if !protoimpl.UnsafeEnabled { file_greptime_v1_meta_ddl_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Task); i { + switch v := v.(*CreateTableTask); i { case 0: return &v.state case 1: @@ -469,7 +553,7 @@ func file_greptime_v1_meta_ddl_proto_init() { } } file_greptime_v1_meta_ddl_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubmitDdlTaskRequest); i { + switch v := v.(*DropTableTask); i { case 0: return &v.state case 1: @@ -481,6 +565,30 @@ func file_greptime_v1_meta_ddl_proto_init() { } } file_greptime_v1_meta_ddl_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AlterTableTask); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_greptime_v1_meta_ddl_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitDdlTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_greptime_v1_meta_ddl_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubmitDdlTaskResponse); i { case 0: return &v.state @@ -493,16 +601,18 @@ func file_greptime_v1_meta_ddl_proto_init() { } } } - file_greptime_v1_meta_ddl_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Task_Pd)(nil), + file_greptime_v1_meta_ddl_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*SubmitDdlTaskRequest_CreateTableTask)(nil), + (*SubmitDdlTaskRequest_DropTableTask)(nil), + (*SubmitDdlTaskRequest_AlterTableTask)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_meta_ddl_proto_rawDesc, - NumEnums: 2, - NumMessages: 3, + NumEnums: 1, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/go/greptime/v1/meta/route.pb.go b/go/greptime/v1/meta/route.pb.go index 49e7d3e3..b11a9e69 100644 --- a/go/greptime/v1/meta/route.pb.go +++ b/go/greptime/v1/meta/route.pb.go @@ -34,6 +34,77 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type CreateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + TableName *TableName `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` + Partitions []*Partition `protobuf:"bytes,3,rep,name=partitions,proto3" json:"partitions,omitempty"` + TableInfo []byte `protobuf:"bytes,4,opt,name=table_info,json=tableInfo,proto3" json:"table_info,omitempty"` +} + +func (x *CreateRequest) Reset() { + *x = CreateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_meta_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRequest) ProtoMessage() {} + +func (x *CreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_meta_route_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead. +func (*CreateRequest) Descriptor() ([]byte, []int) { + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateRequest) GetHeader() *RequestHeader { + if x != nil { + return x.Header + } + return nil +} + +func (x *CreateRequest) GetTableName() *TableName { + if x != nil { + return x.TableName + } + return nil +} + +func (x *CreateRequest) GetPartitions() []*Partition { + if x != nil { + return x.Partitions + } + return nil +} + +func (x *CreateRequest) GetTableInfo() []byte { + if x != nil { + return x.TableInfo + } + return nil +} + type RouteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -46,7 +117,7 @@ type RouteRequest struct { func (x *RouteRequest) Reset() { *x = RouteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[0] + mi := &file_greptime_v1_meta_route_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -59,7 +130,7 @@ func (x *RouteRequest) String() string { func (*RouteRequest) ProtoMessage() {} func (x *RouteRequest) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[0] + mi := &file_greptime_v1_meta_route_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72,7 +143,7 @@ func (x *RouteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RouteRequest.ProtoReflect.Descriptor instead. func (*RouteRequest) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{0} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{1} } func (x *RouteRequest) GetHeader() *RequestHeader { @@ -101,7 +172,7 @@ type DeleteRequest struct { func (x *DeleteRequest) Reset() { *x = DeleteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[1] + mi := &file_greptime_v1_meta_route_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -114,7 +185,7 @@ func (x *DeleteRequest) String() string { func (*DeleteRequest) ProtoMessage() {} func (x *DeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[1] + mi := &file_greptime_v1_meta_route_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -127,7 +198,7 @@ func (x *DeleteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. func (*DeleteRequest) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{1} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{2} } func (x *DeleteRequest) GetHeader() *RequestHeader { @@ -157,7 +228,7 @@ type RouteResponse struct { func (x *RouteResponse) Reset() { *x = RouteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[2] + mi := &file_greptime_v1_meta_route_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -170,7 +241,7 @@ func (x *RouteResponse) String() string { func (*RouteResponse) ProtoMessage() {} func (x *RouteResponse) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[2] + mi := &file_greptime_v1_meta_route_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -183,7 +254,7 @@ func (x *RouteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RouteResponse.ProtoReflect.Descriptor instead. func (*RouteResponse) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{2} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{3} } func (x *RouteResponse) GetHeader() *ResponseHeader { @@ -219,7 +290,7 @@ type TableRoute struct { func (x *TableRoute) Reset() { *x = TableRoute{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[3] + mi := &file_greptime_v1_meta_route_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -232,7 +303,7 @@ func (x *TableRoute) String() string { func (*TableRoute) ProtoMessage() {} func (x *TableRoute) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[3] + mi := &file_greptime_v1_meta_route_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -245,7 +316,7 @@ func (x *TableRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use TableRoute.ProtoReflect.Descriptor instead. func (*TableRoute) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{3} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{4} } func (x *TableRoute) GetTable() *Table { @@ -277,7 +348,7 @@ type RegionRoute struct { func (x *RegionRoute) Reset() { *x = RegionRoute{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[4] + mi := &file_greptime_v1_meta_route_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -290,7 +361,7 @@ func (x *RegionRoute) String() string { func (*RegionRoute) ProtoMessage() {} func (x *RegionRoute) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[4] + mi := &file_greptime_v1_meta_route_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -303,7 +374,7 @@ func (x *RegionRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use RegionRoute.ProtoReflect.Descriptor instead. func (*RegionRoute) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{4} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{5} } func (x *RegionRoute) GetRegion() *Region { @@ -340,7 +411,7 @@ type Table struct { func (x *Table) Reset() { *x = Table{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[5] + mi := &file_greptime_v1_meta_route_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -353,7 +424,7 @@ func (x *Table) String() string { func (*Table) ProtoMessage() {} func (x *Table) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[5] + mi := &file_greptime_v1_meta_route_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -366,7 +437,7 @@ func (x *Table) ProtoReflect() protoreflect.Message { // Deprecated: Use Table.ProtoReflect.Descriptor instead. func (*Table) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{5} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{6} } func (x *Table) GetId() uint64 { @@ -405,7 +476,7 @@ type Region struct { func (x *Region) Reset() { *x = Region{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[6] + mi := &file_greptime_v1_meta_route_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -418,7 +489,7 @@ func (x *Region) String() string { func (*Region) ProtoMessage() {} func (x *Region) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[6] + mi := &file_greptime_v1_meta_route_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -431,7 +502,7 @@ func (x *Region) ProtoReflect() protoreflect.Message { // Deprecated: Use Region.ProtoReflect.Descriptor instead. func (*Region) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{6} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{7} } func (x *Region) GetId() uint64 { @@ -475,7 +546,7 @@ type Partition struct { func (x *Partition) Reset() { *x = Partition{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[7] + mi := &file_greptime_v1_meta_route_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -488,7 +559,7 @@ func (x *Partition) String() string { func (*Partition) ProtoMessage() {} func (x *Partition) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[7] + mi := &file_greptime_v1_meta_route_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -501,7 +572,7 @@ func (x *Partition) ProtoReflect() protoreflect.Message { // Deprecated: Use Partition.ProtoReflect.Descriptor instead. func (*Partition) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{7} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{8} } func (x *Partition) GetColumnList() [][]byte { @@ -531,7 +602,7 @@ type TableRouteValue struct { func (x *TableRouteValue) Reset() { *x = TableRouteValue{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[8] + mi := &file_greptime_v1_meta_route_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -544,7 +615,7 @@ func (x *TableRouteValue) String() string { func (*TableRouteValue) ProtoMessage() {} func (x *TableRouteValue) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[8] + mi := &file_greptime_v1_meta_route_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -557,7 +628,7 @@ func (x *TableRouteValue) ProtoReflect() protoreflect.Message { // Deprecated: Use TableRouteValue.ProtoReflect.Descriptor instead. func (*TableRouteValue) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{8} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{9} } func (x *TableRouteValue) GetPeers() []*Peer { @@ -582,102 +653,121 @@ var file_greptime_v1_meta_route_proto_rawDesc = []byte{ 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x85, 0x01, 0x0a, 0x0c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, - 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0b, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, + 0xe0, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xb8, - 0x01, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, - 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x65, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, - 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0b, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x7f, 0x0a, 0x0a, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, - 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, - 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0c, 0x72, 0x65, - 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x9f, 0x01, 0x0a, 0x0b, 0x52, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x72, 0x65, - 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, - 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, - 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, - 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x6f, 0x6c, 0x6c, - 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x13, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, - 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x22, 0x76, 0x0a, 0x05, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, + 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x61, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x0c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0b, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0a, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0d, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x22, 0xdc, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, - 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x64, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x65, 0x22, 0xb8, 0x01, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, + 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x7f, 0x0a, 0x0a, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x67, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x9f, 0x01, + 0x0a, 0x0b, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x30, 0x0a, + 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, - 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x74, 0x74, - 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x69, 0x73, 0x74, - 0x22, 0x7e, 0x0a, 0x0f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, - 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x32, 0xa2, 0x01, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x05, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, - 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, - 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, + 0x2a, 0x0a, 0x11, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x15, 0x66, + 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x13, 0x66, 0x6f, 0x6c, 0x6c, + 0x6f, 0x77, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x22, + 0x76, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xdc, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69, + 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x39, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x64, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x1a, 0x38, 0x0a, 0x0a, + 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x22, 0x7e, 0x0a, 0x0f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, + 0x65, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x32, 0xf0, 0x01, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x4c, + 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x05, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, + 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, + 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -692,48 +782,54 @@ func file_greptime_v1_meta_route_proto_rawDescGZIP() []byte { return file_greptime_v1_meta_route_proto_rawDescData } -var file_greptime_v1_meta_route_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_greptime_v1_meta_route_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_greptime_v1_meta_route_proto_goTypes = []interface{}{ - (*RouteRequest)(nil), // 0: greptime.v1.meta.RouteRequest - (*DeleteRequest)(nil), // 1: greptime.v1.meta.DeleteRequest - (*RouteResponse)(nil), // 2: greptime.v1.meta.RouteResponse - (*TableRoute)(nil), // 3: greptime.v1.meta.TableRoute - (*RegionRoute)(nil), // 4: greptime.v1.meta.RegionRoute - (*Table)(nil), // 5: greptime.v1.meta.Table - (*Region)(nil), // 6: greptime.v1.meta.Region - (*Partition)(nil), // 7: greptime.v1.meta.Partition - (*TableRouteValue)(nil), // 8: greptime.v1.meta.TableRouteValue - nil, // 9: greptime.v1.meta.Region.AttrsEntry - (*RequestHeader)(nil), // 10: greptime.v1.meta.RequestHeader - (*TableName)(nil), // 11: greptime.v1.meta.TableName - (*ResponseHeader)(nil), // 12: greptime.v1.meta.ResponseHeader - (*Peer)(nil), // 13: greptime.v1.meta.Peer + (*CreateRequest)(nil), // 0: greptime.v1.meta.CreateRequest + (*RouteRequest)(nil), // 1: greptime.v1.meta.RouteRequest + (*DeleteRequest)(nil), // 2: greptime.v1.meta.DeleteRequest + (*RouteResponse)(nil), // 3: greptime.v1.meta.RouteResponse + (*TableRoute)(nil), // 4: greptime.v1.meta.TableRoute + (*RegionRoute)(nil), // 5: greptime.v1.meta.RegionRoute + (*Table)(nil), // 6: greptime.v1.meta.Table + (*Region)(nil), // 7: greptime.v1.meta.Region + (*Partition)(nil), // 8: greptime.v1.meta.Partition + (*TableRouteValue)(nil), // 9: greptime.v1.meta.TableRouteValue + nil, // 10: greptime.v1.meta.Region.AttrsEntry + (*RequestHeader)(nil), // 11: greptime.v1.meta.RequestHeader + (*TableName)(nil), // 12: greptime.v1.meta.TableName + (*ResponseHeader)(nil), // 13: greptime.v1.meta.ResponseHeader + (*Peer)(nil), // 14: greptime.v1.meta.Peer } var file_greptime_v1_meta_route_proto_depIdxs = []int32{ - 10, // 0: greptime.v1.meta.RouteRequest.header:type_name -> greptime.v1.meta.RequestHeader - 11, // 1: greptime.v1.meta.RouteRequest.table_names:type_name -> greptime.v1.meta.TableName - 10, // 2: greptime.v1.meta.DeleteRequest.header:type_name -> greptime.v1.meta.RequestHeader - 11, // 3: greptime.v1.meta.DeleteRequest.table_name:type_name -> greptime.v1.meta.TableName - 12, // 4: greptime.v1.meta.RouteResponse.header:type_name -> greptime.v1.meta.ResponseHeader - 13, // 5: greptime.v1.meta.RouteResponse.peers:type_name -> greptime.v1.meta.Peer - 3, // 6: greptime.v1.meta.RouteResponse.table_routes:type_name -> greptime.v1.meta.TableRoute - 5, // 7: greptime.v1.meta.TableRoute.table:type_name -> greptime.v1.meta.Table - 4, // 8: greptime.v1.meta.TableRoute.region_routes:type_name -> greptime.v1.meta.RegionRoute - 6, // 9: greptime.v1.meta.RegionRoute.region:type_name -> greptime.v1.meta.Region - 11, // 10: greptime.v1.meta.Table.table_name:type_name -> greptime.v1.meta.TableName - 7, // 11: greptime.v1.meta.Region.partition:type_name -> greptime.v1.meta.Partition - 9, // 12: greptime.v1.meta.Region.attrs:type_name -> greptime.v1.meta.Region.AttrsEntry - 13, // 13: greptime.v1.meta.TableRouteValue.peers:type_name -> greptime.v1.meta.Peer - 3, // 14: greptime.v1.meta.TableRouteValue.table_route:type_name -> greptime.v1.meta.TableRoute - 0, // 15: greptime.v1.meta.Router.Route:input_type -> greptime.v1.meta.RouteRequest - 1, // 16: greptime.v1.meta.Router.Delete:input_type -> greptime.v1.meta.DeleteRequest - 2, // 17: greptime.v1.meta.Router.Route:output_type -> greptime.v1.meta.RouteResponse - 2, // 18: greptime.v1.meta.Router.Delete:output_type -> greptime.v1.meta.RouteResponse - 17, // [17:19] is the sub-list for method output_type - 15, // [15:17] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 11, // 0: greptime.v1.meta.CreateRequest.header:type_name -> greptime.v1.meta.RequestHeader + 12, // 1: greptime.v1.meta.CreateRequest.table_name:type_name -> greptime.v1.meta.TableName + 8, // 2: greptime.v1.meta.CreateRequest.partitions:type_name -> greptime.v1.meta.Partition + 11, // 3: greptime.v1.meta.RouteRequest.header:type_name -> greptime.v1.meta.RequestHeader + 12, // 4: greptime.v1.meta.RouteRequest.table_names:type_name -> greptime.v1.meta.TableName + 11, // 5: greptime.v1.meta.DeleteRequest.header:type_name -> greptime.v1.meta.RequestHeader + 12, // 6: greptime.v1.meta.DeleteRequest.table_name:type_name -> greptime.v1.meta.TableName + 13, // 7: greptime.v1.meta.RouteResponse.header:type_name -> greptime.v1.meta.ResponseHeader + 14, // 8: greptime.v1.meta.RouteResponse.peers:type_name -> greptime.v1.meta.Peer + 4, // 9: greptime.v1.meta.RouteResponse.table_routes:type_name -> greptime.v1.meta.TableRoute + 6, // 10: greptime.v1.meta.TableRoute.table:type_name -> greptime.v1.meta.Table + 5, // 11: greptime.v1.meta.TableRoute.region_routes:type_name -> greptime.v1.meta.RegionRoute + 7, // 12: greptime.v1.meta.RegionRoute.region:type_name -> greptime.v1.meta.Region + 12, // 13: greptime.v1.meta.Table.table_name:type_name -> greptime.v1.meta.TableName + 8, // 14: greptime.v1.meta.Region.partition:type_name -> greptime.v1.meta.Partition + 10, // 15: greptime.v1.meta.Region.attrs:type_name -> greptime.v1.meta.Region.AttrsEntry + 14, // 16: greptime.v1.meta.TableRouteValue.peers:type_name -> greptime.v1.meta.Peer + 4, // 17: greptime.v1.meta.TableRouteValue.table_route:type_name -> greptime.v1.meta.TableRoute + 0, // 18: greptime.v1.meta.Router.Create:input_type -> greptime.v1.meta.CreateRequest + 1, // 19: greptime.v1.meta.Router.Route:input_type -> greptime.v1.meta.RouteRequest + 2, // 20: greptime.v1.meta.Router.Delete:input_type -> greptime.v1.meta.DeleteRequest + 3, // 21: greptime.v1.meta.Router.Create:output_type -> greptime.v1.meta.RouteResponse + 3, // 22: greptime.v1.meta.Router.Route:output_type -> greptime.v1.meta.RouteResponse + 3, // 23: greptime.v1.meta.Router.Delete:output_type -> greptime.v1.meta.RouteResponse + 21, // [21:24] is the sub-list for method output_type + 18, // [18:21] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_greptime_v1_meta_route_proto_init() } @@ -744,7 +840,7 @@ func file_greptime_v1_meta_route_proto_init() { file_greptime_v1_meta_common_proto_init() if !protoimpl.UnsafeEnabled { file_greptime_v1_meta_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteRequest); i { + switch v := v.(*CreateRequest); i { case 0: return &v.state case 1: @@ -756,7 +852,7 @@ func file_greptime_v1_meta_route_proto_init() { } } file_greptime_v1_meta_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRequest); i { + switch v := v.(*RouteRequest); i { case 0: return &v.state case 1: @@ -768,7 +864,7 @@ func file_greptime_v1_meta_route_proto_init() { } } file_greptime_v1_meta_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteResponse); i { + switch v := v.(*DeleteRequest); i { case 0: return &v.state case 1: @@ -780,7 +876,7 @@ func file_greptime_v1_meta_route_proto_init() { } } file_greptime_v1_meta_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TableRoute); i { + switch v := v.(*RouteResponse); i { case 0: return &v.state case 1: @@ -792,7 +888,7 @@ func file_greptime_v1_meta_route_proto_init() { } } file_greptime_v1_meta_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegionRoute); i { + switch v := v.(*TableRoute); i { case 0: return &v.state case 1: @@ -804,7 +900,7 @@ func file_greptime_v1_meta_route_proto_init() { } } file_greptime_v1_meta_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Table); i { + switch v := v.(*RegionRoute); i { case 0: return &v.state case 1: @@ -816,7 +912,7 @@ func file_greptime_v1_meta_route_proto_init() { } } file_greptime_v1_meta_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Region); i { + switch v := v.(*Table); i { case 0: return &v.state case 1: @@ -828,7 +924,7 @@ func file_greptime_v1_meta_route_proto_init() { } } file_greptime_v1_meta_route_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Partition); i { + switch v := v.(*Region); i { case 0: return &v.state case 1: @@ -840,6 +936,18 @@ func file_greptime_v1_meta_route_proto_init() { } } file_greptime_v1_meta_route_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Partition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_greptime_v1_meta_route_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TableRouteValue); i { case 0: return &v.state @@ -858,7 +966,7 @@ func file_greptime_v1_meta_route_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_meta_route_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 11, NumExtensions: 0, NumServices: 1, }, diff --git a/go/greptime/v1/meta/route_grpc.pb.go b/go/greptime/v1/meta/route_grpc.pb.go index 4343252b..7d67a383 100644 --- a/go/greptime/v1/meta/route_grpc.pb.go +++ b/go/greptime/v1/meta/route_grpc.pb.go @@ -22,6 +22,7 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type RouterClient interface { + Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*RouteResponse, error) // Fetch routing information for tables. The smallest unit is the complete // routing information(all regions) of a table. // @@ -56,6 +57,15 @@ func NewRouterClient(cc grpc.ClientConnInterface) RouterClient { return &routerClient{cc} } +func (c *routerClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*RouteResponse, error) { + out := new(RouteResponse) + err := c.cc.Invoke(ctx, "/greptime.v1.meta.Router/Create", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *routerClient) Route(ctx context.Context, in *RouteRequest, opts ...grpc.CallOption) (*RouteResponse, error) { out := new(RouteResponse) err := c.cc.Invoke(ctx, "/greptime.v1.meta.Router/Route", in, out, opts...) @@ -78,6 +88,7 @@ func (c *routerClient) Delete(ctx context.Context, in *DeleteRequest, opts ...gr // All implementations must embed UnimplementedRouterServer // for forward compatibility type RouterServer interface { + Create(context.Context, *CreateRequest) (*RouteResponse, error) // Fetch routing information for tables. The smallest unit is the complete // routing information(all regions) of a table. // @@ -109,6 +120,9 @@ type RouterServer interface { type UnimplementedRouterServer struct { } +func (UnimplementedRouterServer) Create(context.Context, *CreateRequest) (*RouteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} func (UnimplementedRouterServer) Route(context.Context, *RouteRequest) (*RouteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Route not implemented") } @@ -128,6 +142,24 @@ func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer) { s.RegisterService(&Router_ServiceDesc, srv) } +func _Router_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouterServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greptime.v1.meta.Router/Create", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouterServer).Create(ctx, req.(*CreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Router_Route_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RouteRequest) if err := dec(in); err != nil { @@ -171,6 +203,10 @@ var Router_ServiceDesc = grpc.ServiceDesc{ ServiceName: "greptime.v1.meta.Router", HandlerType: (*RouterServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _Router_Create_Handler, + }, { MethodName: "Route", Handler: _Router_Route_Handler, diff --git a/java/src/main/java/io/greptime/v1/Ddl.java b/java/src/main/java/io/greptime/v1/Ddl.java index 1addfb60..4fa5e2ac 100644 --- a/java/src/main/java/io/greptime/v1/Ddl.java +++ b/java/src/main/java/io/greptime/v1/Ddl.java @@ -4456,6 +4456,21 @@ public interface AlterExprOrBuilder extends */ io.greptime.v1.Ddl.RenameTableOrBuilder getRenameTableOrBuilder(); + /** + * .greptime.v1.TableId table_id = 7; + * @return Whether the tableId field is set. + */ + boolean hasTableId(); + /** + * .greptime.v1.TableId table_id = 7; + * @return The tableId. + */ + io.greptime.v1.Ddl.TableId getTableId(); + /** + * .greptime.v1.TableId table_id = 7; + */ + io.greptime.v1.Ddl.TableIdOrBuilder getTableIdOrBuilder(); + public io.greptime.v1.Ddl.AlterExpr.KindCase getKindCase(); } /** @@ -4566,6 +4581,19 @@ private AlterExpr( kindCase_ = 6; break; } + case 58: { + io.greptime.v1.Ddl.TableId.Builder subBuilder = null; + if (tableId_ != null) { + subBuilder = tableId_.toBuilder(); + } + tableId_ = input.readMessage(io.greptime.v1.Ddl.TableId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tableId_); + tableId_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -4850,6 +4878,32 @@ public io.greptime.v1.Ddl.RenameTableOrBuilder getRenameTableOrBuilder() { return io.greptime.v1.Ddl.RenameTable.getDefaultInstance(); } + public static final int TABLE_ID_FIELD_NUMBER = 7; + private io.greptime.v1.Ddl.TableId tableId_; + /** + * .greptime.v1.TableId table_id = 7; + * @return Whether the tableId field is set. + */ + @java.lang.Override + public boolean hasTableId() { + return tableId_ != null; + } + /** + * .greptime.v1.TableId table_id = 7; + * @return The tableId. + */ + @java.lang.Override + public io.greptime.v1.Ddl.TableId getTableId() { + return tableId_ == null ? io.greptime.v1.Ddl.TableId.getDefaultInstance() : tableId_; + } + /** + * .greptime.v1.TableId table_id = 7; + */ + @java.lang.Override + public io.greptime.v1.Ddl.TableIdOrBuilder getTableIdOrBuilder() { + return getTableId(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -4882,6 +4936,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (kindCase_ == 6) { output.writeMessage(6, (io.greptime.v1.Ddl.RenameTable) kind_); } + if (tableId_ != null) { + output.writeMessage(7, getTableId()); + } unknownFields.writeTo(output); } @@ -4912,6 +4969,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, (io.greptime.v1.Ddl.RenameTable) kind_); } + if (tableId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getTableId()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -4933,6 +4994,11 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getSchemaName())) return false; if (!getTableName() .equals(other.getTableName())) return false; + if (hasTableId() != other.hasTableId()) return false; + if (hasTableId()) { + if (!getTableId() + .equals(other.getTableId())) return false; + } if (!getKindCase().equals(other.getKindCase())) return false; switch (kindCase_) { case 4: @@ -4967,6 +5033,10 @@ public int hashCode() { hash = (53 * hash) + getSchemaName().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); + if (hasTableId()) { + hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTableId().hashCode(); + } switch (kindCase_) { case 4: hash = (37 * hash) + ADD_COLUMNS_FIELD_NUMBER; @@ -5122,6 +5192,12 @@ public Builder clear() { tableName_ = ""; + if (tableIdBuilder_ == null) { + tableId_ = null; + } else { + tableId_ = null; + tableIdBuilder_ = null; + } kindCase_ = 0; kind_ = null; return this; @@ -5174,6 +5250,11 @@ public io.greptime.v1.Ddl.AlterExpr buildPartial() { result.kind_ = renameTableBuilder_.build(); } } + if (tableIdBuilder_ == null) { + result.tableId_ = tableId_; + } else { + result.tableId_ = tableIdBuilder_.build(); + } result.kindCase_ = kindCase_; onBuilt(); return result; @@ -5235,6 +5316,9 @@ public Builder mergeFrom(io.greptime.v1.Ddl.AlterExpr other) { tableName_ = other.tableName_; onChanged(); } + if (other.hasTableId()) { + mergeTableId(other.getTableId()); + } switch (other.getKindCase()) { case ADD_COLUMNS: { mergeAddColumns(other.getAddColumns()); @@ -5949,6 +6033,125 @@ public io.greptime.v1.Ddl.RenameTableOrBuilder getRenameTableOrBuilder() { onChanged();; return renameTableBuilder_; } + + private io.greptime.v1.Ddl.TableId tableId_; + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.TableId, io.greptime.v1.Ddl.TableId.Builder, io.greptime.v1.Ddl.TableIdOrBuilder> tableIdBuilder_; + /** + * .greptime.v1.TableId table_id = 7; + * @return Whether the tableId field is set. + */ + public boolean hasTableId() { + return tableIdBuilder_ != null || tableId_ != null; + } + /** + * .greptime.v1.TableId table_id = 7; + * @return The tableId. + */ + public io.greptime.v1.Ddl.TableId getTableId() { + if (tableIdBuilder_ == null) { + return tableId_ == null ? io.greptime.v1.Ddl.TableId.getDefaultInstance() : tableId_; + } else { + return tableIdBuilder_.getMessage(); + } + } + /** + * .greptime.v1.TableId table_id = 7; + */ + public Builder setTableId(io.greptime.v1.Ddl.TableId value) { + if (tableIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableId_ = value; + onChanged(); + } else { + tableIdBuilder_.setMessage(value); + } + + return this; + } + /** + * .greptime.v1.TableId table_id = 7; + */ + public Builder setTableId( + io.greptime.v1.Ddl.TableId.Builder builderForValue) { + if (tableIdBuilder_ == null) { + tableId_ = builderForValue.build(); + onChanged(); + } else { + tableIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .greptime.v1.TableId table_id = 7; + */ + public Builder mergeTableId(io.greptime.v1.Ddl.TableId value) { + if (tableIdBuilder_ == null) { + if (tableId_ != null) { + tableId_ = + io.greptime.v1.Ddl.TableId.newBuilder(tableId_).mergeFrom(value).buildPartial(); + } else { + tableId_ = value; + } + onChanged(); + } else { + tableIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .greptime.v1.TableId table_id = 7; + */ + public Builder clearTableId() { + if (tableIdBuilder_ == null) { + tableId_ = null; + onChanged(); + } else { + tableId_ = null; + tableIdBuilder_ = null; + } + + return this; + } + /** + * .greptime.v1.TableId table_id = 7; + */ + public io.greptime.v1.Ddl.TableId.Builder getTableIdBuilder() { + + onChanged(); + return getTableIdFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.TableId table_id = 7; + */ + public io.greptime.v1.Ddl.TableIdOrBuilder getTableIdOrBuilder() { + if (tableIdBuilder_ != null) { + return tableIdBuilder_.getMessageOrBuilder(); + } else { + return tableId_ == null ? + io.greptime.v1.Ddl.TableId.getDefaultInstance() : tableId_; + } + } + /** + * .greptime.v1.TableId table_id = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.TableId, io.greptime.v1.Ddl.TableId.Builder, io.greptime.v1.Ddl.TableIdOrBuilder> + getTableIdFieldBuilder() { + if (tableIdBuilder_ == null) { + tableIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.TableId, io.greptime.v1.Ddl.TableId.Builder, io.greptime.v1.Ddl.TableIdOrBuilder>( + getTableId(), + getParentForChildren(), + isClean()); + tableId_ = null; + } + return tableIdBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -6041,6 +6244,21 @@ public interface DropTableExprOrBuilder extends */ com.google.protobuf.ByteString getTableNameBytes(); + + /** + * .greptime.v1.TableId table_id = 4; + * @return Whether the tableId field is set. + */ + boolean hasTableId(); + /** + * .greptime.v1.TableId table_id = 4; + * @return The tableId. + */ + io.greptime.v1.Ddl.TableId getTableId(); + /** + * .greptime.v1.TableId table_id = 4; + */ + io.greptime.v1.Ddl.TableIdOrBuilder getTableIdOrBuilder(); } /** * Protobuf type {@code greptime.v1.DropTableExpr} @@ -6108,6 +6326,19 @@ private DropTableExpr( tableName_ = s; break; } + case 34: { + io.greptime.v1.Ddl.TableId.Builder subBuilder = null; + if (tableId_ != null) { + subBuilder = tableId_.toBuilder(); + } + tableId_ = input.readMessage(io.greptime.v1.Ddl.TableId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tableId_); + tableId_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -6256,6 +6487,32 @@ public java.lang.String getTableName() { } } + public static final int TABLE_ID_FIELD_NUMBER = 4; + private io.greptime.v1.Ddl.TableId tableId_; + /** + * .greptime.v1.TableId table_id = 4; + * @return Whether the tableId field is set. + */ + @java.lang.Override + public boolean hasTableId() { + return tableId_ != null; + } + /** + * .greptime.v1.TableId table_id = 4; + * @return The tableId. + */ + @java.lang.Override + public io.greptime.v1.Ddl.TableId getTableId() { + return tableId_ == null ? io.greptime.v1.Ddl.TableId.getDefaultInstance() : tableId_; + } + /** + * .greptime.v1.TableId table_id = 4; + */ + @java.lang.Override + public io.greptime.v1.Ddl.TableIdOrBuilder getTableIdOrBuilder() { + return getTableId(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -6279,6 +6536,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tableName_); } + if (tableId_ != null) { + output.writeMessage(4, getTableId()); + } unknownFields.writeTo(output); } @@ -6297,6 +6557,10 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tableName_); } + if (tableId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getTableId()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -6318,6 +6582,11 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getSchemaName())) return false; if (!getTableName() .equals(other.getTableName())) return false; + if (hasTableId() != other.hasTableId()) return false; + if (hasTableId()) { + if (!getTableId() + .equals(other.getTableId())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -6335,6 +6604,10 @@ public int hashCode() { hash = (53 * hash) + getSchemaName().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); + if (hasTableId()) { + hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTableId().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -6474,6 +6747,12 @@ public Builder clear() { tableName_ = ""; + if (tableIdBuilder_ == null) { + tableId_ = null; + } else { + tableId_ = null; + tableIdBuilder_ = null; + } return this; } @@ -6503,10 +6782,15 @@ public io.greptime.v1.Ddl.DropTableExpr buildPartial() { result.catalogName_ = catalogName_; result.schemaName_ = schemaName_; result.tableName_ = tableName_; - onBuilt(); - return result; - } - + if (tableIdBuilder_ == null) { + result.tableId_ = tableId_; + } else { + result.tableId_ = tableIdBuilder_.build(); + } + onBuilt(); + return result; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -6563,6 +6847,9 @@ public Builder mergeFrom(io.greptime.v1.Ddl.DropTableExpr other) { tableName_ = other.tableName_; onChanged(); } + if (other.hasTableId()) { + mergeTableId(other.getTableId()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -6819,6 +7106,125 @@ public Builder setTableNameBytes( onChanged(); return this; } + + private io.greptime.v1.Ddl.TableId tableId_; + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.TableId, io.greptime.v1.Ddl.TableId.Builder, io.greptime.v1.Ddl.TableIdOrBuilder> tableIdBuilder_; + /** + * .greptime.v1.TableId table_id = 4; + * @return Whether the tableId field is set. + */ + public boolean hasTableId() { + return tableIdBuilder_ != null || tableId_ != null; + } + /** + * .greptime.v1.TableId table_id = 4; + * @return The tableId. + */ + public io.greptime.v1.Ddl.TableId getTableId() { + if (tableIdBuilder_ == null) { + return tableId_ == null ? io.greptime.v1.Ddl.TableId.getDefaultInstance() : tableId_; + } else { + return tableIdBuilder_.getMessage(); + } + } + /** + * .greptime.v1.TableId table_id = 4; + */ + public Builder setTableId(io.greptime.v1.Ddl.TableId value) { + if (tableIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableId_ = value; + onChanged(); + } else { + tableIdBuilder_.setMessage(value); + } + + return this; + } + /** + * .greptime.v1.TableId table_id = 4; + */ + public Builder setTableId( + io.greptime.v1.Ddl.TableId.Builder builderForValue) { + if (tableIdBuilder_ == null) { + tableId_ = builderForValue.build(); + onChanged(); + } else { + tableIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .greptime.v1.TableId table_id = 4; + */ + public Builder mergeTableId(io.greptime.v1.Ddl.TableId value) { + if (tableIdBuilder_ == null) { + if (tableId_ != null) { + tableId_ = + io.greptime.v1.Ddl.TableId.newBuilder(tableId_).mergeFrom(value).buildPartial(); + } else { + tableId_ = value; + } + onChanged(); + } else { + tableIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .greptime.v1.TableId table_id = 4; + */ + public Builder clearTableId() { + if (tableIdBuilder_ == null) { + tableId_ = null; + onChanged(); + } else { + tableId_ = null; + tableIdBuilder_ = null; + } + + return this; + } + /** + * .greptime.v1.TableId table_id = 4; + */ + public io.greptime.v1.Ddl.TableId.Builder getTableIdBuilder() { + + onChanged(); + return getTableIdFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.TableId table_id = 4; + */ + public io.greptime.v1.Ddl.TableIdOrBuilder getTableIdOrBuilder() { + if (tableIdBuilder_ != null) { + return tableIdBuilder_.getMessageOrBuilder(); + } else { + return tableId_ == null ? + io.greptime.v1.Ddl.TableId.getDefaultInstance() : tableId_; + } + } + /** + * .greptime.v1.TableId table_id = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.TableId, io.greptime.v1.Ddl.TableId.Builder, io.greptime.v1.Ddl.TableIdOrBuilder> + getTableIdFieldBuilder() { + if (tableIdBuilder_ == null) { + tableIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.TableId, io.greptime.v1.Ddl.TableId.Builder, io.greptime.v1.Ddl.TableIdOrBuilder>( + getTableId(), + getParentForChildren(), + isClean()); + tableId_ = null; + } + return tableIdBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -6922,6 +7328,21 @@ public interface FlushTableExprOrBuilder extends * @return The regionNumber. */ int getRegionNumber(); + + /** + * .greptime.v1.TableId table_id = 5; + * @return Whether the tableId field is set. + */ + boolean hasTableId(); + /** + * .greptime.v1.TableId table_id = 5; + * @return The tableId. + */ + io.greptime.v1.Ddl.TableId getTableId(); + /** + * .greptime.v1.TableId table_id = 5; + */ + io.greptime.v1.Ddl.TableIdOrBuilder getTableIdOrBuilder(); } /** * Protobuf type {@code greptime.v1.FlushTableExpr} @@ -6995,6 +7416,19 @@ private FlushTableExpr( regionNumber_ = input.readUInt32(); break; } + case 42: { + io.greptime.v1.Ddl.TableId.Builder subBuilder = null; + if (tableId_ != null) { + subBuilder = tableId_.toBuilder(); + } + tableId_ = input.readMessage(io.greptime.v1.Ddl.TableId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tableId_); + tableId_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -7163,6 +7597,32 @@ public int getRegionNumber() { return regionNumber_; } + public static final int TABLE_ID_FIELD_NUMBER = 5; + private io.greptime.v1.Ddl.TableId tableId_; + /** + * .greptime.v1.TableId table_id = 5; + * @return Whether the tableId field is set. + */ + @java.lang.Override + public boolean hasTableId() { + return tableId_ != null; + } + /** + * .greptime.v1.TableId table_id = 5; + * @return The tableId. + */ + @java.lang.Override + public io.greptime.v1.Ddl.TableId getTableId() { + return tableId_ == null ? io.greptime.v1.Ddl.TableId.getDefaultInstance() : tableId_; + } + /** + * .greptime.v1.TableId table_id = 5; + */ + @java.lang.Override + public io.greptime.v1.Ddl.TableIdOrBuilder getTableIdOrBuilder() { + return getTableId(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -7189,6 +7649,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeUInt32(4, regionNumber_); } + if (tableId_ != null) { + output.writeMessage(5, getTableId()); + } unknownFields.writeTo(output); } @@ -7211,6 +7674,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, regionNumber_); } + if (tableId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getTableId()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -7237,6 +7704,11 @@ public boolean equals(final java.lang.Object obj) { if (getRegionNumber() != other.getRegionNumber()) return false; } + if (hasTableId() != other.hasTableId()) return false; + if (hasTableId()) { + if (!getTableId() + .equals(other.getTableId())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -7258,6 +7730,10 @@ public int hashCode() { hash = (37 * hash) + REGION_NUMBER_FIELD_NUMBER; hash = (53 * hash) + getRegionNumber(); } + if (hasTableId()) { + hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTableId().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -7399,6 +7875,12 @@ public Builder clear() { regionNumber_ = 0; bitField0_ = (bitField0_ & ~0x00000001); + if (tableIdBuilder_ == null) { + tableId_ = null; + } else { + tableId_ = null; + tableIdBuilder_ = null; + } return this; } @@ -7434,6 +7916,11 @@ public io.greptime.v1.Ddl.FlushTableExpr buildPartial() { result.regionNumber_ = regionNumber_; to_bitField0_ |= 0x00000001; } + if (tableIdBuilder_ == null) { + result.tableId_ = tableId_; + } else { + result.tableId_ = tableIdBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -7498,6 +7985,9 @@ public Builder mergeFrom(io.greptime.v1.Ddl.FlushTableExpr other) { if (other.hasRegionNumber()) { setRegionNumber(other.getRegionNumber()); } + if (other.hasTableId()) { + mergeTableId(other.getTableId()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -7794,6 +8284,125 @@ public Builder clearRegionNumber() { onChanged(); return this; } + + private io.greptime.v1.Ddl.TableId tableId_; + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.TableId, io.greptime.v1.Ddl.TableId.Builder, io.greptime.v1.Ddl.TableIdOrBuilder> tableIdBuilder_; + /** + * .greptime.v1.TableId table_id = 5; + * @return Whether the tableId field is set. + */ + public boolean hasTableId() { + return tableIdBuilder_ != null || tableId_ != null; + } + /** + * .greptime.v1.TableId table_id = 5; + * @return The tableId. + */ + public io.greptime.v1.Ddl.TableId getTableId() { + if (tableIdBuilder_ == null) { + return tableId_ == null ? io.greptime.v1.Ddl.TableId.getDefaultInstance() : tableId_; + } else { + return tableIdBuilder_.getMessage(); + } + } + /** + * .greptime.v1.TableId table_id = 5; + */ + public Builder setTableId(io.greptime.v1.Ddl.TableId value) { + if (tableIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableId_ = value; + onChanged(); + } else { + tableIdBuilder_.setMessage(value); + } + + return this; + } + /** + * .greptime.v1.TableId table_id = 5; + */ + public Builder setTableId( + io.greptime.v1.Ddl.TableId.Builder builderForValue) { + if (tableIdBuilder_ == null) { + tableId_ = builderForValue.build(); + onChanged(); + } else { + tableIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .greptime.v1.TableId table_id = 5; + */ + public Builder mergeTableId(io.greptime.v1.Ddl.TableId value) { + if (tableIdBuilder_ == null) { + if (tableId_ != null) { + tableId_ = + io.greptime.v1.Ddl.TableId.newBuilder(tableId_).mergeFrom(value).buildPartial(); + } else { + tableId_ = value; + } + onChanged(); + } else { + tableIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .greptime.v1.TableId table_id = 5; + */ + public Builder clearTableId() { + if (tableIdBuilder_ == null) { + tableId_ = null; + onChanged(); + } else { + tableId_ = null; + tableIdBuilder_ = null; + } + + return this; + } + /** + * .greptime.v1.TableId table_id = 5; + */ + public io.greptime.v1.Ddl.TableId.Builder getTableIdBuilder() { + + onChanged(); + return getTableIdFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.TableId table_id = 5; + */ + public io.greptime.v1.Ddl.TableIdOrBuilder getTableIdOrBuilder() { + if (tableIdBuilder_ != null) { + return tableIdBuilder_.getMessageOrBuilder(); + } else { + return tableId_ == null ? + io.greptime.v1.Ddl.TableId.getDefaultInstance() : tableId_; + } + } + /** + * .greptime.v1.TableId table_id = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.TableId, io.greptime.v1.Ddl.TableId.Builder, io.greptime.v1.Ddl.TableIdOrBuilder> + getTableIdFieldBuilder() { + if (tableIdBuilder_ == null) { + tableIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.TableId, io.greptime.v1.Ddl.TableId.Builder, io.greptime.v1.Ddl.TableIdOrBuilder>( + getTableId(), + getParentForChildren(), + isClean()); + tableId_ = null; + } + return tableIdBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -13524,34 +14133,37 @@ public io.greptime.v1.Ddl.TableId getDefaultInstanceForType() { "\n \001(\0132\024.greptime.v1.TableId\022\026\n\016region_nu" + "mbers\030\013 \003(\r\022\016\n\006engine\030\014 \001(\t\0323\n\021TableOpti" + "onsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + - "\"\346\001\n\tAlterExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013" + + "\"\216\002\n\tAlterExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013" + "schema_name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022.\n" + "\013add_columns\030\004 \001(\0132\027.greptime.v1.AddColu" + "mnsH\000\0220\n\014drop_columns\030\005 \001(\0132\030.greptime.v" + "1.DropColumnsH\000\0220\n\014rename_table\030\006 \001(\0132\030." + - "greptime.v1.RenameTableH\000B\006\n\004kind\"N\n\rDro" + + "greptime.v1.RenameTableH\000\022&\n\010table_id\030\007 " + + "\001(\0132\024.greptime.v1.TableIdB\006\n\004kind\"v\n\rDro" + "pTableExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013sche" + - "ma_name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\"}\n\016Flu" + - "shTableExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013sch" + - "ema_name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022\032\n\rre" + - "gion_number\030\004 \001(\rH\000\210\001\001B\020\n\016_region_number" + - "\"I\n\022CreateDatabaseExpr\022\025\n\rdatabase_name\030" + - "\001 \001(\t\022\034\n\024create_if_not_exists\030\002 \001(\010\"9\n\nA" + - "ddColumns\022+\n\013add_columns\030\001 \003(\0132\026.greptim" + - "e.v1.AddColumn\"<\n\013DropColumns\022-\n\014drop_co" + - "lumns\030\001 \003(\0132\027.greptime.v1.DropColumn\"%\n\013" + - "RenameTable\022\026\n\016new_table_name\030\001 \001(\t\"\215\002\n\t" + - "AddColumn\022*\n\ncolumn_def\030\001 \001(\0132\026.greptime" + - ".v1.ColumnDef\022\016\n\006is_key\030\002 \001(\010\0221\n\010locatio" + - "n\030\003 \001(\0132\037.greptime.v1.AddColumn.Location" + - "\032\220\001\n\010Location\022C\n\rlocation_type\030\001 \001(\0162,.g" + - "reptime.v1.AddColumn.Location.LocationTy" + - "pe\022\031\n\021after_cloumn_name\030\002 \001(\t\"$\n\014Locatio" + - "nType\022\t\n\005FIRST\020\000\022\t\n\005AFTER\020\001\"\032\n\nDropColum" + - "n\022\014\n\004name\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\rBL" + - "\n\016io.greptime.v1B\003DdlZ5github.com/Grepti" + - "meTeam/greptime-proto/go/greptime/v1b\006pr" + - "oto3" + "ma_name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022&\n\010tab" + + "le_id\030\004 \001(\0132\024.greptime.v1.TableId\"\245\001\n\016Fl" + + "ushTableExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013sc" + + "hema_name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022\032\n\rr" + + "egion_number\030\004 \001(\rH\000\210\001\001\022&\n\010table_id\030\005 \001(" + + "\0132\024.greptime.v1.TableIdB\020\n\016_region_numbe" + + "r\"I\n\022CreateDatabaseExpr\022\025\n\rdatabase_name" + + "\030\001 \001(\t\022\034\n\024create_if_not_exists\030\002 \001(\010\"9\n\n" + + "AddColumns\022+\n\013add_columns\030\001 \003(\0132\026.grepti" + + "me.v1.AddColumn\"<\n\013DropColumns\022-\n\014drop_c" + + "olumns\030\001 \003(\0132\027.greptime.v1.DropColumn\"%\n" + + "\013RenameTable\022\026\n\016new_table_name\030\001 \001(\t\"\215\002\n" + + "\tAddColumn\022*\n\ncolumn_def\030\001 \001(\0132\026.greptim" + + "e.v1.ColumnDef\022\016\n\006is_key\030\002 \001(\010\0221\n\010locati" + + "on\030\003 \001(\0132\037.greptime.v1.AddColumn.Locatio" + + "n\032\220\001\n\010Location\022C\n\rlocation_type\030\001 \001(\0162,." + + "greptime.v1.AddColumn.Location.LocationT" + + "ype\022\031\n\021after_cloumn_name\030\002 \001(\t\"$\n\014Locati" + + "onType\022\t\n\005FIRST\020\000\022\t\n\005AFTER\020\001\"\032\n\nDropColu" + + "mn\022\014\n\004name\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\rB" + + "L\n\016io.greptime.v1B\003DdlZ5github.com/Grept" + + "imeTeam/greptime-proto/go/greptime/v1b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -13581,19 +14193,19 @@ public io.greptime.v1.Ddl.TableId getDefaultInstanceForType() { internal_static_greptime_v1_AlterExpr_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_AlterExpr_descriptor, - new java.lang.String[] { "CatalogName", "SchemaName", "TableName", "AddColumns", "DropColumns", "RenameTable", "Kind", }); + new java.lang.String[] { "CatalogName", "SchemaName", "TableName", "AddColumns", "DropColumns", "RenameTable", "TableId", "Kind", }); internal_static_greptime_v1_DropTableExpr_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_greptime_v1_DropTableExpr_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_DropTableExpr_descriptor, - new java.lang.String[] { "CatalogName", "SchemaName", "TableName", }); + new java.lang.String[] { "CatalogName", "SchemaName", "TableName", "TableId", }); internal_static_greptime_v1_FlushTableExpr_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_greptime_v1_FlushTableExpr_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_FlushTableExpr_descriptor, - new java.lang.String[] { "CatalogName", "SchemaName", "TableName", "RegionNumber", "RegionNumber", }); + new java.lang.String[] { "CatalogName", "SchemaName", "TableName", "RegionNumber", "TableId", "RegionNumber", }); internal_static_greptime_v1_CreateDatabaseExpr_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_greptime_v1_CreateDatabaseExpr_fieldAccessorTable = new diff --git a/proto/greptime/v1/ddl.proto b/proto/greptime/v1/ddl.proto index 2b06370e..e3563a41 100644 --- a/proto/greptime/v1/ddl.proto +++ b/proto/greptime/v1/ddl.proto @@ -60,12 +60,14 @@ message AlterExpr { DropColumns drop_columns = 5; RenameTable rename_table = 6; } + TableId table_id = 7; } message DropTableExpr { string catalog_name = 1; string schema_name = 2; string table_name = 3; + TableId table_id = 4; } message FlushTableExpr { @@ -73,6 +75,7 @@ message FlushTableExpr { string schema_name = 2; string table_name = 3; optional uint32 region_number = 4; + TableId table_id = 5; } message CreateDatabaseExpr { diff --git a/proto/greptime/v1/meta/ddl.proto b/proto/greptime/v1/meta/ddl.proto index 8b6f8621..6f69499e 100644 --- a/proto/greptime/v1/meta/ddl.proto +++ b/proto/greptime/v1/meta/ddl.proto @@ -19,6 +19,9 @@ package greptime.v1.meta; option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; import "greptime/v1/meta/common.proto"; +import "greptime/v1/meta/route.proto"; +import "greptime/v1/ddl.proto"; + service DdlTask { // Submits a DDL task to meta. @@ -27,32 +30,31 @@ service DdlTask { enum DdlTaskType { Create = 0; + Drop = 1; } -message Task { - DdlTaskType type = 1; - - oneof payload { bytes pd = 2; } +message CreateTableTask { + CreateTableExpr create_table = 1; + repeated Partition partitions = 2; + bytes table_info = 3; } -message SubmitDdlTaskRequest { - RequestHeader header = 1; +message DropTableTask{ + DropTableExpr drop_table = 1; +} - // The following information plays a bigger role in making messages traceable - // and facilitating debugging. - string subject = 2; - string from = 3; - string to = 4; - // The unix timestamp in milliseconds. - int64 timestamp_millis = 5; - - Task task = 6; +message AlterTableTask{ + AlterExpr alter_table = 1; } -enum Status { - Done = 0; - Failed = 1; - Cancelled = 2; +message SubmitDdlTaskRequest { + RequestHeader header = 1; + + oneof task { + CreateTableTask create_table_task = 2; + DropTableTask drop_table_task = 3; + AlterTableTask alter_table_task = 4; + } } message SubmitDdlTaskResponse { @@ -60,5 +62,6 @@ message SubmitDdlTaskResponse { // Key is the identifier for the ddl task. bytes key = 2; - Status status = 3; + // Returns if table created. + TableId table_id = 4; } diff --git a/proto/greptime/v1/meta/route.proto b/proto/greptime/v1/meta/route.proto index 470610ac..9a54e914 100644 --- a/proto/greptime/v1/meta/route.proto +++ b/proto/greptime/v1/meta/route.proto @@ -21,6 +21,8 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta" import "greptime/v1/meta/common.proto"; service Router { + rpc Create(CreateRequest) returns (RouteResponse) {} + // Fetch routing information for tables. The smallest unit is the complete // routing information(all regions) of a table. // @@ -45,6 +47,14 @@ service Router { rpc Delete(DeleteRequest) returns (RouteResponse) {} } +message CreateRequest { + RequestHeader header = 1; + + TableName table_name = 2; + repeated Partition partitions = 3; + bytes table_info = 4; +} + message RouteRequest { RequestHeader header = 1; diff --git a/src/lib.rs b/src/lib.rs index bb7d66ce..4cf117e6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,6 +13,7 @@ // limitations under the License. mod serde; +#[allow(clippy::large_enum_variant)] pub mod v1; pub mod prometheus { diff --git a/src/v1/meta.rs b/src/v1/meta.rs index 0f487bed..7fca2128 100644 --- a/src/v1/meta.rs +++ b/src/v1/meta.rs @@ -156,6 +156,7 @@ macro_rules! gen_set_header { gen_set_header!(HeartbeatRequest); gen_set_header!(RouteRequest); +gen_set_header!(CreateRequest); gen_set_header!(RangeRequest); gen_set_header!(DeleteRequest); gen_set_header!(PutRequest);