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.shaded.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;
69 optional CustomEntryType custom_entry_type = 9;
71 enum CustomEntryType {
78 required string key = 1;
79 required bytes value = 2;
83 REPLICATION_SCOPE_LOCAL = 0;
84 REPLICATION_SCOPE_GLOBAL = 1;
85 REPLICATION_SCOPE_SERIAL = 2;
89 required bytes family = 1;
90 required ScopeType scope_type = 2;
98 * Special WAL entry to hold all related to a compaction.
99 * Written to WAL before completing compaction. There is
100 * sufficient info in the below message to complete later
101 * the * compaction should we fail the WAL write.
103 message CompactionDescriptor {
104 required bytes table_name = 1; // TODO: WALKey already stores these, might remove
105 required bytes encoded_region_name = 2;
106 required bytes family_name = 3;
107 repeated string compaction_input = 4; // relative to store dir
108 repeated string compaction_output = 5;
109 required string store_home_dir = 6; // relative to region dir
110 optional bytes region_name = 7; // full region name
114 * Special WAL entry to hold all related to a flush.
116 message FlushDescriptor {
121 CANNOT_FLUSH = 3; // marker for indicating that a flush has been requested but cannot complete
124 message StoreFlushDescriptor {
125 required bytes family_name = 1;
126 required string store_home_dir = 2; //relative to region dir
127 repeated string flush_output = 3; // relative to store dir (if this is a COMMIT_FLUSH)
130 required FlushAction action = 1;
131 required bytes table_name = 2;
132 required bytes encoded_region_name = 3;
133 optional uint64 flush_sequence_number = 4;
134 repeated StoreFlushDescriptor store_flushes = 5;
135 optional bytes region_name = 6; // full region name
138 message StoreDescriptor {
139 required bytes family_name = 1;
140 required string store_home_dir = 2; //relative to region dir
141 repeated string store_file = 3; // relative to store dir
142 optional uint64 store_file_size_bytes = 4; // size of store file
146 * Special WAL entry used for writing bulk load events to WAL
148 message BulkLoadDescriptor {
149 required TableName table_name = 1;
150 required bytes encoded_region_name = 2;
151 repeated StoreDescriptor stores = 3;
152 required int64 bulkload_seq_num = 4;
153 repeated string cluster_ids = 5;
154 optional bool replicate = 6 [default = true];
158 * Special WAL entry to hold all related to a region event (open/close).
160 message RegionEventDescriptor {
166 required EventType event_type = 1;
167 required bytes table_name = 2;
168 required bytes encoded_region_name = 3;
169 optional uint64 log_sequence_number = 4;
170 repeated StoreDescriptor stores = 5;
171 optional ServerName server = 6; // Server who opened the region
172 optional bytes region_name = 7; // full region name
176 * A trailer that is appended to the end of a properly closed WAL file.
177 * If missing, this is either a legacy or a corrupted WAL file.
178 * N.B. This trailer currently doesn't contain any information and we
179 * purposefully don't expose it in the WAL APIs. It's for future growth.