From f4778c5731f48b531a5cdc1fce55af02664e7a5a Mon Sep 17 00:00:00 2001 From: Mike Drob Date: Mon, 16 Jul 2018 12:21:33 -0500 Subject: [PATCH] HBASE-20894 Create BucketCacheProtos serialization --- .../src/main/protobuf/BucketCacheEntry.proto | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 hbase-protocol-shaded/src/main/protobuf/BucketCacheEntry.proto diff --git a/hbase-protocol-shaded/src/main/protobuf/BucketCacheEntry.proto b/hbase-protocol-shaded/src/main/protobuf/BucketCacheEntry.proto new file mode 100644 index 0000000000..a581dfc25b --- /dev/null +++ b/hbase-protocol-shaded/src/main/protobuf/BucketCacheEntry.proto @@ -0,0 +1,72 @@ +/* + * 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 = "BucketProtos"; +option java_generic_services = true; +option java_generate_equals_and_hash = true; +option optimize_for = SPEED; + +message BucketCacheEntry { + required int64 cache_capacity = 1; + required string ioclass = 2; + required string mapclass = 3; + message UniqueIndexMap { + map forwardMap = 5; + } + message BackingMap { + repeated BackingMapEntry entry = 1; + } +} + +message BackingMapEntry { + message BlockCacheKay { + required string hfilename = 1; + required int64 offset = 2; + enum BlockType { + data = 0; + encoded_data = 1; + leaf_index = 2; + bloom_chunk = 3; + meta = 4; + intermediate_index = 5; + root_index = 6; + file_info = 7; + general_bloom_meta = 8; + delete_family_bloom_meta = 9; + trailer = 10; + index_v1 = 11; + } + required bool isPrimaryReplicaBlock = 4; + } + + message BucketEntry { + required int32 offsetBase = 1; + required int32 length = 2; + required int32 offset1 = 3; + required int32 deserialiserIndex = 4; + enum BlockPriority { + single = 0; + multi = 1; + memory = 2; + } + } +} \ No newline at end of file -- 2.16.1