/** * 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. */ option java_package = "org.apache.hadoop.hbase.protobuf.generated"; option java_outer_classname = "WALProtos"; option java_generic_services = false; option java_generate_equals_and_hash = true; option optimize_for = SPEED; import "hbase.proto"; message WALHeader { optional bool hasCompression = 1; } // Protocol buffer version of HLogKey; see HLogKey comment, not really a key but WALEdit header for some KVs message WALKey { required bytes encodedRegionName = 1; required bytes tableName = 2; required uint64 logSequenceNumber = 3; required uint64 writeTime = 4; optional UUID clusterId = 5; repeated FamilyScope scopes = 6; optional uint32 followingKvCount = 7; /* optional CustomEntryType customEntryType = 8; enum CustomEntryType { COMPACTION = 0; } */ } enum ScopeType { REPLICATION_SCOPE_LOCAL = 0; REPLICATION_SCOPE_GLOBAL = 1; } message FamilyScope { required bytes family = 1; required ScopeType scopeType = 2; } /** * Custom WAL entries */ /** * Special WAL entry to hold all related to a compaction. * Written to WAL before completing compaction. There is * sufficient info in the below message to complete later * the * compaction should we fail the WAL write. */ message CompactionDescriptor { required bytes tableName = 1; // TODO: WALKey already stores these, might remove required bytes encodedRegionName = 2; required bytes familyName = 3; repeated string compactionInput = 4; repeated string compactionOutput = 5; required string storeHomeDir = 6; } /** * A trailer that is appended to the end of a properly closed HLog WAL file. * If missing, this is either a legacy or a corrupted WAL file. */ message WALTrailer { }