github.com/tsuna/gohbase@v0.0.0-20250731002811-4ffcadfba63e/pb/HBase.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 // This file contains protocol buffers that are shared throughout HBase 20 syntax = "proto2"; 21 package pb; 22 23 option java_package = "org.apache.hadoop.hbase.protobuf.generated"; 24 option java_outer_classname = "HBaseProtos"; 25 option java_generate_equals_and_hash = true; 26 option optimize_for = SPEED; 27 option go_package = "../pb"; 28 29 /** 30 * Table Name 31 */ 32 message TableName { 33 required bytes namespace = 1; 34 required bytes qualifier = 2; 35 } 36 37 /** 38 * Table Schema 39 * Inspired by the rest TableSchema 40 */ 41 message TableSchema { 42 optional TableName table_name = 1; 43 repeated BytesBytesPair attributes = 2; 44 repeated ColumnFamilySchema column_families = 3; 45 repeated NameStringPair configuration = 4; 46 } 47 48 /** 49 * Column Family Schema 50 * Inspired by the rest ColumSchemaMessage 51 */ 52 message ColumnFamilySchema { 53 required bytes name = 1; 54 repeated BytesBytesPair attributes = 2; 55 repeated NameStringPair configuration = 3; 56 } 57 58 /** 59 * Protocol buffer version of HRegionInfo. 60 */ 61 message RegionInfo { 62 required uint64 region_id = 1; 63 required TableName table_name = 2; 64 optional bytes start_key = 3; 65 optional bytes end_key = 4; 66 optional bool offline = 5; 67 optional bool split = 6; 68 optional int32 replica_id = 7 [default = 0]; 69 } 70 71 /** 72 * Protocol buffer for favored nodes 73 */ 74 message FavoredNodes { 75 repeated ServerName favored_node = 1; 76 } 77 78 /** 79 * Container protocol buffer to specify a region. 80 * You can specify region by region name, or the hash 81 * of the region name, which is known as encoded 82 * region name. 83 */ 84 message RegionSpecifier { 85 required RegionSpecifierType type = 1; 86 required bytes value = 2; 87 88 enum RegionSpecifierType { 89 // <tablename>,<startkey>,<regionId>.<encodedName> 90 REGION_NAME = 1; 91 92 // hash of <tablename>,<startkey>,<regionId> 93 ENCODED_REGION_NAME = 2; 94 } 95 } 96 97 /** 98 * A range of time. Both from and to are Java time 99 * stamp in milliseconds. If you don't specify a time 100 * range, it means all time. By default, if not 101 * specified, from = 0, and to = Long.MAX_VALUE 102 */ 103 message TimeRange { 104 optional uint64 from = 1; 105 optional uint64 to = 2; 106 } 107 108 /* ColumnFamily Specific TimeRange */ 109 message ColumnFamilyTimeRange { 110 required bytes column_family = 1; 111 required TimeRange time_range = 2; 112 } 113 114 /* Comparison operators */ 115 enum CompareType { 116 LESS = 0; 117 LESS_OR_EQUAL = 1; 118 EQUAL = 2; 119 NOT_EQUAL = 3; 120 GREATER_OR_EQUAL = 4; 121 GREATER = 5; 122 NO_OP = 6; 123 } 124 125 /** 126 * Protocol buffer version of ServerName 127 */ 128 message ServerName { 129 required string host_name = 1; 130 optional uint32 port = 2; 131 optional uint64 start_code = 3; 132 } 133 134 // Comment data structures 135 136 message Coprocessor { 137 required string name = 1; 138 } 139 140 message NameStringPair { 141 required string name = 1; 142 required string value = 2; 143 } 144 145 message NameBytesPair { 146 required string name = 1; 147 optional bytes value = 2; 148 } 149 150 message BytesBytesPair { 151 required bytes first = 1; 152 required bytes second = 2; 153 } 154 155 message NameInt64Pair { 156 optional string name = 1; 157 optional int64 value = 2; 158 } 159 160 /** 161 * Description of the snapshot to take 162 */ 163 message SnapshotDescription { 164 required string name = 1; 165 optional string table = 2; // not needed for delete, but checked for in taking snapshot 166 optional int64 creation_time = 3 [default = 0]; 167 enum Type { 168 DISABLED = 0; 169 FLUSH = 1; 170 SKIPFLUSH = 2; 171 } 172 optional Type type = 4 [default = FLUSH]; 173 optional int32 version = 5; 174 optional string owner = 6; 175 } 176 177 /** 178 * Description of the distributed procedure to take 179 */ 180 message ProcedureDescription { 181 required string signature = 1; // the unique signature of the procedure 182 optional string instance = 2; // the procedure instance name 183 optional int64 creation_time = 3 [default = 0]; 184 repeated NameStringPair configuration = 4; 185 } 186 187 message EmptyMsg { 188 } 189 190 enum TimeUnit { 191 NANOSECONDS = 1; 192 MICROSECONDS = 2; 193 MILLISECONDS = 3; 194 SECONDS = 4; 195 MINUTES = 5; 196 HOURS = 6; 197 DAYS = 7; 198 } 199 200 message LongMsg { 201 required int64 long_msg = 1; 202 } 203 204 message DoubleMsg { 205 required double double_msg = 1; 206 } 207 208 message BigDecimalMsg { 209 required bytes bigdecimal_msg = 1; 210 } 211 212 message UUID { 213 required uint64 least_sig_bits = 1; 214 required uint64 most_sig_bits = 2; 215 } 216 217 message NamespaceDescriptor { 218 required bytes name = 1; 219 repeated NameStringPair configuration = 2; 220 } 221 222 // Rpc client version info proto. Included in ConnectionHeader on connection setup 223 message VersionInfo { 224 required string version = 1; 225 required string url = 2; 226 required string revision = 3; 227 required string user = 4; 228 required string date = 5; 229 required string src_checksum = 6; 230 optional uint32 version_major = 7; 231 optional uint32 version_minor = 8; 232 } 233 234 /** 235 * Description of the region server info 236 */ 237 message RegionServerInfo { 238 optional int32 infoPort = 1; 239 optional VersionInfo version_info = 2; 240 }