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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 option java_package = "org.apache.hadoop.hbase.protobuf.generated";
22 option java_outer_classname = "WALProtos";
23 option java_generic_services = false;
24 option java_generate_equals_and_hash = true;
25 option optimize_for = SPEED;
30 optional bool has_compression = 1;
31 optional bytes encryption_key = 2;
32 optional bool has_tag_compression = 3;
33 optional string writer_cls_name = 4;
34 optional string cell_codec_cls_name = 5;
38 * Protocol buffer version of WALKey; see WALKey comment, not really a key but WALEdit header
42 required bytes encoded_region_name = 1;
43 required bytes table_name = 2;
44 required uint64 log_sequence_number = 3;
45 required uint64 write_time = 4;
47 This parameter is deprecated in favor of clusters which
48 contains the list of clusters that have consumed the change.
49 It is retained so that the log created by earlier releases (0.94)
50 can be read by the newer releases.
52 optional UUID cluster_id = 5 [deprecated=true];
54 repeated FamilyScope scopes = 6;
55 optional uint32 following_kv_count = 7;
58 This field contains the list of clusters that have
61 repeated UUID cluster_ids = 8;
63 optional uint64 nonceGroup = 9;
64 optional uint64 nonce = 10;
65 optional uint64 orig_sequence_number = 11;
66 repeated Attribute extended_attributes = 12;
68 optional CustomEntryType custom_entry_type = 9;
70 enum CustomEntryType {
76 required string key = 1;
77 required bytes value = 2;
81 REPLICATION_SCOPE_LOCAL = 0;
82 REPLICATION_SCOPE_GLOBAL = 1;
86 required bytes family = 1;
87 required ScopeType scope_type = 2;
95 * Special WAL entry to hold all related to a compaction.
96 * Written to WAL before completing compaction. There is
97 * sufficient info in the below message to complete later
98 * the * compaction should we fail the WAL write.
100 message CompactionDescriptor {
101 required bytes table_name = 1; // TODO: WALKey already stores these, might remove
102 required bytes encoded_region_name = 2;
103 required bytes family_name = 3;
104 repeated string compaction_input = 4; // relative to store dir
105 repeated string compaction_output = 5;
106 required string store_home_dir = 6; // relative to region dir
107 optional bytes region_name = 7; // full region name
111 * Special WAL entry to hold all related to a flush.
113 message FlushDescriptor {
118 CANNOT_FLUSH = 3; // marker for indicating that a flush has been requested but cannot complete
121 message StoreFlushDescriptor {
122 required bytes family_name = 1;
123 required string store_home_dir = 2; //relative to region dir
124 repeated string flush_output = 3; // relative to store dir (if this is a COMMIT_FLUSH)
127 required FlushAction action = 1;
128 required bytes table_name = 2;
129 required bytes encoded_region_name = 3;
130 optional uint64 flush_sequence_number = 4;
131 repeated StoreFlushDescriptor store_flushes = 5;
132 optional bytes region_name = 6; // full region name
135 message StoreDescriptor {
136 required bytes family_name = 1;
137 required string store_home_dir = 2; //relative to region dir
138 repeated string store_file = 3; // relative to store dir
139 optional uint64 store_file_size_bytes = 4; // size of store file
143 * Special WAL entry used for writing bulk load events to WAL
145 message BulkLoadDescriptor {
146 required TableName table_name = 1;
147 required bytes encoded_region_name = 2;
148 repeated StoreDescriptor stores = 3;
149 required int64 bulkload_seq_num = 4;
153 * Special WAL entry to hold all related to a region event (open/close).
155 message RegionEventDescriptor {
161 required EventType event_type = 1;
162 required bytes table_name = 2;
163 required bytes encoded_region_name = 3;
164 optional uint64 log_sequence_number = 4;
165 repeated StoreDescriptor stores = 5;
166 optional ServerName server = 6; // Server who opened the region
167 optional bytes region_name = 7; // full region name
171 * A trailer that is appended to the end of a properly closed WAL file.
172 * If missing, this is either a legacy or a corrupted WAL file.
173 * N.B. This trailer currently doesn't contain any information and we
174 * purposefully don't expose it in the WAL APIs. It's for future growth.