forked from apache/hbase
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMasterProcedure.proto
More file actions
792 lines (680 loc) · 23 KB
/
Copy pathMasterProcedure.proto
File metadata and controls
792 lines (680 loc) · 23 KB
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
/**
* 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 hbase.pb;
option java_package = "org.apache.hadoop.hbase.shaded.protobuf.generated";
option java_outer_classname = "MasterProcedureProtos";
option java_generic_services = true;
option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "HBase.proto";
import "rpc/RPC.proto";
import "server/Snapshot.proto";
import "server/master/Replication.proto";
import "server/master/RegionServerStatus.proto";
// ============================================================================
// WARNING - Compatibility rules
// ============================================================================
// This .proto contains the data serialized by the master procedures.
// Each procedure has some state stored to know, which step were executed
// and what were the parameters or data created by the previous steps.
// new code should be able to handle the old format or at least fail cleanly
// triggering a rollback/cleanup.
//
// Procedures that are inheriting from a StateMachineProcedure have an enum:
// - Do not change the number of the 'State' enums.
// doing so, will cause executing the wrong 'step' on the pending
// procedures when they will be replayed.
// - Do not remove items from the enum, new code must be able to handle
// all the previous 'steps'. There may be pending procedure ready to be
// recovered replayed. alternative you can make sure that not-known state
// will result in a failure that will rollback the already executed steps.
// ============================================================================
enum CreateTableState {
CREATE_TABLE_PRE_OPERATION = 1;
CREATE_TABLE_WRITE_FS_LAYOUT = 2;
CREATE_TABLE_ADD_TO_META = 3;
CREATE_TABLE_ASSIGN_REGIONS = 4;
CREATE_TABLE_UPDATE_DESC_CACHE = 5;
CREATE_TABLE_POST_OPERATION = 6;
CREATE_TABLE_SET_ERASURE_CODING_POLICY = 7;
}
message CreateTableStateData {
required UserInformation user_info = 1;
required TableSchema table_schema = 2;
repeated RegionInfo region_info = 3;
}
enum ModifyTableState {
MODIFY_TABLE_PREPARE = 1;
MODIFY_TABLE_PRE_OPERATION = 2;
MODIFY_TABLE_UPDATE_TABLE_DESCRIPTOR = 3;
MODIFY_TABLE_REMOVE_REPLICA_COLUMN = 4;
MODIFY_TABLE_DELETE_FS_LAYOUT = 5;
MODIFY_TABLE_POST_OPERATION = 6;
MODIFY_TABLE_REOPEN_ALL_REGIONS = 7;
MODIFY_TABLE_CLOSE_EXCESS_REPLICAS = 8;
MODIFY_TABLE_ASSIGN_NEW_REPLICAS = 9;
MODIFY_TABLE_SYNC_ERASURE_CODING_POLICY = 10;
}
message ModifyTableStateData {
required UserInformation user_info = 1;
optional TableSchema unmodified_table_schema = 2;
required TableSchema modified_table_schema = 3;
required bool delete_column_family_in_modify = 4;
optional bool should_check_descriptor = 5;
optional bool reopen_regions = 6;
}
enum TruncateTableState {
TRUNCATE_TABLE_PRE_OPERATION = 1;
TRUNCATE_TABLE_REMOVE_FROM_META = 2;
TRUNCATE_TABLE_CLEAR_FS_LAYOUT = 3;
TRUNCATE_TABLE_CREATE_FS_LAYOUT = 4;
TRUNCATE_TABLE_ADD_TO_META = 5;
TRUNCATE_TABLE_ASSIGN_REGIONS = 6;
TRUNCATE_TABLE_POST_OPERATION = 7;
}
message TruncateTableStateData {
required UserInformation user_info = 1;
required bool preserve_splits = 2;
optional TableName table_name = 3;
optional TableSchema table_schema = 4;
repeated RegionInfo region_info = 5;
}
enum TruncateRegionState {
TRUNCATE_REGION_PRE_OPERATION = 1;
TRUNCATE_REGION_MAKE_OFFLINE = 2;
TRUNCATE_REGION_REMOVE = 3;
TRUNCATE_REGION_MAKE_ONLINE = 4;
TRUNCATE_REGION_POST_OPERATION = 5;
}
enum DeleteTableState {
DELETE_TABLE_PRE_OPERATION = 1;
DELETE_TABLE_REMOVE_FROM_META = 2;
DELETE_TABLE_CLEAR_FS_LAYOUT = 3;
DELETE_TABLE_UPDATE_DESC_CACHE = 4;
DELETE_TABLE_UNASSIGN_REGIONS = 5;
DELETE_TABLE_POST_OPERATION = 6;
}
message DeleteTableStateData {
required UserInformation user_info = 1;
required TableName table_name = 2;
repeated RegionInfo region_info = 3;
}
enum CreateNamespaceState {
CREATE_NAMESPACE_PREPARE = 1;
CREATE_NAMESPACE_CREATE_DIRECTORY = 2;
CREATE_NAMESPACE_INSERT_INTO_NS_TABLE = 3;
CREATE_NAMESPACE_UPDATE_ZK = 4[deprecated=true];
CREATE_NAMESPACE_SET_NAMESPACE_QUOTA = 5;
}
message CreateNamespaceStateData {
required NamespaceDescriptor namespace_descriptor = 1;
}
enum ModifyNamespaceState {
MODIFY_NAMESPACE_PREPARE = 1;
MODIFY_NAMESPACE_UPDATE_NS_TABLE = 2;
MODIFY_NAMESPACE_UPDATE_ZK = 3[deprecated=true];
}
message ModifyNamespaceStateData {
required NamespaceDescriptor namespace_descriptor = 1;
optional NamespaceDescriptor unmodified_namespace_descriptor = 2;
}
enum DeleteNamespaceState {
DELETE_NAMESPACE_PREPARE = 1;
DELETE_NAMESPACE_DELETE_FROM_NS_TABLE = 2;
DELETE_NAMESPACE_REMOVE_FROM_ZK = 3[deprecated=true];
DELETE_NAMESPACE_DELETE_DIRECTORIES = 4;
DELETE_NAMESPACE_REMOVE_NAMESPACE_QUOTA = 5;
}
message DeleteNamespaceStateData {
required string namespace_name = 1;
optional NamespaceDescriptor namespace_descriptor = 2;
}
enum EnableTableState {
ENABLE_TABLE_PREPARE = 1;
ENABLE_TABLE_PRE_OPERATION = 2;
ENABLE_TABLE_SET_ENABLING_TABLE_STATE = 3;
ENABLE_TABLE_MARK_REGIONS_ONLINE = 4;
ENABLE_TABLE_SET_ENABLED_TABLE_STATE = 5;
ENABLE_TABLE_POST_OPERATION = 6;
}
message EnableTableStateData {
required UserInformation user_info = 1;
required TableName table_name = 2;
// not used any more, always false
required bool skip_table_state_check = 3[deprecated=true];
}
enum DisableTableState {
DISABLE_TABLE_PREPARE = 1;
DISABLE_TABLE_PRE_OPERATION = 2;
DISABLE_TABLE_SET_DISABLING_TABLE_STATE = 3;
DISABLE_TABLE_MARK_REGIONS_OFFLINE = 4;
DISABLE_TABLE_SET_DISABLED_TABLE_STATE = 5;
DISABLE_TABLE_POST_OPERATION = 6;
DISABLE_TABLE_ADD_REPLICATION_BARRIER = 7;
}
message DisableTableStateData {
required UserInformation user_info = 1;
required TableName table_name = 2;
required bool skip_table_state_check = 3;
}
message RestoreParentToChildRegionsPair {
required string parent_region_name = 1;
required string child1_region_name = 2;
required string child2_region_name = 3;
}
enum FlushTableState {
FLUSH_TABLE_PREPARE = 1;
FLUSH_TABLE_FLUSH_REGIONS = 2;
}
message FlushTableProcedureStateData {
required TableName table_name = 1;
repeated bytes column_family = 2;
}
message FlushRegionProcedureStateData {
required RegionInfo region = 1;
repeated bytes column_family = 2;
}
message FlushRegionParameter {
required RegionInfo region = 1;
repeated bytes column_family = 2;
}
enum SnapshotState {
SNAPSHOT_PREPARE = 1;
SNAPSHOT_PRE_OPERATION = 2;
SNAPSHOT_WRITE_SNAPSHOT_INFO = 3;
SNAPSHOT_SNAPSHOT_ONLINE_REGIONS = 4;
SNAPSHOT_SNAPSHOT_SPLIT_REGIONS = 5;
SNAPSHOT_SNAPSHOT_CLOSED_REGIONS = 6;
SNAPSHOT_SNAPSHOT_MOB_REGION = 7;
SNAPSHOT_CONSOLIDATE_SNAPSHOT = 8;
SNAPSHOT_VERIFIER_SNAPSHOT = 9;
SNAPSHOT_COMPLETE_SNAPSHOT = 10;
SNAPSHOT_POST_OPERATION = 11;
}
message SnapshotProcedureStateData {
required SnapshotDescription snapshot = 1;
}
message SnapshotRegionProcedureStateData {
required RegionInfo region = 1;
required SnapshotDescription snapshot = 2;
}
message SnapshotRegionParameter {
required RegionInfo region = 1;
required SnapshotDescription snapshot = 2;
}
message SnapshotVerifyProcedureStateData {
required SnapshotDescription snapshot = 1;
required RegionInfo region = 2;
optional ServerName target_server = 3;
}
message SnapshotVerifyParameter {
required SnapshotDescription snapshot = 1;
required RegionInfo region = 2;
}
enum CloneSnapshotState {
CLONE_SNAPSHOT_PRE_OPERATION = 1;
CLONE_SNAPSHOT_WRITE_FS_LAYOUT = 2;
CLONE_SNAPSHOT_ADD_TO_META = 3;
CLONE_SNAPSHOT_ASSIGN_REGIONS = 4;
CLONE_SNAPSHOT_UPDATE_DESC_CACHE = 5;
CLONE_SNAPSHOT_POST_OPERATION = 6;
CLONE_SNAPHOST_RESTORE_ACL = 7;
CLONE_SNAPSHOT_SET_ERASURE_CODING_POLICY = 8;
}
message CloneSnapshotStateData {
required UserInformation user_info = 1;
required SnapshotDescription snapshot = 2;
required TableSchema table_schema = 3;
repeated RegionInfo region_info = 4;
repeated RestoreParentToChildRegionsPair parent_to_child_regions_pair_list = 5;
optional bool restore_acl = 6;
optional string customSFT = 7;
}
enum RestoreSnapshotState {
RESTORE_SNAPSHOT_PRE_OPERATION = 1;
RESTORE_SNAPSHOT_UPDATE_TABLE_DESCRIPTOR = 2;
RESTORE_SNAPSHOT_WRITE_FS_LAYOUT = 3;
RESTORE_SNAPSHOT_UPDATE_META = 4;
RESTORE_SNAPSHOT_RESTORE_ACL = 5;
RESTORE_SNAPSHOT_SYNC_ERASURE_CODING_POLICY = 6;
}
message RestoreSnapshotStateData {
required UserInformation user_info = 1;
required SnapshotDescription snapshot = 2;
required TableSchema modified_table_schema = 3;
repeated RegionInfo region_info_for_restore = 4;
repeated RegionInfo region_info_for_remove = 5;
repeated RegionInfo region_info_for_add = 6;
repeated RestoreParentToChildRegionsPair parent_to_child_regions_pair_list = 7;
optional bool restore_acl = 8;
required TableSchema old_table_schema = 9;
}
enum DispatchMergingRegionsState {
DISPATCH_MERGING_REGIONS_PREPARE = 1;
DISPATCH_MERGING_REGIONS_PRE_OPERATION = 2;
DISPATCH_MERGING_REGIONS_MOVE_REGION_TO_SAME_RS = 3;
DISPATCH_MERGING_REGIONS_DO_MERGE_IN_RS = 4;
DISPATCH_MERGING_REGIONS_POST_OPERATION = 5;
}
message DispatchMergingRegionsStateData {
required UserInformation user_info = 1;
required TableName table_name = 2;
repeated RegionInfo region_info = 3;
optional bool forcible = 4;
}
enum SplitTableRegionState {
SPLIT_TABLE_REGION_PREPARE = 1;
SPLIT_TABLE_REGION_PRE_OPERATION = 2;
SPLIT_TABLE_REGION_CLOSE_PARENT_REGION = 3;
SPLIT_TABLE_REGION_CREATE_DAUGHTER_REGIONS = 4;
SPLIT_TABLE_REGION_WRITE_MAX_SEQUENCE_ID_FILE = 5;
SPLIT_TABLE_REGION_PRE_OPERATION_BEFORE_META = 6;
SPLIT_TABLE_REGION_UPDATE_META = 7;
SPLIT_TABLE_REGION_PRE_OPERATION_AFTER_META = 8;
SPLIT_TABLE_REGION_OPEN_CHILD_REGIONS = 9;
SPLIT_TABLE_REGION_POST_OPERATION = 10;
SPLIT_TABLE_REGIONS_CHECK_CLOSED_REGIONS = 11;
}
message SplitTableRegionStateData {
required UserInformation user_info = 1;
required RegionInfo parent_region_info = 2;
repeated RegionInfo child_region_info = 3;
}
enum MergeTableRegionsState {
MERGE_TABLE_REGIONS_PREPARE = 1;
MERGE_TABLE_REGIONS_PRE_OPERATION = 2;
MERGE_TABLE_REGIONS_PRE_MERGE_OPERATION = 3;
MERGE_TABLE_REGIONS_CLOSE_REGIONS = 4;
MERGE_TABLE_REGIONS_CREATE_MERGED_REGION = 5;
MERGE_TABLE_REGIONS_WRITE_MAX_SEQUENCE_ID_FILE = 6;
MERGE_TABLE_REGIONS_PRE_MERGE_COMMIT_OPERATION = 7;
MERGE_TABLE_REGIONS_UPDATE_META = 8;
MERGE_TABLE_REGIONS_POST_MERGE_COMMIT_OPERATION = 9;
MERGE_TABLE_REGIONS_OPEN_MERGED_REGION = 10;
MERGE_TABLE_REGIONS_POST_OPERATION = 11;
MERGE_TABLE_REGIONS_CHECK_CLOSED_REGIONS = 12;
}
message MergeTableRegionsStateData {
required UserInformation user_info = 1;
repeated RegionInfo region_info = 2;
optional RegionInfo merged_region_info = 3;
optional bool forcible = 4 [default = false];
}
message ServerCrashStateData {
required ServerName server_name = 1;
// optional bool DEPRECATED_distributed_log_replay = 2;
repeated RegionInfo regions_on_crashed_server = 3;
repeated RegionInfo regions_assigned = 4;
optional bool carrying_meta = 5;
optional bool should_split_wal = 6 [default = true];
}
message RecoverMetaStateData {
optional ServerName failed_meta_server = 1;
optional bool should_split_wal = 2 [default = true];
optional int32 replica_id = 3 [default = 0];
}
enum ServerCrashState {
SERVER_CRASH_START = 1;
SERVER_CRASH_PROCESS_META = 2[deprecated=true];
SERVER_CRASH_GET_REGIONS = 3;
SERVER_CRASH_NO_SPLIT_LOGS = 4[deprecated=true];
SERVER_CRASH_SPLIT_LOGS = 5;
// Removed SERVER_CRASH_PREPARE_LOG_REPLAY = 6;
// Removed SERVER_CRASH_CALC_REGIONS_TO_ASSIGN = 7;
SERVER_CRASH_ASSIGN = 8;
SERVER_CRASH_WAIT_ON_ASSIGN = 9;
SERVER_CRASH_SPLIT_META_LOGS = 10;
SERVER_CRASH_ASSIGN_META = 11;
SERVER_CRASH_DELETE_SPLIT_META_WALS_DIR = 12;
SERVER_CRASH_DELETE_SPLIT_WALS_DIR = 13;
SERVER_CRASH_CLAIM_REPLICATION_QUEUES = 14;
SERVER_CRASH_HANDLE_RIT2 = 20[deprecated=true];
SERVER_CRASH_FINISH = 100;
}
enum RecoverMetaState {
RECOVER_META_PREPARE = 0;
RECOVER_META_SPLIT_LOGS = 1;
RECOVER_META_ASSIGN_REGIONS = 2;
}
enum RegionTransitionState {
REGION_TRANSITION_QUEUE = 1;
REGION_TRANSITION_DISPATCH = 2;
REGION_TRANSITION_FINISH = 3;
}
message AssignRegionStateData {
required RegionTransitionState transition_state = 1;
required RegionInfo region_info = 2;
optional bool force_new_plan = 3 [default = false];
optional ServerName target_server = 4;
// Current attempt index used for expotential backoff when stuck
optional int32 attempt = 5;
}
message UnassignRegionStateData {
required RegionTransitionState transition_state = 1;
required RegionInfo region_info = 2;
// This is optional info; it is the servername we will
// subsequently assign the region too... it may be null.
optional ServerName destination_server = 3;
// This is the server currently hosting the Region, the
// server we will send the unassign rpc too.
optional ServerName hosting_server = 5;
// This parameter is ignored
optional bool force = 4 [default = false];
optional bool remove_after_unassigning = 6 [default = false];
// Current attempt index used for expotential backoff when stuck
optional int32 attempt = 7;
}
enum MoveRegionState {
MOVE_REGION_PREPARE = 0;
MOVE_REGION_UNASSIGN = 1;
MOVE_REGION_ASSIGN = 2;
}
message MoveRegionStateData {
optional RegionInfo region_info = 1;
required ServerName source_server = 2;
// if destination server not specified, its selected with load balancer
optional ServerName destination_server = 3;
}
enum GCRegionState {
GC_REGION_PREPARE = 1;
GC_REGION_ARCHIVE = 2;
GC_REGION_PURGE_METADATA = 3;
}
message GCRegionStateData {
required RegionInfo region_info = 1;
}
// NOTE: This message is used by GCMergedRegionStateProcedure
// AND GCMultipleMergedRegionStateProcedure.
enum GCMergedRegionsState {
GC_MERGED_REGIONS_PREPARE = 1;
GC_MERGED_REGIONS_PURGE = 2;
GC_REGION_EDIT_METADATA = 3;
}
message GCMergedRegionsStateData {
// Use GCMultipleMergedRegionsStateData instead.
option deprecated = true;
required RegionInfo parent_a = 1;
required RegionInfo parent_b = 2;
required RegionInfo merged_child = 3;
}
message GCMultipleMergedRegionsStateData {
repeated RegionInfo parents = 1;
required RegionInfo merged_child = 2;
}
enum PeerModificationState {
PRE_PEER_MODIFICATION = 1;
UPDATE_PEER_STORAGE = 2;
REFRESH_PEER_ON_RS = 3;
SERIAL_PEER_REOPEN_REGIONS = 4;
SERIAL_PEER_UPDATE_LAST_PUSHED_SEQ_ID = 5;
SERIAL_PEER_SET_PEER_ENABLED = 6;
SERIAL_PEER_ENABLE_PEER_REFRESH_PEER_ON_RS = 7;
POST_PEER_MODIFICATION = 8;
}
enum PeerSyncReplicationStateTransitionState {
PRE_PEER_SYNC_REPLICATION_STATE_TRANSITION = 1;
SET_PEER_NEW_SYNC_REPLICATION_STATE = 2;
REFRESH_PEER_SYNC_REPLICATION_STATE_ON_RS_BEGIN = 3;
REOPEN_ALL_REGIONS_IN_PEER = 4;
SYNC_REPLICATION_UPDATE_LAST_PUSHED_SEQ_ID_FOR_SERIAL_PEER = 5;
REPLAY_REMOTE_WAL_IN_PEER = 6;
REMOVE_ALL_REPLICATION_QUEUES_IN_PEER = 7;
TRANSIT_PEER_NEW_SYNC_REPLICATION_STATE = 8;
REFRESH_PEER_SYNC_REPLICATION_STATE_ON_RS_END = 9;
SYNC_REPLICATION_SET_PEER_ENABLED = 10;
SYNC_REPLICATION_ENABLE_PEER_REFRESH_PEER_ON_RS = 11;
CREATE_DIR_FOR_REMOTE_WAL = 12;
POST_PEER_SYNC_REPLICATION_STATE_TRANSITION = 13;
}
message PeerModificationStateData {
required string peer_id = 1;
}
enum PeerModificationType {
ADD_PEER = 1;
REMOVE_PEER = 2;
ENABLE_PEER = 3;
DISABLE_PEER = 4;
UPDATE_PEER_CONFIG = 5;
TRANSIT_SYNC_REPLICATION_STATE = 6;
}
message RefreshPeerStateData {
required string peer_id = 1;
required PeerModificationType type = 2;
required ServerName target_server = 3;
/** We need multiple stages for sync replication state transition **/
optional uint32 stage = 4 [default = 0];
}
message RefreshPeerParameter {
required string peer_id = 1;
required PeerModificationType type = 2;
required ServerName target_server = 3;
/** We need multiple stages for sync replication state transition **/
optional uint32 stage = 4 [default = 0];;
}
message PeerProcedureStateData {
required string peer_id = 1;
}
message AddPeerStateData {
required ReplicationPeer peer_config = 1;
required bool enabled = 2;
}
message UpdatePeerConfigStateData {
required ReplicationPeer peer_config = 1;
optional ReplicationPeer old_peer_config = 2;
required bool enabled = 3;
}
message RemovePeerStateData {
optional ReplicationPeer peer_config = 1;
repeated int64 ongoing_assign_replication_queues_proc_ids = 2;
}
message EnablePeerStateData {
}
message DisablePeerStateData {
}
enum ReopenTableRegionsState {
REOPEN_TABLE_REGIONS_GET_REGIONS = 1;
REOPEN_TABLE_REGIONS_REOPEN_REGIONS = 2;
REOPEN_TABLE_REGIONS_CONFIRM_REOPENED = 3;
}
message ReopenTableRegionsStateData {
required TableName table_name = 1;
repeated RegionLocation region = 2;
repeated bytes region_names = 3;
}
enum InitMetaState {
INIT_META_WRITE_FS_LAYOUT = 1;
INIT_META_ASSIGN_META = 2;
INIT_META_CREATE_NAMESPACES = 3;
}
message InitMetaStateData {
}
message TransitPeerSyncReplicationStateStateData {
/** Could be null if we fail in pre check, so optional */
optional SyncReplicationState fromState = 1;
required SyncReplicationState toState = 2;
}
enum RecoverStandbyState {
RENAME_SYNC_REPLICATION_WALS_DIR = 1;
REGISTER_PEER_TO_WORKER_STORAGE = 2;
DISPATCH_WALS = 3;
UNREGISTER_PEER_FROM_WORKER_STORAGE = 4;
SNAPSHOT_SYNC_REPLICATION_WALS_DIR = 5;
}
enum SyncReplicationReplayWALState {
ASSIGN_WORKER = 1;
DISPATCH_WALS_TO_WORKER = 2;
RELEASE_WORKER = 3;
}
message RecoverStandbyStateData {
required bool serial = 1;
}
message SyncReplicationReplayWALStateData {
required string peer_id = 1;
repeated string wal = 2;
optional ServerName worker = 3;
}
message SyncReplicationReplayWALRemoteStateData {
required string peer_id = 1;
repeated string wal = 2;
required ServerName target_server = 3;
}
message ReplaySyncReplicationWALParameter {
required string peer_id = 1;
repeated string wal = 2;
}
enum RegionStateTransitionState {
REGION_STATE_TRANSITION_GET_ASSIGN_CANDIDATE = 1;
REGION_STATE_TRANSITION_OPEN = 2;
REGION_STATE_TRANSITION_CONFIRM_OPENED = 3;
REGION_STATE_TRANSITION_CLOSE = 4;
REGION_STATE_TRANSITION_CONFIRM_CLOSED = 5;
}
enum RegionTransitionType {
ASSIGN = 1;
UNASSIGN = 2;
MOVE = 3;
REOPEN = 4;
}
message RegionStateTransitionStateData {
required RegionTransitionType type = 1;
optional ServerName assign_candidate = 2;
required bool force_new_plan = 3;
optional bool is_split = 4 [default = false];
optional bool evict_cache = 5 [default = false];
}
enum RegionRemoteProcedureBaseState {
REGION_REMOTE_PROCEDURE_DISPATCH = 1;
REGION_REMOTE_PROCEDURE_REPORT_SUCCEED = 2;
REGION_REMOTE_PROCEDURE_DISPATCH_FAIL = 3;
REGION_REMOTE_PROCEDURE_SERVER_CRASH = 4;
}
message RegionRemoteProcedureBaseStateData {
required RegionInfo region = 1;
required ServerName target_server = 2;
// state is actually 'required' but we can't set it as 'required' here else it breaks old
// Messages; see HBASE-22074.
optional RegionRemoteProcedureBaseState state = 3;
optional RegionStateTransition.TransitionCode transition_code = 4;
optional int64 seq_id = 5;
}
message OpenRegionProcedureStateData {
}
message CloseRegionProcedureStateData {
optional ServerName assign_candidate = 1;
optional bool evict_cache = 2 [default = false];
}
enum SwitchRpcThrottleState {
UPDATE_SWITCH_RPC_THROTTLE_STORAGE = 1;
SWITCH_RPC_THROTTLE_ON_RS = 2;
POST_SWITCH_RPC_THROTTLE = 3;
}
message SwitchRpcThrottleStateData {
required bool rpc_throttle_enabled = 1;
}
message SwitchRpcThrottleRemoteStateData {
required ServerName target_server = 1;
required bool rpc_throttle_enabled = 2;
}
message SplitWALParameter {
required string wal_path = 1;
}
message SplitWALData{
required string wal_path = 1;
required ServerName crashed_server=2;
optional ServerName worker = 3;
}
message SplitWALRemoteData{
required string wal_path = 1;
required ServerName crashed_server=2;
required ServerName worker = 3;
}
enum SplitWALState{
ACQUIRE_SPLIT_WAL_WORKER = 1;
DISPATCH_WAL_TO_WORKER = 2;
RELEASE_SPLIT_WORKER = 3;
}
message ClaimReplicationQueuesStateData {
required ServerName crashed_server = 1;
}
message ClaimReplicationQueueRemoteStateData {
required ServerName crashed_server = 1;
required string queue = 2;
required ServerName target_server = 3;
optional ServerName source_server = 4;
}
message ClaimReplicationQueueRemoteParameter {
required ServerName crashed_server = 1;
required string queue = 2;
optional ServerName source_server = 3;
}
enum ModifyTableDescriptorState {
MODIFY_TABLE_DESCRIPTOR_PREPARE = 1;
MODIFY_TABLE_DESCRIPTOR_UPDATE = 2;
}
message ModifyTableDescriptorStateData {
required TableName table_name = 1;
optional TableSchema modified_table_schema = 2;
}
enum ModifyStoreFileTrackerState {
MODIFY_STORE_FILE_TRACKER_FINISH_PREVIOUS_MIGRATION = 1;
MODIFY_STORE_FILE_TRACKER_START_MIGRATION = 2;
MODIFY_STORE_FILE_TRACKER_FINISH_MIGRATION = 3;
}
message ModifyStoreFileTrackerStateData {
required TableName table_name = 1;
required string dst_sft = 2;
}
message ModifyColumnFamilyStoreFileTrackerStateData {
required bytes family = 1;
}
enum AssignReplicationQueuesState {
ASSIGN_REPLICATION_QUEUES_ADD_MISSING_QUEUES = 1;
ASSIGN_REPLICATION_QUEUES_CLAIM = 2;
ASSIGN_REPLICATION_QUEUES_REMOVE_QUEUES = 3;
}
message AssignReplicationQueuesStateData {
required ServerName crashed_server = 1;
}
enum MigrateReplicationQueueFromZkToTableState {
MIGRATE_REPLICATION_QUEUE_FROM_ZK_TO_TABLE_DISABLE_CLEANER = 1;
MIGRATE_REPLICATION_QUEUE_FROM_ZK_TO_TABLE_PREPARE = 2;
MIGRATE_REPLICATION_QUEUE_FROM_ZK_TO_TABLE_DISABLE_PEER = 3;
MIGRATE_REPLICATION_QUEUE_FROM_ZK_TO_TABLE_MIGRATE = 4;
MIGRATE_REPLICATION_QUEUE_FROM_ZK_TO_TABLE_WAIT_UPGRADING = 5;
MIGRATE_REPLICATION_QUEUE_FROM_ZK_TO_TABLE_ENABLE_PEER = 6;
MIGRATE_REPLICATION_QUEUE_FROM_ZK_TO_TABLE_ENABLE_CLEANER = 7;
}
message MigrateReplicationQueueFromZkToTableStateData {
repeated string disabled_peer_id = 1;
}
enum MigrateNamespaceTableProcedureState {
MIGRATE_NAMESPACE_TABLE_ADD_FAMILY = 1;
MIGRATE_NAMESPACE_TABLE_MIGRATE_DATA = 2;
MIGRATE_NAMESPACE_TABLE_DISABLE_TABLE = 3;
}
message MigrateNamespaceTableProcedureStateData {
}
enum CloseExcessRegionReplicasProcedureState {
CLOSE_EXCESS_REGION_REPLICAS_SCHEDULE = 1;
CLOSE_EXCESS_REGION_REPLICAS_CONFIRM = 2;
}
message CloseExcessRegionReplicasProcedureStateData {
required TableName table_name = 1;
required uint32 new_replica_count = 2;
}