2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 // All to do with the Master. Includes schema management since these
21 // changes are run by the Master process.
24 option java_package = "org.apache.hadoop.hbase.shaded.protobuf.generated";
25 option java_outer_classname = "MasterProtos";
26 option java_generic_services = true;
27 option java_generate_equals_and_hash = true;
28 option optimize_for = SPEED;
31 import "Client.proto";
32 import "ClusterStatus.proto";
33 import "ErrorHandling.proto";
34 import "LockService.proto";
35 import "Procedure.proto";
37 import "Replication.proto";
38 import "Snapshot.proto";
39 import "AccessControl.proto";
41 /* Column-level protobufs */
43 message AddColumnRequest {
44 required TableName table_name = 1;
45 required ColumnFamilySchema column_families = 2;
46 optional uint64 nonce_group = 3 [default = 0];
47 optional uint64 nonce = 4 [default = 0];
50 message AddColumnResponse {
51 optional uint64 proc_id = 1;
54 message DeleteColumnRequest {
55 required TableName table_name = 1;
56 required bytes column_name = 2;
57 optional uint64 nonce_group = 3 [default = 0];
58 optional uint64 nonce = 4 [default = 0];
61 message DeleteColumnResponse {
62 optional uint64 proc_id = 1;
65 message ModifyColumnRequest {
66 required TableName table_name = 1;
67 required ColumnFamilySchema column_families = 2;
68 optional uint64 nonce_group = 3 [default = 0];
69 optional uint64 nonce = 4 [default = 0];
72 message ModifyColumnResponse {
73 optional uint64 proc_id = 1;
76 /* Region-level Protos */
78 message MoveRegionRequest {
79 required RegionSpecifier region = 1;
80 optional ServerName dest_server_name = 2;
83 message MoveRegionResponse {
88 * Merging the specified regions in a table.
90 message MergeTableRegionsRequest {
91 repeated RegionSpecifier region = 1;
92 optional bool forcible = 3 [default = false];
93 optional uint64 nonce_group = 4 [default = 0];
94 optional uint64 nonce = 5 [default = 0];
97 message MergeTableRegionsResponse {
98 optional uint64 proc_id = 1;
101 message AssignRegionRequest {
102 required RegionSpecifier region = 1;
103 optional bool override = 2 [default = false];
106 message AssignRegionResponse {
109 message UnassignRegionRequest {
110 required RegionSpecifier region = 1;
111 optional bool force = 2 [default = false];
114 message UnassignRegionResponse {
117 message OfflineRegionRequest {
118 required RegionSpecifier region = 1;
121 message OfflineRegionResponse {
124 /* Table-level protobufs */
126 message SplitTableRegionRequest {
127 required RegionInfo region_info = 1;
128 optional bytes split_row = 2;
129 optional uint64 nonce_group = 3 [default = 0];
130 optional uint64 nonce = 4 [default = 0];
133 message SplitTableRegionResponse {
134 optional uint64 proc_id = 1;
137 message CreateTableRequest {
138 required TableSchema table_schema = 1;
139 repeated bytes split_keys = 2;
140 optional uint64 nonce_group = 3 [default = 0];
141 optional uint64 nonce = 4 [default = 0];
144 message CreateTableResponse {
145 optional uint64 proc_id = 1;
148 message DeleteTableRequest {
149 required TableName table_name = 1;
150 optional uint64 nonce_group = 2 [default = 0];
151 optional uint64 nonce = 3 [default = 0];
154 message DeleteTableResponse {
155 optional uint64 proc_id = 1;
158 message TruncateTableRequest {
159 required TableName tableName = 1;
160 optional bool preserveSplits = 2 [default = false];
161 optional uint64 nonce_group = 3 [default = 0];
162 optional uint64 nonce = 4 [default = 0];
165 message TruncateTableResponse {
166 optional uint64 proc_id = 1;
169 message EnableTableRequest {
170 required TableName table_name = 1;
171 optional uint64 nonce_group = 2 [default = 0];
172 optional uint64 nonce = 3 [default = 0];
175 message EnableTableResponse {
176 optional uint64 proc_id = 1;
179 message DisableTableRequest {
180 required TableName table_name = 1;
181 optional uint64 nonce_group = 2 [default = 0];
182 optional uint64 nonce = 3 [default = 0];
185 message DisableTableResponse {
186 optional uint64 proc_id = 1;
189 message ModifyTableRequest {
190 required TableName table_name = 1;
191 required TableSchema table_schema = 2;
192 optional uint64 nonce_group = 3 [default = 0];
193 optional uint64 nonce = 4 [default = 0];
196 message ModifyTableResponse {
197 optional uint64 proc_id = 1;
200 /* Namespace-level protobufs */
202 message CreateNamespaceRequest {
203 required NamespaceDescriptor namespaceDescriptor = 1;
204 optional uint64 nonce_group = 2 [default = 0];
205 optional uint64 nonce = 3 [default = 0];
208 message CreateNamespaceResponse {
209 optional uint64 proc_id = 1;
212 message DeleteNamespaceRequest {
213 required string namespaceName = 1;
214 optional uint64 nonce_group = 2 [default = 0];
215 optional uint64 nonce = 3 [default = 0];
218 message DeleteNamespaceResponse {
219 optional uint64 proc_id = 1;
222 message ModifyNamespaceRequest {
223 required NamespaceDescriptor namespaceDescriptor = 1;
224 optional uint64 nonce_group = 2 [default = 0];
225 optional uint64 nonce = 3 [default = 0];
228 message ModifyNamespaceResponse {
229 optional uint64 proc_id = 1;
232 message GetNamespaceDescriptorRequest {
233 required string namespaceName = 1;
236 message GetNamespaceDescriptorResponse {
237 required NamespaceDescriptor namespaceDescriptor = 1;
240 message ListNamespacesRequest {
243 message ListNamespacesResponse {
244 repeated string namespaceName = 1;
247 message ListNamespaceDescriptorsRequest {
250 message ListNamespaceDescriptorsResponse {
251 repeated NamespaceDescriptor namespaceDescriptor = 1;
254 message ListTableDescriptorsByNamespaceRequest {
255 required string namespaceName = 1;
258 message ListTableDescriptorsByNamespaceResponse {
259 repeated TableSchema tableSchema = 1;
262 message ListTableNamesByNamespaceRequest {
263 required string namespaceName = 1;
266 message ListTableNamesByNamespaceResponse {
267 repeated TableName tableName = 1;
270 /* Cluster-level protobufs */
273 message ShutdownRequest {
276 message ShutdownResponse {
279 message StopMasterRequest {
282 message StopMasterResponse {
285 message IsInMaintenanceModeRequest {
288 message IsInMaintenanceModeResponse {
289 required bool inMaintenanceMode = 1;
292 message BalanceRequest {
293 optional bool force = 1;
296 message BalanceResponse {
297 required bool balancer_ran = 1;
300 message SetBalancerRunningRequest {
301 required bool on = 1;
302 optional bool synchronous = 2;
305 message SetBalancerRunningResponse {
306 optional bool prev_balance_value = 1;
309 message IsBalancerEnabledRequest {
312 message IsBalancerEnabledResponse {
313 required bool enabled = 1;
316 enum MasterSwitchType {
321 message SetSnapshotCleanupRequest {
322 required bool enabled = 1;
323 optional bool synchronous = 2;
326 message SetSnapshotCleanupResponse {
327 required bool prev_snapshot_cleanup = 1;
330 message IsSnapshotCleanupEnabledRequest {
333 message IsSnapshotCleanupEnabledResponse {
334 required bool enabled = 1;
337 message SetSplitOrMergeEnabledRequest {
338 required bool enabled = 1;
339 optional bool synchronous = 2;
340 repeated MasterSwitchType switch_types = 3;
343 message SetSplitOrMergeEnabledResponse {
344 repeated bool prev_value = 1;
347 message IsSplitOrMergeEnabledRequest {
348 required MasterSwitchType switch_type = 1;
351 message IsSplitOrMergeEnabledResponse {
352 required bool enabled = 1;
355 message NormalizeRequest {
358 message NormalizeResponse {
359 required bool normalizer_ran = 1;
362 message SetNormalizerRunningRequest {
363 required bool on = 1;
366 message SetNormalizerRunningResponse {
367 optional bool prev_normalizer_value = 1;
370 message IsNormalizerEnabledRequest {
373 message IsNormalizerEnabledResponse {
374 required bool enabled = 1;
377 message RunHbckChoreRequest {
380 message RunHbckChoreResponse {
381 required bool ran = 1;
384 message RunCatalogScanRequest {
387 message RunCatalogScanResponse {
388 // This is how many archiving tasks we started as a result of this scan.
389 optional int32 scan_result = 1;
392 message EnableCatalogJanitorRequest {
393 required bool enable = 1;
396 message EnableCatalogJanitorResponse {
397 optional bool prev_value = 1;
400 message IsCatalogJanitorEnabledRequest {
403 message IsCatalogJanitorEnabledResponse {
404 required bool value = 1;
407 message RunCleanerChoreRequest {
410 message RunCleanerChoreResponse {
411 required bool cleaner_chore_ran = 1;
414 message SetCleanerChoreRunningRequest {
415 required bool on = 1;
418 message SetCleanerChoreRunningResponse {
419 optional bool prev_value = 1;
422 message IsCleanerChoreEnabledRequest {
425 message IsCleanerChoreEnabledResponse {
426 required bool value = 1;
429 message SnapshotRequest {
430 required SnapshotDescription snapshot = 1;
433 message SnapshotResponse {
434 required int64 expected_timeout = 1;
437 message GetCompletedSnapshotsRequest {
440 message GetCompletedSnapshotsResponse {
441 repeated SnapshotDescription snapshots = 1;
444 message DeleteSnapshotRequest {
445 required SnapshotDescription snapshot = 1;
448 message DeleteSnapshotResponse {
451 message RestoreSnapshotRequest {
452 required SnapshotDescription snapshot = 1;
453 optional uint64 nonce_group = 2 [default = 0];
454 optional uint64 nonce = 3 [default = 0];
455 optional bool restoreACL = 4 [default = false];
458 message RestoreSnapshotResponse {
459 required uint64 proc_id = 1;
462 /* if you don't send the snapshot, then you will get it back
463 * in the response (if the snapshot is done) so you can check the snapshot
465 message IsSnapshotDoneRequest {
466 optional SnapshotDescription snapshot = 1;
469 message IsSnapshotDoneResponse {
470 optional bool done = 1 [default = false];
471 optional SnapshotDescription snapshot = 2;
474 message IsRestoreSnapshotDoneRequest {
475 optional SnapshotDescription snapshot = 1;
478 message IsRestoreSnapshotDoneResponse {
479 optional bool done = 1 [default = false];
482 message GetSchemaAlterStatusRequest {
483 required TableName table_name = 1;
486 message GetSchemaAlterStatusResponse {
487 optional uint32 yet_to_update_regions = 1;
488 optional uint32 total_regions = 2;
491 message GetTableDescriptorsRequest {
492 repeated TableName table_names = 1;
493 optional string regex = 2;
494 optional bool include_sys_tables = 3 [default=false];
495 optional string namespace = 4;
498 message GetTableDescriptorsResponse {
499 repeated TableSchema table_schema = 1;
502 message GetTableNamesRequest {
503 optional string regex = 1;
504 optional bool include_sys_tables = 2 [default=false];
505 optional string namespace = 3;
508 message GetTableNamesResponse {
509 repeated TableName table_names = 1;
512 message GetTableStateRequest {
513 required TableName table_name = 1;
516 message GetTableStateResponse {
517 required TableState table_state = 1;
520 message GetRegionStateInMetaResponse {
521 repeated RegionState states = 1;
525 message GetClusterStatusRequest {
526 repeated Option options = 1;
529 message GetClusterStatusResponse {
530 required ClusterStatus cluster_status = 1;
533 message IsMasterRunningRequest {
536 message IsMasterRunningResponse {
537 required bool is_master_running = 1;
540 message ExecProcedureRequest {
541 required ProcedureDescription procedure = 1;
544 message ExecProcedureResponse {
545 optional int64 expected_timeout = 1;
546 optional bytes return_data = 2;
549 message IsProcedureDoneRequest {
550 optional ProcedureDescription procedure = 1;
553 message IsProcedureDoneResponse {
554 optional bool done = 1 [default = false];
555 optional ProcedureDescription snapshot = 2;
558 message GetProcedureResultRequest {
559 required uint64 proc_id = 1;
562 message GetProcedureResultResponse {
569 required State state = 1;
570 optional uint64 submitted_time = 2;
571 optional uint64 last_update = 3;
572 optional bytes result = 4;
573 optional ForeignExceptionMessage exception = 5;
576 message AbortProcedureRequest {
577 required uint64 proc_id = 1;
578 optional bool mayInterruptIfRunning = 2 [default = true];
581 message AbortProcedureResponse {
582 required bool is_procedure_aborted = 1;
585 message GetProceduresRequest {
588 message GetProceduresResponse {
589 repeated Procedure procedure = 1;
592 message GetLocksRequest {
595 message GetLocksResponse {
596 repeated LockedResource lock = 1;
599 message SetQuotaRequest {
600 optional string user_name = 1;
601 optional string user_group = 2;
602 optional string namespace = 3;
603 optional TableName table_name = 4;
605 optional bool remove_all = 5;
606 optional bool bypass_globals = 6;
607 optional ThrottleRequest throttle = 7;
609 optional SpaceLimitRequest space_limit = 8;
610 optional string region_server = 9;
613 message SetQuotaResponse {
616 message MajorCompactionTimestampRequest {
617 required TableName table_name = 1;
620 message MajorCompactionTimestampForRegionRequest {
621 required RegionSpecifier region = 1;
624 message MajorCompactionTimestampResponse {
625 required int64 compaction_timestamp = 1;
628 message SecurityCapabilitiesRequest {
631 message SecurityCapabilitiesResponse {
633 SIMPLE_AUTHENTICATION = 0;
634 SECURE_AUTHENTICATION = 1;
636 CELL_AUTHORIZATION = 3;
640 repeated Capability capabilities = 1;
643 message ListDecommissionedRegionServersRequest {
646 message ListDecommissionedRegionServersResponse {
647 repeated ServerName server_name = 1;
650 message DecommissionRegionServersRequest {
651 repeated ServerName server_name = 1;
652 required bool offload = 2;
655 message DecommissionRegionServersResponse {
658 message RecommissionRegionServerRequest {
659 required ServerName server_name = 1;
660 repeated RegionSpecifier region = 2;
663 message RecommissionRegionServerResponse {
666 message ClearDeadServersRequest {
667 repeated ServerName server_name = 1;
670 message ClearDeadServersResponse {
671 repeated ServerName server_name = 1;
674 message SwitchRpcThrottleRequest {
675 required bool rpc_throttle_enabled = 1;
678 message SwitchRpcThrottleResponse {
679 required bool previous_rpc_throttle_enabled = 1;
682 message IsRpcThrottleEnabledRequest {
685 message IsRpcThrottleEnabledResponse {
686 required bool rpc_throttle_enabled = 1;
689 message SwitchExceedThrottleQuotaRequest {
690 required bool exceed_throttle_quota_enabled = 1;
693 message SwitchExceedThrottleQuotaResponse {
694 required bool previous_exceed_throttle_quota_enabled = 1;
697 service MasterService {
698 /** Used by the client to get the number of regions that have received the updated schema */
699 rpc GetSchemaAlterStatus(GetSchemaAlterStatusRequest)
700 returns(GetSchemaAlterStatusResponse);
702 /** Get list of TableDescriptors for requested tables. */
703 rpc GetTableDescriptors(GetTableDescriptorsRequest)
704 returns(GetTableDescriptorsResponse);
706 /** Get the list of table names. */
707 rpc GetTableNames(GetTableNamesRequest)
708 returns(GetTableNamesResponse);
710 /** Return cluster status. */
711 rpc GetClusterStatus(GetClusterStatusRequest)
712 returns(GetClusterStatusResponse);
714 /** return true if master is available */
715 rpc IsMasterRunning(IsMasterRunningRequest) returns(IsMasterRunningResponse);
717 /** Adds a column to the specified table. */
718 rpc AddColumn(AddColumnRequest)
719 returns(AddColumnResponse);
721 /** Deletes a column from the specified table. Table must be disabled. */
722 rpc DeleteColumn(DeleteColumnRequest)
723 returns(DeleteColumnResponse);
725 /** Modifies an existing column on the specified table. */
726 rpc ModifyColumn(ModifyColumnRequest)
727 returns(ModifyColumnResponse);
729 /** Move the region region to the destination server. */
730 rpc MoveRegion(MoveRegionRequest)
731 returns(MoveRegionResponse);
733 /** Master merge the regions */
734 rpc MergeTableRegions(MergeTableRegionsRequest)
735 returns(MergeTableRegionsResponse);
737 /** Assign a region to a server chosen at random. */
738 rpc AssignRegion(AssignRegionRequest)
739 returns(AssignRegionResponse);
742 * Unassign a region from current hosting regionserver. Region will then be
743 * assigned to a regionserver chosen at random. Region could be reassigned
744 * back to the same server. Use MoveRegion if you want
745 * to control the region movement.
747 rpc UnassignRegion(UnassignRegionRequest)
748 returns(UnassignRegionResponse);
751 * Offline a region from the assignment manager's in-memory state. The
752 * region should be in a closed state and there will be no attempt to
753 * automatically reassign the region as in unassign. This is a special
754 * method, and should only be used by experts or hbck.
756 rpc OfflineRegion(OfflineRegionRequest)
757 returns(OfflineRegionResponse);
762 rpc SplitRegion(SplitTableRegionRequest)
763 returns(SplitTableRegionResponse);
765 /** Deletes a table */
766 rpc DeleteTable(DeleteTableRequest)
767 returns(DeleteTableResponse);
769 /** Truncate a table */
770 rpc truncateTable(TruncateTableRequest)
771 returns(TruncateTableResponse);
773 /** Puts the table on-line (only needed if table has been previously taken offline) */
774 rpc EnableTable(EnableTableRequest)
775 returns(EnableTableResponse);
777 /** Take table offline */
778 rpc DisableTable(DisableTableRequest)
779 returns(DisableTableResponse);
781 /** Modify a table's metadata */
782 rpc ModifyTable(ModifyTableRequest)
783 returns(ModifyTableResponse);
785 /** Creates a new table asynchronously */
786 rpc CreateTable(CreateTableRequest)
787 returns(CreateTableResponse);
789 /** Shutdown an HBase cluster. */
790 rpc Shutdown(ShutdownRequest)
791 returns(ShutdownResponse);
793 /** Stop HBase Master only. Does not shutdown the cluster. */
794 rpc StopMaster(StopMasterRequest)
795 returns(StopMasterResponse);
798 * Query whether the Master is in maintenance mode.
800 rpc IsMasterInMaintenanceMode(IsInMaintenanceModeRequest)
801 returns(IsInMaintenanceModeResponse);
804 * Run the balancer. Will run the balancer and if regions to move, it will
805 * go ahead and do the reassignments. Can NOT run for various reasons.
808 rpc Balance(BalanceRequest)
809 returns(BalanceResponse);
812 * Turn the load balancer on or off.
813 * If synchronous is true, it waits until current balance() call, if outstanding, to return.
815 rpc SetBalancerRunning(SetBalancerRunningRequest)
816 returns(SetBalancerRunningResponse);
819 * Query whether the Region Balancer is running.
821 rpc IsBalancerEnabled(IsBalancerEnabledRequest)
822 returns(IsBalancerEnabledResponse);
825 * Turn the split or merge switch on or off.
826 * If synchronous is true, it waits until current operation call, if outstanding, to return.
828 rpc SetSplitOrMergeEnabled(SetSplitOrMergeEnabledRequest)
829 returns(SetSplitOrMergeEnabledResponse);
832 * Query whether the split or merge switch is on/off.
834 rpc IsSplitOrMergeEnabled(IsSplitOrMergeEnabledRequest)
835 returns(IsSplitOrMergeEnabledResponse);
838 * Run region normalizer. Can NOT run for various reasons. Check logs.
840 rpc Normalize(NormalizeRequest)
841 returns(NormalizeResponse);
844 * Turn region normalizer on or off.
846 rpc SetNormalizerRunning(SetNormalizerRunningRequest)
847 returns(SetNormalizerRunningResponse);
850 * Query whether region normalizer is enabled.
852 rpc IsNormalizerEnabled(IsNormalizerEnabledRequest)
853 returns(IsNormalizerEnabledResponse);
855 /** Get a run of the catalog janitor */
856 rpc RunCatalogScan(RunCatalogScanRequest)
857 returns(RunCatalogScanResponse);
860 * Enable the catalog janitor on or off.
862 rpc EnableCatalogJanitor(EnableCatalogJanitorRequest)
863 returns(EnableCatalogJanitorResponse);
866 * Query whether the catalog janitor is enabled.
868 rpc IsCatalogJanitorEnabled(IsCatalogJanitorEnabledRequest)
869 returns(IsCatalogJanitorEnabledResponse);
871 /** Get a run of the CleanerChore */
872 rpc RunCleanerChore(RunCleanerChoreRequest)
873 returns(RunCleanerChoreResponse);
876 * Enable the CleanerChore on or off.
878 rpc SetCleanerChoreRunning(SetCleanerChoreRunningRequest)
879 returns(SetCleanerChoreRunningResponse);
882 * Query whether the CleanerChore is enabled.
884 rpc IsCleanerChoreEnabled(IsCleanerChoreEnabledRequest)
885 returns(IsCleanerChoreEnabledResponse);
888 * Call a master coprocessor endpoint
890 rpc ExecMasterService(CoprocessorServiceRequest)
891 returns(CoprocessorServiceResponse);
894 * Create a snapshot for the given table.
896 rpc Snapshot(SnapshotRequest) returns(SnapshotResponse);
899 * Get completed snapshots.
900 * Returns a list of snapshot descriptors for completed snapshots
902 rpc GetCompletedSnapshots(GetCompletedSnapshotsRequest) returns(GetCompletedSnapshotsResponse);
905 * Delete an existing snapshot. This method can also be used to clean up an aborted snapshot.
907 rpc DeleteSnapshot(DeleteSnapshotRequest) returns(DeleteSnapshotResponse);
910 * Determine if the snapshot is done yet.
912 rpc IsSnapshotDone(IsSnapshotDoneRequest) returns(IsSnapshotDoneResponse);
917 rpc RestoreSnapshot(RestoreSnapshotRequest) returns(RestoreSnapshotResponse);
920 * Turn on/off snapshot auto-cleanup based on TTL expiration
922 rpc SwitchSnapshotCleanup (SetSnapshotCleanupRequest)
923 returns (SetSnapshotCleanupResponse);
926 * Determine if snapshot auto-cleanup based on TTL expiration is turned on
928 rpc IsSnapshotCleanupEnabled (IsSnapshotCleanupEnabledRequest)
929 returns (IsSnapshotCleanupEnabledResponse);
932 * Execute a distributed procedure.
934 rpc ExecProcedure(ExecProcedureRequest) returns(ExecProcedureResponse);
937 * Execute a distributed procedure with return data.
939 rpc ExecProcedureWithRet(ExecProcedureRequest) returns(ExecProcedureResponse);
942 * Determine if the procedure is done yet.
944 rpc IsProcedureDone(IsProcedureDoneRequest) returns(IsProcedureDoneResponse);
946 /** return true if master is available */
947 /** rpc IsMasterRunning(IsMasterRunningRequest) returns(IsMasterRunningResponse); */
949 /** Modify a namespace's metadata */
950 rpc ModifyNamespace(ModifyNamespaceRequest)
951 returns(ModifyNamespaceResponse);
953 /** Creates a new namespace synchronously */
954 rpc CreateNamespace(CreateNamespaceRequest)
955 returns(CreateNamespaceResponse);
957 /** Deletes namespace synchronously */
958 rpc DeleteNamespace(DeleteNamespaceRequest)
959 returns(DeleteNamespaceResponse);
961 /** Get a namespace descriptor by name */
962 rpc GetNamespaceDescriptor(GetNamespaceDescriptorRequest)
963 returns(GetNamespaceDescriptorResponse);
965 /** returns a list of namespace descriptors */
966 rpc ListNamespaceDescriptors(ListNamespaceDescriptorsRequest)
967 returns(ListNamespaceDescriptorsResponse);
969 /** returns a list of tables for a given namespace*/
970 rpc ListTableDescriptorsByNamespace(ListTableDescriptorsByNamespaceRequest)
971 returns(ListTableDescriptorsByNamespaceResponse);
973 /** returns a list of tables for a given namespace*/
974 rpc ListTableNamesByNamespace(ListTableNamesByNamespaceRequest)
975 returns(ListTableNamesByNamespaceResponse);
977 /** returns table state */
978 rpc GetTableState(GetTableStateRequest)
979 returns(GetTableStateResponse);
981 /** Apply the new quota settings */
982 rpc SetQuota(SetQuotaRequest) returns(SetQuotaResponse);
984 /** Returns the timestamp of the last major compaction */
985 rpc getLastMajorCompactionTimestamp(MajorCompactionTimestampRequest)
986 returns(MajorCompactionTimestampResponse);
988 /** Returns the timestamp of the last major compaction */
989 rpc getLastMajorCompactionTimestampForRegion(MajorCompactionTimestampForRegionRequest)
990 returns(MajorCompactionTimestampResponse);
992 rpc getProcedureResult(GetProcedureResultRequest)
993 returns(GetProcedureResultResponse);
995 /** Returns the security capabilities in effect on the cluster */
996 rpc getSecurityCapabilities(SecurityCapabilitiesRequest)
997 returns(SecurityCapabilitiesResponse);
999 /** Abort a procedure */
1000 rpc AbortProcedure(AbortProcedureRequest)
1001 returns(AbortProcedureResponse);
1003 /** returns a list of procedures */
1004 rpc GetProcedures(GetProceduresRequest)
1005 returns(GetProceduresResponse);
1007 rpc GetLocks(GetLocksRequest)
1008 returns(GetLocksResponse);
1010 /** Add a replication peer */
1011 rpc AddReplicationPeer(AddReplicationPeerRequest)
1012 returns(AddReplicationPeerResponse);
1014 /** Remove a replication peer */
1015 rpc RemoveReplicationPeer(RemoveReplicationPeerRequest)
1016 returns(RemoveReplicationPeerResponse);
1018 /** Enable a replication peer */
1019 rpc EnableReplicationPeer(EnableReplicationPeerRequest)
1020 returns(EnableReplicationPeerResponse);
1022 /** Disable a replication peer */
1023 rpc DisableReplicationPeer(DisableReplicationPeerRequest)
1024 returns(DisableReplicationPeerResponse);
1026 /** Return peer config for a replication peer */
1027 rpc GetReplicationPeerConfig(GetReplicationPeerConfigRequest)
1028 returns(GetReplicationPeerConfigResponse);
1030 /** Update peer config for a replication peer */
1031 rpc UpdateReplicationPeerConfig(UpdateReplicationPeerConfigRequest)
1032 returns(UpdateReplicationPeerConfigResponse);
1034 /** Returns a list of replication peers */
1035 rpc ListReplicationPeers(ListReplicationPeersRequest)
1036 returns(ListReplicationPeersResponse);
1038 /** Transit the state of current cluster in a synchronous replication peer */
1039 rpc TransitReplicationPeerSyncReplicationState(TransitReplicationPeerSyncReplicationStateRequest)
1040 returns(TransitReplicationPeerSyncReplicationStateResponse);
1042 /** Returns a list of ServerNames marked as decommissioned. */
1043 rpc ListDecommissionedRegionServers(ListDecommissionedRegionServersRequest)
1044 returns(ListDecommissionedRegionServersResponse);
1046 /** Decommission region servers. */
1047 rpc DecommissionRegionServers(DecommissionRegionServersRequest)
1048 returns(DecommissionRegionServersResponse);
1050 /** Re-commission region server. */
1051 rpc RecommissionRegionServer(RecommissionRegionServerRequest)
1052 returns(RecommissionRegionServerResponse);
1054 /** Fetches the Master's view of space utilization */
1055 rpc GetSpaceQuotaRegionSizes(GetSpaceQuotaRegionSizesRequest)
1056 returns(GetSpaceQuotaRegionSizesResponse);
1058 /** Fetches the Master's view of quotas */
1059 rpc GetQuotaStates(GetQuotaStatesRequest)
1060 returns(GetQuotaStatesResponse);
1062 /** clear dead servers from master*/
1063 rpc ClearDeadServers(ClearDeadServersRequest)
1064 returns(ClearDeadServersResponse);
1066 /** Turn the quota throttle on or off */
1067 rpc SwitchRpcThrottle (SwitchRpcThrottleRequest) returns (SwitchRpcThrottleResponse);
1069 /** Get if is rpc throttled enabled */
1070 rpc IsRpcThrottleEnabled (IsRpcThrottleEnabledRequest)
1071 returns (IsRpcThrottleEnabledResponse);
1073 /** Turn the exceed throttle quota on or off */
1074 rpc SwitchExceedThrottleQuota (SwitchExceedThrottleQuotaRequest)
1075 returns (SwitchExceedThrottleQuotaResponse);
1077 rpc Grant(GrantRequest) returns (GrantResponse);
1079 rpc Revoke(RevokeRequest) returns (RevokeResponse);
1081 rpc GetUserPermissions (GetUserPermissionsRequest) returns (GetUserPermissionsResponse);
1083 rpc HasUserPermissions (HasUserPermissionsRequest) returns (HasUserPermissionsResponse);
1085 /** returns a list of namespace names */
1086 rpc ListNamespaces(ListNamespacesRequest)
1087 returns(ListNamespacesResponse);
1090 // HBCK Service definitions.
1092 message SetTableStateInMetaRequest {
1093 required TableName table_name = 1;
1094 required TableState table_state = 2;
1097 message SetRegionStateInMetaRequest {
1098 repeated RegionState states = 2;
1101 /** Like Admin's AssignRegionRequest except it can
1102 * take one or more Regions at a time.
1104 // NOTE: In hbck.proto, there is a define for
1105 // AssignRegionRequest -- singular 'Region'. This
1106 // is plural to convey it can carry more than one
1107 // Region at a time.
1108 message AssignsRequest {
1109 repeated RegionSpecifier region = 1;
1110 optional bool override = 2 [default = false];
1113 /** Like Admin's AssignRegionResponse except it can
1114 * return one or more pids as result -- one per assign.
1116 message AssignsResponse {
1117 repeated uint64 pid = 1;
1120 /** Like Admin's UnassignRegionRequest except it can
1121 * take one or more Regions at a time.
1123 message UnassignsRequest {
1124 repeated RegionSpecifier region = 1;
1125 optional bool override = 2 [default = false];
1128 /** Like Admin's UnassignRegionResponse except it can
1129 * return one or more pids as result -- one per unassign.
1131 message UnassignsResponse {
1132 repeated uint64 pid = 1;
1135 message BypassProcedureRequest {
1136 repeated uint64 proc_id = 1;
1137 optional uint64 waitTime = 2; // wait time in ms to acquire lock on a procedure
1138 optional bool override = 3 [default = false]; // if true, procedure is marked for bypass even if its executing
1139 optional bool recursive = 4;
1142 message BypassProcedureResponse {
1143 repeated bool bypassed = 1;
1146 message ScheduleServerCrashProcedureRequest {
1147 repeated ServerName serverName = 1;
1150 message ScheduleServerCrashProcedureResponse {
1151 repeated uint64 pid = 1;
1154 message FixMetaRequest {}
1156 message FixMetaResponse {}
1158 service HbckService {
1159 /** Update state of the table in meta only*/
1160 rpc SetTableStateInMeta(SetTableStateInMetaRequest)
1161 returns(GetTableStateResponse);
1163 /** Update state of the region in meta only*/
1164 rpc SetRegionStateInMeta(SetRegionStateInMetaRequest)
1165 returns(GetRegionStateInMetaResponse);
1169 * Like Admin's assign but works even if the
1170 * Master is initializing. Also allows bulk'ing up
1171 * assigns rather than one region at a time.
1173 rpc Assigns(AssignsRequest)
1174 returns(AssignsResponse);
1178 * Like Admin's unssign but works even if the
1179 * Master is initializing. Also allows bulk'ing up
1180 * assigns rather than one region at a time.
1182 rpc Unassigns(UnassignsRequest)
1183 returns(UnassignsResponse);
1185 /** Bypass a procedure to completion, procedure is completed but no actual work is done*/
1186 rpc BypassProcedure(BypassProcedureRequest)
1187 returns(BypassProcedureResponse);
1189 /** Schedule a ServerCrashProcedure to help recover a crash server */
1190 rpc ScheduleServerCrashProcedure(ScheduleServerCrashProcedureRequest)
1191 returns(ScheduleServerCrashProcedureResponse);
1194 * Request HBCK chore to run at master side.
1196 rpc RunHbckChore(RunHbckChoreRequest)
1197 returns(RunHbckChoreResponse);
1199 /** Schedule a fix meta run. */
1200 rpc FixMeta(FixMetaRequest)
1201 returns(FixMetaResponse);
1204 /** Request and response to get the clusterID for this cluster */
1205 message GetClusterIdRequest {
1207 message GetClusterIdResponse {
1208 /** Not set if cluster ID could not be determined. */
1209 optional string cluster_id = 1;
1212 /** Request and response to get the currently active master name for this cluster */
1213 message GetActiveMasterRequest {
1215 message GetActiveMasterResponse {
1216 /** Not set if an active master could not be determined. */
1217 optional ServerName server_name = 1;
1220 /** Request and response to get the current list of meta region locations */
1221 message GetMetaRegionLocationsRequest {
1223 message GetMetaRegionLocationsResponse {
1224 /** Not set if meta region locations could not be determined. */
1225 repeated RegionLocation meta_locations = 1;
1229 * Implements all the RPCs needed by clients to look up cluster meta information needed for connection establishment.
1231 service ClientMetaService {
1233 * Get Cluster ID for this cluster.
1235 rpc GetClusterId(GetClusterIdRequest) returns(GetClusterIdResponse);
1238 * Get active master server name for this cluster.
1240 rpc GetActiveMaster(GetActiveMasterRequest) returns(GetActiveMasterResponse);
1243 * Get current meta replicas' region locations.
1245 rpc GetMetaRegionLocations(GetMetaRegionLocationsRequest) returns(GetMetaRegionLocationsResponse);