View Javadoc

1   /**
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
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
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.
17   */
18  package org.apache.hadoop.hbase.backup;
19  
20  import org.apache.hadoop.hbase.TableName;
21  import org.apache.hadoop.hbase.classification.InterfaceAudience;
22  import org.apache.hadoop.hbase.classification.InterfaceStability;
23  
24  @InterfaceAudience.Public
25  @InterfaceStability.Evolving
26  
27  /**
28   * POJO class for restore request
29   */
30  public class RestoreRequest {
31    
32    private String backupRootDir;  
33    private String backupId;  
34    private boolean check = false;
35    private TableName[] fromTables;
36    private TableName[] toTables;
37    private boolean overwrite = false;
38    
39    public RestoreRequest(){    
40    }
41  
42    public String getBackupRootDir() {
43      return backupRootDir;
44    }
45  
46    public RestoreRequest setBackupRootDir(String backupRootDir) {
47      this.backupRootDir = backupRootDir;
48      return this;
49    }
50  
51    public String getBackupId() {
52      return backupId;
53    }
54  
55    public RestoreRequest setBackupId(String backupId) {
56      this.backupId = backupId;
57      return this;
58    }
59  
60    public boolean isCheck() {
61      return check;
62    }
63  
64    public RestoreRequest setCheck(boolean check) {
65      this.check = check;
66      return this;
67    }
68  
69    public TableName[] getFromTables() {
70      return fromTables;
71    }
72  
73    public RestoreRequest setFromTables(TableName[] fromTables) {
74      this.fromTables = fromTables;
75      return this;
76  
77    }
78  
79    public TableName[] getToTables() {
80      return toTables;
81    }
82  
83    public RestoreRequest setToTables(TableName[] toTables) {
84      this.toTables = toTables;
85      return this;
86    }
87  
88    public boolean isOverwrite() {
89      return overwrite;
90    }
91  
92    public RestoreRequest setOverwrite(boolean overwrite) {
93      this.overwrite = overwrite;
94      return this;
95    }
96            
97    
98  }