Apache9 commented on code in PR #7203:
URL: https://github.com/apache/hbase/pull/7203#discussion_r2265293931
##########
hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBackupRestore.java:
##########
@@ -175,28 +205,25 @@ public void testBackupRestore() throws Exception {
runTestMulti();
}
- private void runTestMulti() throws IOException {
+ private void runTestMulti() throws Exception {
LOG.info("IT backup & restore started");
Thread[] workers = new Thread[numTables];
+ BackupAndRestoreThread[] backupAndRestoreThreads = new
BackupAndRestoreThread[numTables];
for (int i = 0; i < numTables; i++) {
final TableName table = tableNames[i];
- Runnable r = new Runnable() {
- @Override
- public void run() {
- try {
- runTestSingle(table);
- } catch (IOException e) {
- LOG.error("Failed", e);
- Assert.fail(e.getMessage());
- }
- }
- };
- workers[i] = new Thread(r);
+ BackupAndRestoreThread backupAndRestoreThread = new
BackupAndRestoreThread(table);
+ backupAndRestoreThreads[i] = backupAndRestoreThread;
+ workers[i] = new Thread(backupAndRestoreThread);
workers[i].start();
}
- // Wait all workers to finish
- for (Thread t : workers) {
- Uninterruptibles.joinUninterruptibly(t);
+ // Wait for all workers to finish and check for errors
Review Comment:
Here we will throw exception when there is an error worker without waiting
all the workers to finish?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]