Skip to content

Commit

Permalink
[HubSpot] add configurable retries to ITBLL Verify
Browse files Browse the repository at this point in the history
  • Loading branch information
bbeaudreault authored and ndimiduk committed Sep 23, 2024
1 parent 2cb803c commit cca9142
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1532,9 +1532,20 @@ protected void runVerify(String outputDir, int numReducers, long expectedNumNode

Verify verify = new Verify();
verify.setConf(getConf());
int retCode = verify.run(iterationOutput, numReducers);
if (retCode > 0) {
throw new RuntimeException("Verify.run failed with return code: " + retCode);

int retries = getConf().getInt("hbase.itbll.verify.retries", 1);

while (true) {
int retCode = verify.run(iterationOutput, numReducers);
if (retCode > 0) {
if (retries-- > 0) {
LOG.warn("Verify.run failed with return code: {}. Will retry", retries);
} else {
throw new RuntimeException("Verify.run failed with return code: " + retCode);
}
} else {
break;
}
}

if (!verify.verify(expectedNumNodes)) {
Expand Down

0 comments on commit cca9142

Please sign in to comment.