public class TestBackupBase extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
TestBackupBase.FullTableBackupClientForTest |
(package private) static class |
TestBackupBase.IncrementalTableBackupClientForTest |
Modifier and Type | Field and Description |
---|---|
protected static boolean |
autoRestoreOnFailure |
protected static String |
BACKUP_REMOTE_ROOT_DIR |
protected static String |
BACKUP_ROOT_DIR |
protected static org.apache.hadoop.conf.Configuration |
conf1 |
protected static org.apache.hadoop.conf.Configuration |
conf2 |
protected static byte[] |
famName |
private static org.slf4j.Logger |
LOG |
protected static int |
NB_ROWS_IN_BATCH |
protected static String |
provider |
protected static byte[] |
qualName |
protected static boolean |
secure |
protected static org.apache.hadoop.hbase.TableName |
table1 |
protected static org.apache.hadoop.hbase.TableName |
table1_restore |
protected static org.apache.hadoop.hbase.client.TableDescriptor |
table1Desc |
protected static org.apache.hadoop.hbase.TableName |
table2 |
protected static org.apache.hadoop.hbase.TableName |
table2_restore |
protected static org.apache.hadoop.hbase.TableName |
table3 |
protected static org.apache.hadoop.hbase.TableName |
table3_restore |
protected static org.apache.hadoop.hbase.TableName |
table4 |
protected static HBaseTestingUtil |
TEST_UTIL |
protected static HBaseTestingUtil |
TEST_UTIL2 |
protected static boolean |
useSecondCluster |
Constructor and Description |
---|
TestBackupBase() |
Modifier and Type | Method and Description |
---|---|
protected String |
backupTables(org.apache.hadoop.hbase.backup.BackupType type,
List<org.apache.hadoop.hbase.TableName> tables,
String path) |
protected boolean |
checkFailed(String backupId) |
protected boolean |
checkSucceeded(String backupId) |
protected org.apache.hadoop.hbase.backup.BackupRequest |
createBackupRequest(org.apache.hadoop.hbase.backup.BackupType type,
List<org.apache.hadoop.hbase.TableName> tables,
String path) |
protected static void |
createTables() |
protected void |
dumpBackupDir() |
protected String |
fullTableBackup(List<org.apache.hadoop.hbase.TableName> tables) |
protected org.apache.hadoop.hbase.backup.BackupAdmin |
getBackupAdmin() |
private org.apache.hadoop.hbase.backup.BackupInfo |
getBackupInfo(String backupId) |
protected List<org.apache.hadoop.fs.FileStatus> |
getListOfWALFiles(org.apache.hadoop.conf.Configuration c) |
protected String |
incrementalTableBackup(List<org.apache.hadoop.hbase.TableName> tables) |
(package private) org.apache.hadoop.hbase.client.Table |
insertIntoTable(org.apache.hadoop.hbase.client.Connection conn,
org.apache.hadoop.hbase.TableName table,
byte[] family,
int id,
int numRows) |
protected static void |
loadTable(org.apache.hadoop.hbase.client.Table table) |
private static void |
populateFromMasterConfig(org.apache.hadoop.conf.Configuration masterConf,
org.apache.hadoop.conf.Configuration conf) |
static void |
setUp()
Setup Cluster with appropriate configurations before running tests.
|
static void |
setUpHelper() |
static void |
tearDown() |
protected List<org.apache.hadoop.hbase.TableName> |
toList(String... args)
Helper method
|
private static final org.slf4j.Logger LOG
protected static HBaseTestingUtil TEST_UTIL
protected static HBaseTestingUtil TEST_UTIL2
protected static org.apache.hadoop.conf.Configuration conf1
protected static org.apache.hadoop.conf.Configuration conf2
protected static org.apache.hadoop.hbase.TableName table1
protected static org.apache.hadoop.hbase.client.TableDescriptor table1Desc
protected static org.apache.hadoop.hbase.TableName table2
protected static org.apache.hadoop.hbase.TableName table3
protected static org.apache.hadoop.hbase.TableName table4
protected static org.apache.hadoop.hbase.TableName table1_restore
protected static org.apache.hadoop.hbase.TableName table2_restore
protected static org.apache.hadoop.hbase.TableName table3_restore
protected static final int NB_ROWS_IN_BATCH
protected static final byte[] qualName
protected static final byte[] famName
protected static String BACKUP_ROOT_DIR
protected static String BACKUP_REMOTE_ROOT_DIR
protected static boolean secure
protected static boolean autoRestoreOnFailure
protected static boolean useSecondCluster
public TestBackupBase()
public static void setUpHelper() throws Exception
Exception
public static void setUp() throws Exception
Exception
- if starting the mini cluster or setting up the tables failsprivate static void populateFromMasterConfig(org.apache.hadoop.conf.Configuration masterConf, org.apache.hadoop.conf.Configuration conf)
org.apache.hadoop.hbase.client.Table insertIntoTable(org.apache.hadoop.hbase.client.Connection conn, org.apache.hadoop.hbase.TableName table, byte[] family, int id, int numRows) throws IOException
IOException
protected org.apache.hadoop.hbase.backup.BackupRequest createBackupRequest(org.apache.hadoop.hbase.backup.BackupType type, List<org.apache.hadoop.hbase.TableName> tables, String path)
protected String backupTables(org.apache.hadoop.hbase.backup.BackupType type, List<org.apache.hadoop.hbase.TableName> tables, String path) throws IOException
IOException
protected String fullTableBackup(List<org.apache.hadoop.hbase.TableName> tables) throws IOException
IOException
protected String incrementalTableBackup(List<org.apache.hadoop.hbase.TableName> tables) throws IOException
IOException
protected static void loadTable(org.apache.hadoop.hbase.client.Table table) throws Exception
Exception
protected static void createTables() throws Exception
Exception
protected boolean checkSucceeded(String backupId) throws IOException
IOException
protected boolean checkFailed(String backupId) throws IOException
IOException
private org.apache.hadoop.hbase.backup.BackupInfo getBackupInfo(String backupId) throws IOException
IOException
protected org.apache.hadoop.hbase.backup.BackupAdmin getBackupAdmin() throws IOException
IOException
protected List<org.apache.hadoop.fs.FileStatus> getListOfWALFiles(org.apache.hadoop.conf.Configuration c) throws IOException
IOException
protected void dumpBackupDir() throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.