diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java index 0df712e7101..889d223acbc 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java @@ -62,7 +62,7 @@ public class BackupInfo implements Comparable { * Backup session states */ public static enum BackupState { - RUNNING, COMPLETE, FAILED, ANY; + RUNNING, COMPLETE, FAILED, ANY } /** @@ -70,7 +70,7 @@ public class BackupInfo implements Comparable { * BackupState.RUNNING */ public static enum BackupPhase { - REQUEST, SNAPSHOT, PREPARE_INCREMENTAL, SNAPSHOTCOPY, INCREMENTAL_COPY, STORE_MANIFEST; + REQUEST, SNAPSHOT, PREPARE_INCREMENTAL, SNAPSHOTCOPY, INCREMENTAL_COPY, STORE_MANIFEST } /** diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/RestoreDriver.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/RestoreDriver.java index b99246b262c..c8e3474677a 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/RestoreDriver.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/RestoreDriver.java @@ -147,7 +147,7 @@ public class RestoreDriver extends AbstractHBaseTool { String tableMapping = cmd.hasOption(OPTION_TABLE_MAPPING) ? cmd.getOptionValue(OPTION_TABLE_MAPPING) : null; try (final Connection conn = ConnectionFactory.createConnection(conf); - BackupAdmin client = new BackupAdminImpl(conn);) { + BackupAdmin client = new BackupAdminImpl(conn)) { // Check backup set if (cmd.hasOption(OPTION_SET)) { String setName = cmd.getOptionValue(OPTION_SET); diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupAdminImpl.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupAdminImpl.java index 0b01a982764..9a20b7b7497 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupAdminImpl.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupAdminImpl.java @@ -459,7 +459,7 @@ public class BackupAdminImpl implements BackupAdmin { public void addToBackupSet(String name, TableName[] tables) throws IOException { String[] tableNames = new String[tables.length]; try (final BackupSystemTable table = new BackupSystemTable(conn); - final Admin admin = conn.getAdmin();) { + final Admin admin = conn.getAdmin()) { for (int i = 0; i < tables.length; i++) { tableNames[i] = tables[i].getNameAsString(); if (!admin.tableExists(TableName.valueOf(tableNames[i]))) { @@ -561,7 +561,7 @@ public class BackupAdminImpl implements BackupAdmin { outputFs.mkdirs(targetTableBackupDirPath); } ArrayList nonExistingTableList = null; - try (Admin admin = conn.getAdmin();) { + try (Admin admin = conn.getAdmin()) { for (TableName tableName : tableList) { if (!admin.tableExists(tableName)) { if (nonExistingTableList == null) { @@ -615,7 +615,7 @@ public class BackupAdminImpl implements BackupAdmin { @Override public void mergeBackups(String[] backupIds) throws IOException { - try (final BackupSystemTable sysTable = new BackupSystemTable(conn);) { + try (final BackupSystemTable sysTable = new BackupSystemTable(conn)) { checkIfValidForMerge(backupIds, sysTable); BackupMergeJob job = BackupRestoreFactory.getBackupMergeJob(conn.getConfiguration()); job.run(backupIds); diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java index 102d45d2fcb..456674542fa 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java @@ -144,7 +144,7 @@ public final class BackupCommands { conn = ConnectionFactory.createConnection(getConf()); if (requiresNoActiveSession()) { // Check active session - try (BackupSystemTable table = new BackupSystemTable(conn);) { + try (BackupSystemTable table = new BackupSystemTable(conn)) { List sessions = table.getBackupInfos(BackupState.RUNNING); if (sessions.size() > 0) { @@ -158,7 +158,7 @@ public final class BackupCommands { } if (requiresConsistentState()) { // Check failed delete - try (BackupSystemTable table = new BackupSystemTable(conn);) { + try (BackupSystemTable table = new BackupSystemTable(conn)) { String[] ids = table.getListOfBackupIdsFromDeleteOperation(); if (ids != null && ids.length > 0) { @@ -332,8 +332,7 @@ public final class BackupCommands { System.setProperty("mapreduce.job.queuename", queueName); } - try (BackupAdminImpl admin = new BackupAdminImpl(conn);) { - + try (BackupAdminImpl admin = new BackupAdminImpl(conn)) { BackupRequest.Builder builder = new BackupRequest.Builder(); BackupRequest request = builder @@ -471,7 +470,7 @@ public final class BackupCommands { super.execute(); String backupId = args[1]; - try (final BackupSystemTable sysTable = new BackupSystemTable(conn);) { + try (final BackupSystemTable sysTable = new BackupSystemTable(conn)) { BackupInfo info = sysTable.readBackupInfo(backupId); if (info == null) { System.out.println("ERROR: " + backupId + " does not exist"); @@ -512,7 +511,7 @@ public final class BackupCommands { super.execute(); String backupId = (args == null || args.length <= 1) ? null : args[1]; - try (final BackupSystemTable sysTable = new BackupSystemTable(conn);) { + try (final BackupSystemTable sysTable = new BackupSystemTable(conn)) { BackupInfo info = null; if (backupId != null) { @@ -569,7 +568,7 @@ public final class BackupCommands { String[] args = cmdline.getArgs(); String[] backupIds = new String[args.length - 1]; System.arraycopy(args, 1, backupIds, 0, backupIds.length); - try (BackupAdminImpl admin = new BackupAdminImpl(conn);) { + try (BackupAdminImpl admin = new BackupAdminImpl(conn)) { int deleted = admin.deleteBackups(backupIds); System.out.println("Deleted " + deleted + " backups. Total requested: " + (args.length -1)); } catch (IOException e) { @@ -606,8 +605,7 @@ public final class BackupCommands { Configuration conf = getConf() != null ? getConf() : HBaseConfiguration.create(); try (final Connection conn = ConnectionFactory.createConnection(conf); - final BackupSystemTable sysTable = new BackupSystemTable(conn);) { - + final BackupSystemTable sysTable = new BackupSystemTable(conn)) { // Failed backup BackupInfo backupInfo; List list = sysTable.getBackupInfos(BackupState.RUNNING); @@ -658,7 +656,7 @@ public final class BackupCommands { BackupSystemTable.restoreFromSnapshot(conn); // Finish previous failed session sysTable.finishBackupExclusiveOperation(); - try (BackupAdmin admin = new BackupAdminImpl(conn);) { + try (BackupAdmin admin = new BackupAdminImpl(conn)) { admin.deleteBackups(backupIds); } System.out.println("DELETE operation finished OK: " + StringUtils.join(backupIds)); @@ -682,7 +680,7 @@ public final class BackupCommands { sysTable.finishBackupExclusiveOperation(); // Finish previous failed session sysTable.finishMergeOperation(); - try (BackupAdmin admin = new BackupAdminImpl(conn);) { + try (BackupAdmin admin = new BackupAdminImpl(conn)) { admin.mergeBackups(backupIds); } System.out.println("MERGE operation finished OK: " + StringUtils.join(backupIds)); @@ -734,7 +732,7 @@ public final class BackupCommands { } Configuration conf = getConf() != null ? getConf() : HBaseConfiguration.create(); try (final Connection conn = ConnectionFactory.createConnection(conf); - final BackupAdminImpl admin = new BackupAdminImpl(conn);) { + final BackupAdminImpl admin = new BackupAdminImpl(conn)) { admin.mergeBackups(backupIds); } } @@ -781,7 +779,7 @@ public final class BackupCommands { if (backupRootPath == null) { // Load from backup system table super.execute(); - try (final BackupSystemTable sysTable = new BackupSystemTable(conn);) { + try (final BackupSystemTable sysTable = new BackupSystemTable(conn)) { history = sysTable.getBackupHistory(n, tableNameFilter, tableSetFilter); } } else { @@ -905,7 +903,7 @@ public final class BackupCommands { // List all backup set names // does not expect any args - try (BackupAdminImpl admin = new BackupAdminImpl(conn);) { + try (BackupAdminImpl admin = new BackupAdminImpl(conn)) { List list = admin.listBackupSets(); for (BackupSet bs : list) { System.out.println(bs); @@ -921,7 +919,7 @@ public final class BackupCommands { super.execute(); String setName = args[2]; - try (final BackupSystemTable sysTable = new BackupSystemTable(conn);) { + try (final BackupSystemTable sysTable = new BackupSystemTable(conn)) { List tables = sysTable.describeBackupSet(setName); BackupSet set = tables == null ? null : new BackupSet(setName, tables); if (set == null) { @@ -940,7 +938,7 @@ public final class BackupCommands { super.execute(); String setName = args[2]; - try (final BackupAdminImpl admin = new BackupAdminImpl(conn);) { + try (final BackupAdminImpl admin = new BackupAdminImpl(conn)) { boolean result = admin.deleteBackupSet(setName); if (result) { System.out.println("Delete set " + setName + " OK."); @@ -960,7 +958,7 @@ public final class BackupCommands { String setName = args[2]; String[] tables = args[3].split(","); TableName[] tableNames = toTableNames(tables); - try (final BackupAdminImpl admin = new BackupAdminImpl(conn);) { + try (final BackupAdminImpl admin = new BackupAdminImpl(conn)) { admin.removeFromBackupSet(setName, tableNames); } } @@ -986,7 +984,7 @@ public final class BackupCommands { for (int i = 0; i < tables.length; i++) { tableNames[i] = TableName.valueOf(tables[i]); } - try (final BackupAdminImpl admin = new BackupAdminImpl(conn);) { + try (final BackupAdminImpl admin = new BackupAdminImpl(conn)) { admin.addToBackupSet(setName, tableNames); } diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupManifest.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupManifest.java index 4e6f6fff906..27f37503aa3 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupManifest.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupManifest.java @@ -485,7 +485,7 @@ public class BackupManifest { new Path(HBackupFileSystem.getBackupPath(backupImage.getRootDir(), backupImage.getBackupId()), MANIFEST_FILE_NAME); try (FSDataOutputStream out = - manifestFilePath.getFileSystem(conf).create(manifestFilePath, true);) { + manifestFilePath.getFileSystem(conf).create(manifestFilePath, true)) { out.write(data); } catch (IOException e) { throw new BackupException(e.getMessage()); diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java index 37dd08904e1..ebfc9f33330 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java @@ -176,8 +176,7 @@ public final class BackupSystemTable implements Closeable { } private void checkSystemTable() throws IOException { - try (Admin admin = connection.getAdmin();) { - + try (Admin admin = connection.getAdmin()) { verifyNamespaceExists(admin); if (!admin.tableExists(tableName)) { @@ -317,7 +316,7 @@ public final class BackupSystemTable implements Closeable { LOG.debug("found bulk loaded file : " + tbl + " " + Bytes.toString(fam) + " " + path); } } - ; + return mapForSrc; } } @@ -1546,7 +1545,7 @@ public final class BackupSystemTable implements Closeable { } public static void snapshot(Connection conn) throws IOException { - try (Admin admin = conn.getAdmin();) { + try (Admin admin = conn.getAdmin()) { Configuration conf = conn.getConfiguration(); admin.snapshot(BackupSystemTable.getSnapshotName(conf), BackupSystemTable.getTableName(conf)); } @@ -1555,7 +1554,7 @@ public final class BackupSystemTable implements Closeable { public static void restoreFromSnapshot(Connection conn) throws IOException { Configuration conf = conn.getConfiguration(); LOG.debug("Restoring " + BackupSystemTable.getTableNameAsString(conf) + " from snapshot"); - try (Admin admin = conn.getAdmin();) { + try (Admin admin = conn.getAdmin()) { String snapshotName = BackupSystemTable.getSnapshotName(conf); if (snapshotExists(admin, snapshotName)) { admin.disableTable(BackupSystemTable.getTableName(conf)); @@ -1589,7 +1588,7 @@ public final class BackupSystemTable implements Closeable { public static void deleteSnapshot(Connection conn) throws IOException { Configuration conf = conn.getConfiguration(); LOG.debug("Deleting " + BackupSystemTable.getSnapshotName(conf) + " from the system"); - try (Admin admin = conn.getAdmin();) { + try (Admin admin = conn.getAdmin()) { String snapshotName = BackupSystemTable.getSnapshotName(conf); if (snapshotExists(admin, snapshotName)) { admin.deleteSnapshot(snapshotName); diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/FullTableBackupClient.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/FullTableBackupClient.java index cb8e092e4a1..16999cc3742 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/FullTableBackupClient.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/FullTableBackupClient.java @@ -121,8 +121,7 @@ public class FullTableBackupClient extends TableBackupClient { */ @Override public void execute() throws IOException { - try (Admin admin = conn.getAdmin();) { - + try (Admin admin = conn.getAdmin()) { // Begin BACKUP beginBackup(backupManager, backupInfo); String savedStartCode = null; diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalBackupManager.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalBackupManager.java index d9258c5729e..74408c31c3f 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalBackupManager.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalBackupManager.java @@ -92,11 +92,9 @@ public class IncrementalBackupManager extends BackupManager { HashMap props = new HashMap(); props.put("backupRoot", backupInfo.getBackupRootDir()); - try (Admin admin = conn.getAdmin();) { - + try (Admin admin = conn.getAdmin()) { admin.execProcedure(LogRollMasterProcedureManager.ROLLLOG_PROCEDURE_SIGNATURE, LogRollMasterProcedureManager.ROLLLOG_PROCEDURE_NAME, props); - } newTimestamps = readRegionServerLastLogRollResult(); diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java index 00baeb70a7e..37c45e016b9 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java @@ -349,7 +349,7 @@ public class IncrementalTableBackupClient extends TableBackupClient { protected boolean tableExists(TableName table, Connection conn) throws IOException { - try (Admin admin = conn.getAdmin();) { + try (Admin admin = conn.getAdmin()) { return admin.tableExists(table); } } diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java index fc0fddee379..099a70da393 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java @@ -92,7 +92,7 @@ public class RestoreTablesClient { ArrayList disabledTableList = new ArrayList<>(); // check if the tables already exist - try (Admin admin = conn.getAdmin();) { + try (Admin admin = conn.getAdmin()) { for (TableName tableName : tTableArray) { if (admin.tableExists(tableName)) { existTableList.add(tableName); diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/TableBackupClient.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/TableBackupClient.java index aa0ec5f4ee4..05fcec327fb 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/TableBackupClient.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/TableBackupClient.java @@ -146,7 +146,7 @@ public abstract class TableBackupClient { } LOG.debug("Trying to delete snapshot: " + snapshotName); - try (Admin admin = conn.getAdmin();) { + try (Admin admin = conn.getAdmin()) { admin.deleteSnapshot(snapshotName); } LOG.debug("Deleting the snapshot " + snapshotName + " for backup " + backupInfo.getBackupId() diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupCopyJob.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupCopyJob.java index 90e844264ee..ee99cd91f15 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupCopyJob.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupCopyJob.java @@ -298,7 +298,7 @@ public class MapReduceBackupCopyJob implements BackupCopyJob { long totalBytesExpected = 0; int totalRecords = 0; Path fileListingPath = getFileListingPath(); - try (SequenceFile.Writer writer = getWriter(fileListingPath);) { + try (SequenceFile.Writer writer = getWriter(fileListingPath)) { List srcFiles = getSourceFiles(); if (srcFiles.size() == 0) { return fileListingPath; diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupMergeJob.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupMergeJob.java index dafc88b5ff7..b93d911fae0 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupMergeJob.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupMergeJob.java @@ -223,7 +223,7 @@ public class MapReduceBackupMergeJob implements BackupMergeJob { String backupRoot) throws IOException { // Delete from backup system table - try (BackupSystemTable table = new BackupSystemTable(conn);) { + try (BackupSystemTable table = new BackupSystemTable(conn)) { for (String backupId : backupIds) { table.deleteBackupInfo(backupId); } @@ -286,7 +286,7 @@ public class MapReduceBackupMergeJob implements BackupMergeJob { Set allSet = new HashSet(); try (Connection conn = ConnectionFactory.createConnection(conf); - BackupSystemTable table = new BackupSystemTable(conn);) { + BackupSystemTable table = new BackupSystemTable(conn)) { for (String backupId : backupIds) { BackupInfo bInfo = table.readBackupInfo(backupId); diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java index b00351b12e0..3973c3c7ef1 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java @@ -125,7 +125,7 @@ public class RestoreTool { void modifyTableSync(Connection conn, TableDescriptor desc) throws IOException { - try (Admin admin = conn.getAdmin();) { + try (Admin admin = conn.getAdmin()) { admin.modifyTable(desc); int attempt = 0; int maxAttempts = 600; @@ -156,7 +156,7 @@ public class RestoreTool { public void incrementalRestoreTable(Connection conn, Path tableBackupPath, Path[] logDirs, TableName[] tableNames, TableName[] newTableNames, String incrBackupId) throws IOException { - try (Admin admin = conn.getAdmin();) { + try (Admin admin = conn.getAdmin()) { if (tableNames.length != newTableNames.length) { throw new IOException("Number of source tables and target tables does not match!"); } @@ -474,7 +474,7 @@ public class RestoreTool { private void checkAndCreateTable(Connection conn, Path tableBackupPath, TableName tableName, TableName targetTableName, ArrayList regionDirList, TableDescriptor htd, boolean truncateIfExists) throws IOException { - try (Admin admin = conn.getAdmin();) { + try (Admin admin = conn.getAdmin()) { boolean createNew = false; if (admin.tableExists(targetTableName)) { if (truncateIfExists) { diff --git a/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupBase.java b/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupBase.java index c44efbdfeef..8d23c697467 100644 --- a/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupBase.java +++ b/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupBase.java @@ -194,7 +194,7 @@ public class TestBackupBase { public void execute() throws IOException { // Get the stage ID to fail on - try (Admin admin = conn.getAdmin();) { + try (Admin admin = conn.getAdmin()) { // Begin BACKUP beginBackup(backupManager, backupInfo); failStageIf(Stage.stage_0); diff --git a/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupDeleteRestore.java b/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupDeleteRestore.java index 85fba4b5aef..73210ce09d8 100644 --- a/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupDeleteRestore.java +++ b/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupDeleteRestore.java @@ -51,7 +51,7 @@ public class TestBackupDeleteRestore extends TestBackupBase { int numRows = TEST_UTIL.countRows(table1); HBaseAdmin hba = TEST_UTIL.getHBaseAdmin(); // delete row - try (Table table = TEST_UTIL.getConnection().getTable(table1);) { + try (Table table = TEST_UTIL.getConnection().getTable(table1)) { Delete delete = new Delete("row0".getBytes()); table.delete(delete); hba.flush(table1); diff --git a/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestIncrementalBackupMergeWithFailures.java b/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestIncrementalBackupMergeWithFailures.java index 011ddf29ad3..ebac1ea3f5e 100644 --- a/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestIncrementalBackupMergeWithFailures.java +++ b/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestIncrementalBackupMergeWithFailures.java @@ -267,8 +267,7 @@ public class TestIncrementalBackupMergeWithFailures extends TestBackupBase { conf.set(FAILURE_PHASE_KEY, phase.toString()); - try (BackupAdmin bAdmin = new BackupAdminImpl(conn);) - { + try (BackupAdmin bAdmin = new BackupAdminImpl(conn)) { String[] backups = new String[] { backupIdIncMultiple, backupIdIncMultiple2 }; bAdmin.mergeBackups(backups); Assert.fail("Expected IOException"); @@ -306,7 +305,7 @@ public class TestIncrementalBackupMergeWithFailures extends TestBackupBase { conf.unset(FAILURE_PHASE_KEY); conf.unset(BackupRestoreFactory.HBASE_BACKUP_MERGE_IMPL_CLASS); - try (BackupAdmin bAdmin = new BackupAdminImpl(conn);) { + try (BackupAdmin bAdmin = new BackupAdminImpl(conn)) { String[] backups = new String[] { backupIdIncMultiple, backupIdIncMultiple2 }; bAdmin.mergeBackups(backups); }