/** * 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. */ // This file contains protocol buffers that are shared throughout HBase option java_package = "org.apache.hadoop.hbase.protobuf.generated"; option java_outer_classname = "HBaseProtos"; option java_generate_equals_and_hash = true; option optimize_for = SPEED; /** * The type of the key in a Cell */ enum CellType { MINIMUM = 0; PUT = 4; DELETE = 8; DELETE_COLUMN = 12; DELETE_FAMILY = 14; // MAXIMUM is used when searching; you look from maximum on down. MAXIMUM = 255; } /** * Protocol buffer version of Cell. */ message Cell { optional bytes row = 1; optional bytes family = 2; optional bytes qualifier = 3; optional uint64 timestamp = 4; optional CellType cellType = 5; optional bytes value = 6; } /** * Table Schema * Inspired by the rest TableSchema */ message TableSchema { optional bytes name = 1; repeated BytesBytesPair attributes = 2; repeated ColumnFamilySchema columnFamilies = 3; repeated NameStringPair configuration = 4; } /** * Column Family Schema * Inspired by the rest ColumSchemaMessage */ message ColumnFamilySchema { required bytes name = 1; repeated BytesBytesPair attributes = 2; repeated NameStringPair configuration = 3; } /** * Protocol buffer version of HRegionInfo. */ message RegionInfo { required uint64 regionId = 1; required bytes tableName = 2; optional bytes startKey = 3; optional bytes endKey = 4; optional bool offline = 5; optional bool split = 6; optional bool recovering = 7; } /** * Protocol buffer for favored nodes */ message FavoredNodes { repeated ServerName favoredNode = 1; } /** * Container protocol buffer to specify a region. * You can specify region by region name, or the hash * of the region name, which is known as encoded * region name. */ message RegionSpecifier { required RegionSpecifierType type = 1; required bytes value = 2; enum RegionSpecifierType { // ,,. REGION_NAME = 1; // hash of ,, ENCODED_REGION_NAME = 2; } } message RegionLoad { /** the region specifier */ required RegionSpecifier regionSpecifier = 1; /** the number of stores for the region */ optional uint32 stores = 2; /** the number of storefiles for the region */ optional uint32 storefiles = 3; /** the total size of the store files for the region, uncompressed, in MB */ optional uint32 storeUncompressedSizeMB = 4; /** the current total size of the store files for the region, in MB */ optional uint32 storefileSizeMB = 5; /** the current size of the memstore for the region, in MB */ optional uint32 memstoreSizeMB = 6; /** * The current total size of root-level store file indexes for the region, * in MB. The same as {@link #rootIndexSizeKB} but in MB. */ optional uint32 storefileIndexSizeMB = 7; /** the current total read requests made to region */ optional uint64 readRequestsCount = 8; /** the current total write requests made to region */ optional uint64 writeRequestsCount = 9; /** the total compacting key values in currently running compaction */ optional uint64 totalCompactingKVs = 10; /** the completed count of key values in currently running compaction */ optional uint64 currentCompactedKVs = 11; /** The current total size of root-level indexes for the region, in KB. */ optional uint32 rootIndexSizeKB = 12; /** The total size of all index blocks, not just the root level, in KB. */ optional uint32 totalStaticIndexSizeKB = 13; /** * The total size of all Bloom filter blocks, not just loaded into the * block cache, in KB. */ optional uint32 totalStaticBloomSizeKB = 14; /** the most recent sequence Id from cache flush */ optional uint64 completeSequenceId = 15; } /* Server-level protobufs */ message ServerLoad { /** Number of requests since last report. */ optional uint32 numberOfRequests = 1; /** Total Number of requests from the start of the region server. */ optional uint32 totalNumberOfRequests = 2; /** the amount of used heap, in MB. */ optional uint32 usedHeapMB = 3; /** the maximum allowable size of the heap, in MB. */ optional uint32 maxHeapMB = 4; /** Information on the load of individual regions. */ repeated RegionLoad regionLoads = 5; /** * Regionserver-level coprocessors, e.g., WALObserver implementations. * Region-level coprocessors, on the other hand, are stored inside RegionLoad * objects. */ repeated Coprocessor coprocessors = 6; /** * Time when incremental (non-total) counts began being calculated (e.g. numberOfRequests) * time is measured as the difference, measured in milliseconds, between the current time * and midnight, January 1, 1970 UTC. */ optional uint64 reportStartTime = 7; /** * Time when report was generated. * time is measured as the difference, measured in milliseconds, between the current time * and midnight, January 1, 1970 UTC. */ optional uint64 reportEndTime = 8; /** * The port number that this region server is hosing an info server on. */ optional uint32 infoServerPort = 9; } /** * A range of time. Both from and to are Java time * stamp in milliseconds. If you don't specify a time * range, it means all time. By default, if not * specified, from = 0, and to = Long.MAX_VALUE */ message TimeRange { optional uint64 from = 1; optional uint64 to = 2; } message Filter { required string name = 1; optional bytes serializedFilter = 2; } /* Comparison operators */ enum CompareType { LESS = 0; LESS_OR_EQUAL = 1; EQUAL = 2; NOT_EQUAL = 3; GREATER_OR_EQUAL = 4; GREATER = 5; NO_OP = 6; } /** * Protocol buffer version of KeyValue. * It doesn't have those transient parameters */ message KeyValue { required bytes row = 1; required bytes family = 2; required bytes qualifier = 3; optional uint64 timestamp = 4; optional CellType keyType = 5; optional bytes value = 6; } /** * Protocol buffer version of ServerName */ message ServerName { required string hostName = 1; optional uint32 port = 2; optional uint64 startCode = 3; } // Comment data structures message Coprocessor { required string name = 1; } message NameStringPair { required string name = 1; required string value = 2; } message NameBytesPair { required string name = 1; optional bytes value = 2; } message BytesBytesPair { required bytes first = 1; required bytes second = 2; } message NameInt64Pair { optional string name = 1; optional int64 value = 2; } /** * Description of the snapshot to take */ message SnapshotDescription { required string name = 1; optional string table = 2; // not needed for delete, but checked for in taking snapshot optional int64 creationTime = 3 [default = 0]; enum Type { DISABLED = 0; FLUSH = 1; } optional Type type = 4 [default = FLUSH]; optional int32 version = 5; } message EmptyMsg { } message LongMsg { required int64 longMsg = 1; } message BigDecimalMsg { required bytes bigdecimalMsg = 1; } message UUID { required uint64 leastSigBits = 1; required uint64 mostSigBits = 2; }