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 optional 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.
19 // This file contains Backup manifest
22 option java_package = "org.apache.hadoop.hbase.shaded.protobuf.generated";
23 option java_outer_classname = "BackupProtos";
24 option java_generic_services = true;
25 option java_generate_equals_and_hash = true;
26 option optimize_for = SPEED;
31 * Backup type enum: FULL or INCREMENTAL
39 * ServerTimestamp keeps last WAL roll time per Region Server
41 message ServerTimestamp {
42 optional ServerName server_name = 1;
43 optional uint64 timestamp = 2;
47 * TableServerTimestamp keeps last WAL roll time per Region Server & Table
48 * Each table have different last WAL roll time stamps across cluster, on every RS
50 message TableServerTimestamp {
51 optional TableName table_name = 1;
52 repeated ServerTimestamp server_timestamp = 2;
56 * Structure keeps relevant info for backup restore session
59 optional string backup_id = 1;
60 optional BackupType backup_type = 2;
61 optional string backup_root_dir = 3;
62 repeated TableName table_list = 4;
63 optional uint64 start_ts = 5;
64 optional uint64 complete_ts = 6;
65 repeated BackupImage ancestors = 7;
66 repeated TableServerTimestamp tst_map = 8;
71 * Internal structure used during backup
73 message BackupTableInfo {
74 optional TableName table_name = 1;
75 optional string snapshot_name = 2;
79 * Backup session information
82 optional string backup_id = 1;
83 optional BackupType backup_type = 2;
84 optional string backup_root_dir = 3;
85 optional BackupState backup_state = 4;
86 optional BackupPhase backup_phase = 5;
87 optional string failed_message = 6;
88 repeated BackupTableInfo backup_table_info = 7;
89 optional uint64 start_ts = 8;
90 optional uint64 complete_ts = 9;
91 optional uint32 progress = 10;
92 optional uint32 workers_number = 11;
93 optional uint64 bandwidth = 12;
94 map<string, RSTimestampMap> table_set_timestamp = 13;
96 message RSTimestampMap {
97 map<string, uint64> rs_timestamp = 1;
100 * Backup session states
110 * Phases of a backup session in RUNNING state
116 PREPARE_INCREMENTAL = 2;
118 INCREMENTAL_COPY = 4;