forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloud.proto
1605 lines (1400 loc) · 47.5 KB
/
cloud.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
syntax="proto2";
package doris.cloud;
option java_package = "org.apache.doris.cloud.proto";
import "olap_file.proto";
option cc_generic_services = true;
//==============================================================================
// Resources
//==============================================================================
message EncryptionInfoPB {
optional string encryption_method = 1;
optional int64 key_id = 2;
}
message EncryptionKeyInfoPB {
message KMSInfo {
optional string endpoint = 1;
optional string region = 2;
optional string cmk = 3;
}
message Item {
optional int64 key_id = 1;
optional string key = 2;
optional KMSInfo kms_info = 3;
}
repeated Item items = 1;
}
message RamUserPB {
optional string user_id = 1;
optional string ak = 2;
optional string sk = 3;
optional string external_id = 4;
optional EncryptionInfoPB encryption_info = 6;
}
message InstanceInfoPB {
enum Status {
NORMAL = 0;
DELETED = 1;
OVERDUE = 2;
}
optional string user_id = 1;
optional string instance_id = 2;
optional string name = 3;
repeated string lb_ip = 4;
optional int64 ctime = 5;
optional int64 mtime = 6;
repeated ClusterPB clusters = 7;
repeated ObjectStoreInfoPB obj_info = 8; // Only legacy obj info would be store in this fields, other objs would be lied in vaults.
repeated StagePB stages = 9;
optional Status status = 10;
optional RamUserPB ram_user = 11;
optional RamUserPB iam_user = 12;
optional bool sse_enabled = 13;
repeated string resource_ids = 100;
repeated string storage_vault_names = 101;
optional string default_storage_vault_id = 102;
optional string default_storage_vault_name = 103;
optional bool enable_storage_vault = 104;
}
message StagePB {
enum StageType {
INTERNAL = 0;
EXTERNAL = 1;
}
optional StageType type = 1;
// mysql user name and id only used for internal stage
repeated string mysql_user_name = 2;
// external stage name
optional string name = 3;
optional ObjectStoreInfoPB obj_info = 6;
optional string stage_id = 7;
// file and copy properties
map<string, string> properties = 8;
repeated string mysql_user_id = 9;
optional string comment = 10;
optional int64 create_time = 11;
enum StageAccessType {
UNKNOWN = 0;
AKSK = 1;
IAM = 2;
BUCKET_ACL = 3;
}
optional StageAccessType access_type = 12 [default = AKSK];
// used when access_type is IAM
// In OBS, role name is agency name, arn is domain name.
optional string role_name = 13;
optional string arn = 14;
// only used for aws
optional string external_id = 15;
}
enum ClusterStatus {
UNKNOWN = 0;
NORMAL = 1;
SUSPENDED = 2;
TO_RESUME = 3;
MANUAL_SHUTDOWN = 4;
}
message ClusterPB {
enum Type {
SQL = 0;
COMPUTE = 1;
}
optional string cluster_id = 1;
optional string cluster_name = 2;
optional Type type = 3;
optional string desc = 4;
repeated NodeInfoPB nodes = 5;
repeated string mysql_user_name = 6;
optional string public_endpoint = 7;
optional string private_endpoint = 8;
optional ClusterStatus cluster_status = 9;
}
message NodeInfoPB {
enum NodeType {
UNKNOWN = 0;
// lagacy logic for one-master-multi-observer mode
FE_MASTER = 1;
FE_OBSERVER = 2;
FE_FOLLOWER = 3;
}
optional string cloud_unique_id = 1;
optional string name = 2;
optional string ip = 3;
optional string vpc_name = 4;
optional int64 ctime = 5;
optional int64 mtime = 6;
optional NodeStatusPB status = 7;
// There may be other ports, just add new fields in need
optional int32 heartbeat_port = 8;
optional string desc = 9;
optional int32 edit_log_port = 10;
optional NodeType node_type = 11;
optional bool is_smooth_upgrade = 12;
// fqdn
optional string host = 13;
}
enum NodeStatusPB {
NODE_STATUS_UNKNOWN = 0;
NODE_STATUS_RUNNING = 1;
NODE_STATUS_SHUTDOWN = 2;
NODE_STATUS_DECOMMISSIONING = 3;
NODE_STATUS_DECOMMISSIONED = 4;
}
message ObjectStoreInfoPB {
// presigned url use
// oss,aws,cos,obs,bos
enum Provider {
UNKONWN = -1;
OSS = 0;
S3 = 1;
COS = 2;
OBS = 3;
BOS = 4;
GCP = 5;
AZURE = 6;
}
optional int64 ctime = 1;
optional int64 mtime = 2;
optional string id = 3;
optional string ak = 4;
optional string sk = 5;
optional string bucket = 6;
optional string prefix = 7;
optional string endpoint = 8;
optional string region = 9;
optional Provider provider = 10;
optional string external_endpoint = 11;
optional string user_id = 13;
optional EncryptionInfoPB encryption_info = 14;
optional bool sse_enabled = 15;
optional bool use_path_style = 16;
}
// The legacy ObjectStoreInfoPB is stored in InstanceInfoPB
message StorageVaultPB {
optional string id = 1;
optional string name = 2;
optional HdfsVaultInfo hdfs_info = 3; // HdfsResource
optional ObjectStoreInfoPB obj_info = 4;
message PathFormat {
optional int64 path_version = 1;
optional int64 shard_num = 2;
}
optional PathFormat path_format = 5;
// Set this filed when the user tries to alter name to alter_name
optional string alter_name = 6;
}
message HdfsBuildConf {
message HdfsConfKVPair {
required string key = 1;
required string value = 2;
}
optional string fs_name = 1; // name_node
optional string user = 2;
optional string hdfs_kerberos_principal = 3;
optional string hdfs_kerberos_keytab = 4;
repeated HdfsConfKVPair hdfs_confs = 5;
}
message HdfsVaultInfo {
optional HdfsBuildConf build_conf = 1;
optional string prefix = 2;
}
//==============================================================================
// Transaction persistence
//==============================================================================
// Wire format for UniqueId
message UniqueIdPB {
optional int64 hi = 1;
optional int64 lo = 2;
}
// ATTN: keep the values the same as
// org.apache.doris.transaction.TransactionState.TxnSourceType
enum TxnSourceTypePB {
UKNOWN_TXN_SOURCE_TYPE = 0;
TXN_SOURCE_TYPE_FE = 1;
TXN_SOURCE_TYPE_BE = 2;
}
// ATTN: keep the same values as
// org.apache.doris.transaction.TransactionState.LoadJobSourceType
enum LoadJobSourceTypePB {
LOAD_JOB_SRC_TYPE_UNKNOWN = 0;
LOAD_JOB_SRC_TYPE_FRONTEND = 1;
LOAD_JOB_SRC_TYPE_BACKEND_STREAMING = 2; // streaming load use this type
LOAD_JOB_SRC_TYPE_INSERT_STREAMING = 3; // insert stmt (streaming type), update stmt use this type
LOAD_JOB_SRC_TYPE_ROUTINE_LOAD_TASK = 4; // routine load task use this type
LOAD_JOB_SRC_TYPE_BATCH_LOAD_JOB = 5; // load job v2 for broker load
}
enum TxnStatusPB {
TXN_STATUS_UNKNOWN = 0;
TXN_STATUS_PREPARED = 1;
TXN_STATUS_COMMITTED = 2;
TXN_STATUS_VISIBLE = 3;
TXN_STATUS_ABORTED = 4;
TXN_STATUS_PRECOMMITTED = 5;
}
message TxnCoordinatorPB {
optional TxnSourceTypePB sourceType = 1;
optional string ip = 2;
optional int64 id = 3;
optional int64 start_time = 4;
}
message RoutineLoadProgressPB {
map<int32, int64> partition_to_offset = 1;
optional RoutineLoadJobStatisticPB stat = 2;
}
message RLTaskTxnCommitAttachmentPB {
optional int64 job_id = 1;
optional UniqueIdPB task_id = 2;
optional int64 filtered_rows = 3;
optional int64 loaded_rows = 4;
optional int64 unselected_rows = 5;
optional int64 received_bytes = 6;
optional int64 task_execution_time_ms = 7;
optional RoutineLoadProgressPB progress = 8;
optional string error_log_url = 9;
}
message RoutineLoadJobStatisticPB {
optional int64 filtered_rows = 1;
optional int64 loaded_rows = 2;
optional int64 unselected_rows = 3;
optional int64 received_bytes = 4;
optional int64 task_execution_time_ms = 5;
}
message TxnCommitAttachmentPB {
enum Type {
LODD_JOB_FINAL_OPERATION = 0;
RT_TASK_TXN_COMMIT_ATTACHMENT = 1;
}
message LoadJobFinalOperationPB {
message EtlStatusPB {
enum EtlStatePB {
RUNNING = 0;
FINISHED = 1;
CANCELLED = 2;
UNKNOWN = 3;
}
optional EtlStatePB state = 1;
optional string tracking_url = 2;
map<string, string> stats = 3;
map<string, string> counters = 4;
}
enum JobStatePB {
UNKNOWN = 0;
PENDING = 1;
ETL = 2;
LOADING = 3;
COMMITTED = 4;
FINISHED = 5;
CANCELLED = 6;
}
message FailMsgPB {
enum CancelTypePB {
USER_CANCEL = 0;
ETL_SUBMIT_FAIL = 1;
ETL_RUN_FAIL = 2;
ETL_QUALITY_UNSATISFIED = 3;
LOAD_RUN_FAIL = 4;
TIMEOUT = 5;
UNKNOWN = 6;
TXN_UNKNOWN =7;
}
optional CancelTypePB cancel_type = 1;
optional string msg = 2;
}
optional int64 id = 1;
optional EtlStatusPB loading_status = 2;
optional int32 progress = 3;
optional int64 load_start_timestamp = 4;
optional int64 finish_timestamp = 5;
optional JobStatePB job_state = 6;
optional FailMsgPB fail_msg = 7;
optional string copy_id = 8;
optional string load_file_paths = 9;
}
optional Type type = 1;
optional LoadJobFinalOperationPB load_job_final_operation = 2;
optional RLTaskTxnCommitAttachmentPB rl_task_txn_commit_attachment = 3;
}
// For storing label -> txn_ids
message TxnLabelPB {
repeated int64 txn_ids = 1;
}
// txn_id -> db_id
message TxnIndexPB {
optional TabletIndexPB tablet_index = 1;
}
message TxnInfoPB {
optional int64 db_id = 1;
repeated int64 table_ids = 2;
optional int64 txn_id = 3;
optional string label = 4;
optional UniqueIdPB request_id = 5;
optional TxnCoordinatorPB coordinator = 6;
optional LoadJobSourceTypePB load_job_source_type = 7;
optional int64 timeout_ms = 8;
optional int64 precommit_timeout_ms = 9;
optional int64 prepare_time = 10;
optional int64 precommit_time = 11;
optional int64 commit_time = 12;
optional int64 finish_time = 13;
optional string reason = 14;
optional TxnStatusPB status = 15;
optional TxnCommitAttachmentPB commit_attachment = 16;
optional int64 listener_id = 17; //callback id
// for transaction load, used for recycler
repeated int64 sub_txn_ids = 18;
// TODO: There are more fields TBD
}
// For check txn conflict and txn timeout
message TxnRunningPB {
repeated int64 table_ids = 1;
//milliseconds
optional int64 timeout_time = 2;
}
message VersionPB {
optional int64 version = 1;
optional int64 update_time_ms = 2;
// now only allow one element
repeated int64 pending_txn_ids = 3;
}
message RecycleTxnPB {
optional int64 creation_time = 1;
optional string label = 2;
optional bool immediate = 3; //recycle immediately
}
message RecycleIndexPB {
enum State {
UNKNOWN = 0;
PREPARED = 1;
DROPPED = 2;
RECYCLING = 3;
}
optional int64 table_id = 1;
optional int64 creation_time = 2;
optional int64 expiration = 3; // expiration timestamp
optional State state = 4;
}
message RecyclePartitionPB {
enum State {
UNKNOWN = 0;
PREPARED = 1;
DROPPED = 2;
RECYCLING = 3;
}
optional int64 table_id = 1;
repeated int64 index_id = 2;
optional int64 creation_time = 3;
optional int64 expiration = 4; // expiration timestamp
optional State state = 5;
optional int64 db_id = 6; // For version recycling
}
message RecycleRowsetPB {
enum Type {
UNKNOWN = 0;
PREPARE = 1;
COMPACT = 2;
DROP = 3;
}
optional int64 tablet_id = 1; // deprecated
optional string resource_id = 2; // deprecated
optional int64 creation_time = 3;
optional int64 expiration = 4; // expiration timestamp
optional Type type = 5;
optional doris.RowsetMetaCloudPB rowset_meta = 6;
}
message RecycleStagePB {
optional string instance_id = 1;
optional string reason = 2;
optional StagePB stage = 3;
}
message JobRecyclePB {
enum Status {
IDLE = 0;
BUSY = 1;
}
optional string instance_id = 1;
optional string ip_port = 2;
optional int64 last_ctime_ms = 3;
optional int64 expiration_time_ms = 4;
optional int64 last_finish_time_ms = 5;
optional Status status = 6;
optional int64 last_success_time_ms = 7;
}
message TabletIndexPB {
optional int64 db_id = 1;
optional int64 table_id = 2;
optional int64 index_id = 3;
optional int64 partition_id = 4;
optional int64 tablet_id = 5;
}
message TabletMetaInfoPB { // For update tablet meta
optional int64 tablet_id = 1;
optional bool is_in_memory = 2; // deprecated
optional bool is_persistent = 3; // deprecated
optional int64 ttl_seconds = 4;
optional int64 group_commit_interval_ms = 5;
optional int64 group_commit_data_bytes = 6;
optional string compaction_policy = 7;
optional int64 time_series_compaction_goal_size_mbytes = 8;
optional int64 time_series_compaction_file_count_threshold = 9;
optional int64 time_series_compaction_time_threshold_seconds = 10;
optional int64 time_series_compaction_empty_rowsets_threshold = 11;
optional int64 time_series_compaction_level_threshold = 12;
optional bool disable_auto_compaction = 13;
optional bool enable_mow_light_delete = 14;
}
message TabletCompactionJobPB {
enum CompactionType {
UNKOWN = 0;
BASE = 1;
CUMULATIVE = 2;
EMPTY_CUMULATIVE = 3; // just update cumulative point
FULL = 4;
}
// IP and port of the node which initiates this job
optional string initiator = 1; // prepare
optional int64 ctime = 2;
optional int64 mtime = 3;
optional CompactionType type = 4; // prepare
optional int64 input_cumulative_point = 5;
optional int64 output_cumulative_point = 6;
optional int64 num_input_rowsets = 7;
optional int64 num_input_segments = 8;
optional int64 num_output_rowsets = 9;
optional int64 num_output_segments = 10;
optional int64 size_input_rowsets = 11;
optional int64 size_output_rowsets = 12;
optional int64 num_input_rows = 13;
optional int64 num_output_rows = 14;
repeated int64 input_versions = 15;
repeated int64 output_versions = 16;
repeated string output_rowset_ids = 17;
repeated int64 txn_id = 18;
optional int64 base_compaction_cnt = 19; // prepare
optional int64 cumulative_compaction_cnt = 20; // prepare
optional string id = 21; // prepare
// Expiration time, unix timestamp, -1 for no expiration
optional int64 expiration = 22; // prepare
// Lease time, unix timestamp
optional int64 lease = 23; // prepare
optional int64 delete_bitmap_lock_initiator = 24;
optional int64 full_compaction_cnt = 25; // prepare
optional bool check_input_versions_range = 26;
}
message TabletSchemaChangeJobPB {
// IP and port of the node which initiates this job
optional string initiator = 1; // prepare
optional string id = 2; // prepare
// Expiration time, unix timestamp, -1 for no expiration
optional int64 expiration = 3; // prepare
optional TabletIndexPB new_tablet_idx = 4; // prepare
repeated int64 txn_ids = 5;
optional int64 alter_version = 6;
optional int64 num_output_rowsets = 7;
optional int64 num_output_segments = 8;
optional int64 size_output_rowsets = 9;
optional int64 num_output_rows = 10;
repeated int64 output_versions = 11;
optional int64 output_cumulative_point = 12;
optional bool is_inverted_index_change = 13 [default = false];
optional int64 delete_bitmap_lock_initiator = 14;
}
message TabletJobInfoPB {
optional TabletIndexPB idx = 1;
repeated TabletCompactionJobPB compaction = 4;
optional TabletSchemaChangeJobPB schema_change = 5;
}
//==============================================================================
// Stats
//==============================================================================
message TabletStatsPB {
optional TabletIndexPB idx = 1;
optional int64 data_size = 2;
optional int64 num_rows = 3;
optional int64 num_rowsets = 4;
optional int64 num_segments = 5;
reserved 6;
optional int64 base_compaction_cnt = 7;
optional int64 cumulative_compaction_cnt = 8;
optional int64 cumulative_point = 9;
optional int64 last_base_compaction_time_ms = 10;
optional int64 last_cumu_compaction_time_ms = 11;
optional int64 full_compaction_cnt = 12;
optional int64 last_full_compaction_time_ms = 13;
}
message ObjectFilePB {
optional string relative_path = 1;
optional string etag = 2;
optional int64 size = 3;
}
message CopyJobPB {
enum JobStatus {
UNKNOWN = 0;
LOADING = 1;
FINISH = 2;
}
optional StagePB.StageType stage_type = 1;
repeated ObjectFilePB object_files = 2;
optional JobStatus job_status = 3;
optional int64 start_time_ms = 4;
optional int64 timeout_time_ms = 5;
optional int64 finish_time_ms = 6;
}
message CopyFilePB {
optional string copy_id = 1;
optional int32 group_id = 2;
}
message ServiceRegistryPB {
message Item {
optional string id = 1;
optional string ip = 2;
optional int32 port = 3;
optional int64 ctime_ms = 4;
optional int64 mtime_ms = 5;
optional int64 expiration_time_ms = 6;
// Support FQDN
optional string host = 7;
}
repeated Item items = 1;
}
//==============================================================================
// Rpc structures
//==============================================================================
message BeginTxnRequest {
optional string cloud_unique_id = 1; // For auth
optional TxnInfoPB txn_info = 2;
}
message BeginTxnResponse {
optional MetaServiceResponseStatus status = 1;
optional int64 txn_id = 2;
optional int64 dup_txn_id = 3;
optional TxnStatusPB txn_status = 4;
// TODO: There may be more fields TBD
}
message PrecommitTxnRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 db_id = 2;
optional int64 txn_id = 3;
optional TxnCommitAttachmentPB commit_attachment = 4;
optional int64 precommit_timeout_ms = 5;
}
message PrecommitTxnResponse {
optional MetaServiceResponseStatus status = 1;
optional int64 txn_id = 2;
// TODO: There may be more fields TBD
}
message CommitTxnRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 db_id = 2;
optional int64 txn_id = 3;
optional bool is_2pc = 4;
optional TxnCommitAttachmentPB commit_attachment = 5;
// merge-on-write table ids
repeated int64 mow_table_ids = 6;
repeated int64 base_tablet_ids= 7; // all tablet from base tables (excluding mv)
// for transaction load
optional bool is_txn_load = 9;
repeated SubTxnInfo sub_txn_infos = 10;
optional bool enable_txn_lazy_commit = 11;
}
message SubTxnInfo {
optional int64 sub_txn_id = 1;
optional int64 table_id = 2;
repeated int64 base_tablet_ids= 3;
}
// corresponding to TabletStats in meta_service.h and FrontendServiceImpl.java
// make sure update all of them when adding new fields
message TableStatsPB {
optional int64 table_id = 1;
optional int64 updated_row_count = 2;
}
message CommitTxnResponse {
optional MetaServiceResponseStatus status = 1;
optional TxnInfoPB txn_info = 2;
// <tablet_id, partition_id> --> version
repeated int64 table_ids = 3;
repeated int64 partition_ids = 4;
repeated int64 versions = 5;
repeated TableStatsPB table_stats = 6;
optional int64 version_update_time_ms = 7;
}
message AbortTxnRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 db_id = 2;
optional int64 txn_id = 3;
optional string label = 4;
optional string reason = 5;
optional TxnCommitAttachmentPB commit_attachment = 6;
}
message AbortTxnResponse {
optional MetaServiceResponseStatus status = 1;
optional TxnInfoPB txn_info = 2;
}
message GetTxnRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 db_id = 2;
optional int64 txn_id = 3;
optional string label = 4;
}
message GetTxnResponse {
optional MetaServiceResponseStatus status = 1;
optional TxnInfoPB txn_info = 2;
}
message GetTxnIdRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 db_id = 2;
optional string label = 3;
repeated TxnStatusPB txn_status = 4;
}
message GetTxnIdResponse {
optional MetaServiceResponseStatus status = 1;
optional int64 txn_id = 2;
}
message BeginSubTxnRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 txn_id = 2;
// all successful or failed sub txn except the first one
optional int64 sub_txn_num = 3;
optional int64 db_id = 4;
// set table_ids in txn_info
repeated int64 table_ids = 5;
// a random label used to generate a sub_txn_id
optional string label = 6;
}
message BeginSubTxnResponse {
optional MetaServiceResponseStatus status = 1;
optional int64 sub_txn_id = 2;
optional TxnInfoPB txn_info = 3;
}
message AbortSubTxnRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 txn_id = 2;
// used for log
optional int64 sub_txn_id = 3;
// all successful or failed sub txn except the first one
optional int64 sub_txn_num = 4;
optional int64 db_id = 5;
// set table_ids in txn_info
repeated int64 table_ids = 6;
}
message AbortSubTxnResponse {
optional MetaServiceResponseStatus status = 1;
optional TxnInfoPB txn_info = 2;
}
message GetCurrentMaxTxnRequest {
optional string cloud_unique_id = 1; // For auth
}
message GetCurrentMaxTxnResponse {
optional MetaServiceResponseStatus status = 1;
optional int64 current_max_txn_id = 2;
}
message AbortTxnWithCoordinatorRequest {
optional string cloud_unique_id = 1; // For auth
optional string ip = 2;
optional int64 id = 3;
optional int64 start_time = 4;
}
message AbortTxnWithCoordinatorResponse {
optional MetaServiceResponseStatus status = 1;
}
message CheckTxnConflictRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 db_id = 2;
optional int64 end_txn_id = 3;
repeated int64 table_ids = 4;
optional bool ignore_timeout_txn = 5;
}
message CheckTxnConflictResponse {
optional MetaServiceResponseStatus status = 1;
optional bool finished = 2;
repeated TxnInfoPB conflict_txns = 3;
}
message CleanTxnLabelRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 db_id = 2;
repeated string labels = 3;
}
message CleanTxnLabelResponse {
optional MetaServiceResponseStatus status = 1;
}
message GetVersionRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 db_id = 2;
optional int64 table_id = 3;
optional int64 partition_id = 4;
// For batch get version.
optional bool batch_mode = 5;
repeated int64 db_ids = 6;
repeated int64 table_ids = 7;
repeated int64 partition_ids = 8;
// True if get table version
optional bool is_table_version = 9;
};
message GetVersionResponse {
optional MetaServiceResponseStatus status = 1;
optional int64 version = 2;
// For batch get version.
// <db_id, table_id, partition_id> --> version
repeated int64 db_ids = 3;
repeated int64 table_ids = 4;
repeated int64 partition_ids = 5;
repeated int64 versions = 6;
repeated int64 version_update_time_ms = 7;
};
message GetObjStoreInfoRequest {
optional string cloud_unique_id = 1; // For auth
};
message AlterObjStoreInfoRequest {
enum Operation {
UNKNOWN = 0;
UPDATE_AK_SK = 1;
ADD_OBJ_INFO = 2;
LEGACY_UPDATE_AK_SK = 3;
ADD_HDFS_INFO = 100;
DROP_HDFS_INFO = 101;
ADD_BUILT_IN_VAULT = 102;
ADD_S3_VAULT = 103;
DROP_S3_VAULT = 104;
ALTER_S3_VAULT = 105;
ALTER_HDFS_VAULT = 106;
SET_DEFAULT_VAULT = 200;
UNSET_DEFAULT_VAULT = 201;
}
optional string cloud_unique_id = 1; // For auth
optional ObjectStoreInfoPB obj = 2;
optional Operation op = 3;
optional StorageVaultPB vault = 4;
optional bool set_as_default_storage_vault = 5;
}
message AlterObjStoreInfoResponse {
optional MetaServiceResponseStatus status = 1;
optional string storage_vault_id = 2;
optional bool default_storage_vault_replaced = 3;
}
message UpdateAkSkRequest {
optional string instance_id = 1;
repeated RamUserPB internal_bucket_user = 2;
optional RamUserPB ram_user = 3;
}
message UpdateAkSkResponse {
optional MetaServiceResponseStatus status = 1;
}
message GetObjStoreInfoResponse {
optional MetaServiceResponseStatus status = 1;
repeated ObjectStoreInfoPB obj_info = 2;
repeated StorageVaultPB storage_vault = 3;
optional string default_storage_vault_id = 4;
optional string default_storage_vault_name = 5;
optional bool enable_storage_vault = 6;
};
message CreateTabletsRequest {
optional string cloud_unique_id = 1; // For auth
repeated doris.TabletMetaCloudPB tablet_metas = 2;
optional string storage_vault_name = 3;
optional int64 db_id = 4;
}
message CreateTabletsResponse {
optional MetaServiceResponseStatus status = 1;
optional string storage_vault_id = 2;
optional string storage_vault_name = 3;
}
message UpdateTabletRequest {
optional string cloud_unique_id = 1; // For auth
repeated TabletMetaInfoPB tablet_meta_infos = 2;
}
message UpdateTabletResponse {
optional MetaServiceResponseStatus status = 1;
}
message UpdateTabletSchemaRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 tablet_id = 2;
optional doris.TabletSchemaCloudPB tablet_schema = 3;
}
message UpdateTabletSchemaResponse {
optional MetaServiceResponseStatus status = 1;
}
message DropTabletRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 tablet_id = 2;
// TODO: There are more fields TBD
}
message GetTabletRequest {
optional string cloud_unique_id = 1; // For auth
optional int64 tablet_id = 2;
// TODO: There are more fields TBD
}
message GetTabletResponse {
optional MetaServiceResponseStatus status = 1;
optional doris.TabletMetaCloudPB tablet_meta = 2;
}
message CreateRowsetRequest {
optional string cloud_unique_id = 1; // For auth
optional doris.RowsetMetaCloudPB rowset_meta = 2;
optional bool temporary = 3;
optional int64 txn_id = 4;
}
message CreateRowsetResponse {
optional MetaServiceResponseStatus status = 1;
optional doris.RowsetMetaCloudPB existed_rowset_meta = 2;
}
message GetRowsetRequest {
enum SchemaOp {
FILL_WITH_DICT = 0; // fill rowset schema with SchemaCloudDictionary value
RETURN_DICT = 1; // not use dict value in MS, return SchemaCloudDictionary directly
NO_DICT = 2; // not read dict info, use local cached SchemaCloudDictionary instead
}
optional string cloud_unique_id = 1; // For auth
optional TabletIndexPB idx = 2;
optional int64 start_version = 3;
optional int64 end_version = 4;
optional int64 base_compaction_cnt = 5;
optional int64 cumulative_compaction_cnt = 6;
optional int64 cumulative_point = 7;
// returned schema format on rowset schema, used in variant type directly.
// for compability reason we use FILL_WITH_DICT as default
optional SchemaOp schema_op = 8 [default = FILL_WITH_DICT];
}
message GetRowsetResponse {
optional MetaServiceResponseStatus status = 1;
repeated doris.RowsetMetaCloudPB rowset_meta = 2;
optional TabletStatsPB stats = 3;
// Return dict value if SchemaOp is RETURN_DICT
optional SchemaCloudDictionary schema_dict = 4;
}
message IndexRequest {
optional string cloud_unique_id = 1; // For auth
repeated int64 index_ids = 2;
optional int64 table_id = 3;
optional int64 expiration = 4;
optional int64 db_id = 5;
optional bool is_new_table = 6; // For table version
}
message IndexResponse {
optional MetaServiceResponseStatus status = 1;