Skip to content

Commit

Permalink
fixes on top of patch
Browse files Browse the repository at this point in the history
  • Loading branch information
rda3mon committed Sep 13, 2022
1 parent 3ed0f0f commit 5f92b64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,9 @@ public static void copyTableRegionInfo(Connection conn, BackupInfo backupInfo, C
// write a copy of descriptor to the target directory
Path target = new Path(backupInfo.getTableBackupDir(table));
FileSystem targetFs = target.getFileSystem(conf);
try (FSTableDescriptors descriptors =
new FSTableDescriptors(targetFs, CommonFSUtils.getRootDir(conf))) {
descriptors.createTableDescriptorForTableDirectory(target, orig, false);
}
FSTableDescriptors descriptors =
new FSTableDescriptors(targetFs, CommonFSUtils.getRootDir(conf));
descriptors.createTableDescriptorForTableDirectory(target, orig, false);
LOG.debug("Attempting to copy table info for:" + table + " target: " + target
+ " descriptor: " + orig);
LOG.debug("Finished copying tableinfo.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,12 @@ private void merge(String[] backupIds, BackupAdmin client) throws IOException {
private void runTestSingle(TableName table) throws IOException {

List<String> backupIds = new ArrayList<String>();
List<Integer> tableSizes = new ArrayList<Integer>();

try (Connection conn = util.getConnection(); Admin admin = conn.getAdmin();
BackupAdmin client = new BackupAdminImpl(conn);) {

// #0- insert some data to table 'table'
loadData(table, rowsInIteration);
tableSizes.add(rowsInIteration);

// #1 - create full backup for table first
LOG.info("create full backup image for {}", table);
Expand All @@ -270,7 +268,6 @@ private void runTestSingle(TableName table) throws IOException {

// Load data
loadData(table, rowsInIteration);
tableSizes.add(rowsInIteration * count);
// Do incremental backup
builder = new BackupRequest.Builder();
request = builder.withBackupType(BackupType.INCREMENTAL).withTableList(tables)
Expand Down Expand Up @@ -322,6 +319,7 @@ private String[] allIncremental(List<String> backupIds) {
}

/**
* Check if backup is succeeded
* @param backupId pass backup ID to check status of
* @return status of backup
*/
Expand Down Expand Up @@ -429,6 +427,7 @@ protected void processOptions(CommandLine cmd) {
}

/**
* Main method
* @param args argument list
*/
public static void main(String[] args) throws Exception {
Expand Down

0 comments on commit 5f92b64

Please sign in to comment.