github.com/tsuna/gohbase@v0.0.0-20250731002811-4ffcadfba63e/pb/Quota.proto (about) 1 /** 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 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 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. 17 */ 18 19 syntax = "proto2"; 20 package pb; 21 22 option java_package = "org.apache.hadoop.hbase.protobuf.generated"; 23 option java_outer_classname = "QuotaProtos"; 24 option java_generic_services = true; 25 option java_generate_equals_and_hash = true; 26 option optimize_for = SPEED; 27 option go_package = "../pb"; 28 29 import "HBase.proto"; 30 31 enum QuotaScope { 32 CLUSTER = 1; 33 MACHINE = 2; 34 } 35 36 message TimedQuota { 37 required TimeUnit time_unit = 1; 38 optional uint64 soft_limit = 2; 39 optional float share = 3; 40 optional QuotaScope scope = 4 [default = MACHINE]; 41 } 42 43 enum ThrottleType { 44 REQUEST_NUMBER = 1; 45 REQUEST_SIZE = 2; 46 WRITE_NUMBER = 3; 47 WRITE_SIZE = 4; 48 READ_NUMBER = 5; 49 READ_SIZE = 6; 50 } 51 52 message Throttle { 53 optional TimedQuota req_num = 1; 54 optional TimedQuota req_size = 2; 55 56 optional TimedQuota write_num = 3; 57 optional TimedQuota write_size = 4; 58 59 optional TimedQuota read_num = 5; 60 optional TimedQuota read_size = 6; 61 } 62 63 message ThrottleRequest { 64 optional ThrottleType type = 1; 65 optional TimedQuota timed_quota = 2; 66 } 67 68 enum QuotaType { 69 THROTTLE = 1; 70 } 71 72 message Quotas { 73 optional bool bypass_globals = 1 [default = false]; 74 optional Throttle throttle = 2; 75 } 76 77 message QuotaUsage { 78 }